cooldome
086676782a
Add isInstanceOf for generic procs to the macros module ( #9730 )
2018-11-21 21:30:03 +01:00
cooldome
8c1083d3b7
Of operator in vm fixes [backport] ( #9717 )
...
* fixes #9701
* fixes #9702
* optimize of statement to bool
2018-11-15 13:03:42 +01:00
Andreas Rumpf
1c73db08b8
nim check fix; fixes #9609 [backport]
2018-11-07 20:07:43 +01:00
Andreas Rumpf
24902394f7
VM: don't inject destructor calls, refs #7041
2018-11-06 19:36:39 +01:00
Arne Döring
07f76c3ef9
fix compiler crash
2018-10-30 13:50:06 +01:00
Andrii Riabushenko
a54e0703a9
Add test
2018-10-24 20:29:51 +01:00
Andrii Riabushenko
bd68d3d8f4
improve style
2018-10-24 11:26:32 +01:00
Andrii Riabushenko
a7c9533a73
Add int float casts to vm
2018-10-24 11:24:23 +01:00
cooldome
eaca5be9d6
Change the order of compilation passes, transformation is made lazy at code gen ( #8489 )
...
* Ast no transformation
* Add getImplNoTransform to the macros module
* progress on delaying transf
* Fix methods tranformation
* Fix lazy lambdalifting
* fix create thread wrapper
* transform for lambda lifting
* improve getImplTransformed
* Fix destructor tests
* try to fix nimprof for linux
2018-10-18 20:21:25 +02:00
Timothee Cour
745f1642d6
implement sizeof and alignof operator (manually squashed #5664 ) ( #9356 )
2018-10-14 00:52:28 +02:00
LemonBoy
ee14ace5d3
Field checks for everybody ( #8957 )
...
* Field checks for JS backend
* Clean nkCall nodes with no arguments
Generating a nkEmpty in place of no arguments makes no sense form the
AST point of view and also trips up the VM codegen.
* Field checks for VM backend
* Test case for #6612
This patchset fixes #6612
* Add test case for LHS double evaluation
* Prevent LHS double-eval for JS backend
* Prevent double evaluation in VM backend
2018-10-09 19:54:12 +02:00
LemonBoy
fb54f394e8
Fix for VM codegen with static[T] types
...
Fixes #9043
2018-09-23 18:17:00 +02:00
LemonBoy
c2e5faf959
The VM cannot call methods
...
Fixes #2574
2018-09-17 19:14:13 +02:00
cooldome
e63c66b810
Add sym owner to macros ( #8253 )
2018-09-03 13:25:59 +02:00
Araq
7278f28740
fixes the remaining fixable Nimrod->Nim renamings; closes #2032
2018-09-03 09:34:31 +02:00
LemonBoy
5cd152bfda
Allow hint and warning to specify its loc info ( #8771 )
...
Let's bring those to feature-parity with `error`.
2018-08-28 22:59:28 +02:00
andri lim
4d5cce9882
fixes #6255 , add system.ashr arithmetic right shift ( #8547 )
2018-08-07 18:41:30 +02:00
andri lim
6e3d1dced5
fixes #5617 , 'copyLineInfo' addition ( #8523 )
2018-08-05 23:38:21 +02:00
andri lim
78c0ac5407
fixes #7827 , bindSym enhancement ( #8499 )
...
* bindSym power up, working prototype
* update bindSym doc
* add bindSym test
* fix some typo
* fix bindSym doc
* get rid of specialops field from vm
* add experimental: dynamicBindSym
2018-08-02 12:56:44 +02:00
Oscar Nihlgård
931273cc6b
Fix ref bug in vmgen ( #8424 )
2018-07-30 22:28:24 +02:00
Yuriy Glukhov
dd06c46865
Fixed uncaught exception in vm gen
2018-06-13 15:39:45 +03:00
Andreas Rumpf
f555338ce8
bugfix: allow 'export' in the VM
2018-06-12 21:08:41 +02:00
Araq
8e9551b1c7
fixex merge conflicts
2018-06-08 19:50:36 +02:00
Oscar Nihlgård
440212a154
Fix for newStringOfCap in VM ( #7901 )
2018-06-04 13:38:26 +02:00
Andreas Rumpf
268260953c
completed VM support for incremental compilations
2018-06-04 01:01:08 +02:00
Andreas Rumpf
b5194f592c
WIP: an API for VM replay global state support
2018-06-03 20:18:43 +02:00
Andreas Rumpf
61fb83ecbb
baby steps for incremental compilation
2018-05-30 23:50:34 +02:00
Andreas Rumpf
40ec7be45c
refactoring: remove idents.legacy global variable and pass the IdentCache around explicitly
2018-05-27 22:09:15 +02:00
Andreas Rumpf
669a564492
remove more global variables in the Nim compiler
2018-05-27 11:10:56 +02:00
Andreas Rumpf
a4e2b0c153
platform.nim doesn't use globals anymore; prepare msgs.nim for not using globals
2018-05-18 15:18:00 +02:00
Andreas Rumpf
bf6c2c5ccf
preparations of making compiler/msgs.nim free of global variables
2018-05-17 15:21:22 +02:00
Araq
2a7fc84c86
remove ast.emptyNode global; cleanup configuration.nim
2018-05-16 03:06:07 +02:00
Andreas Rumpf
fedc136985
transf and vmgen compile again
2018-05-12 09:38:41 +02:00
alaviss
97056fbb9b
fixes #7774 ( #7783 )
2018-05-06 10:34:22 +02:00
Andreas Rumpf
1aa359febb
warn about inconsistent spacing around binary operators; fixes #7582
2018-05-05 14:58:33 +02:00
Andreas Rumpf
f64f9e50cc
correct comparisons for nil strings/seqs
2018-04-28 15:13:44 +02:00
Andreas Rumpf
47335aab41
introduce nkTupleConstr AST node for unary tuple construction; breaking change
2018-04-13 17:45:58 +02:00
Jacek Sieka
85e21158db
Cleanups 20180401 ( #7458 )
2018-04-12 17:35:10 +02:00
Arne Döring
6baca58693
Get symbol kind ( #7491 )
2018-04-11 16:48:01 +02:00
cooldome
c34cb101b8
Fixes #7407 ( #7427 )
2018-04-06 10:53:21 +02:00
Araq
934bba5255
some progress on #7261 ; VM does not support the new backwards indexing
2018-02-28 10:13:55 +01:00
Andreas Rumpf
e4081a7201
preparations for language extensions: 'sink' and 'lent' types
2018-01-07 23:09:26 +01:00
Parashurama
41472f0e28
add support cast[integer] in VM
2017-12-30 10:30:40 +01:00
Araq
ee67a67ac4
first steps in adding template/macro calls to stack traces
2017-12-21 10:03:33 +01:00
Andreas Rumpf
14f2578604
fixes crash related to runnableExamples in Nim doc that yet uses the VM
2017-12-09 13:40:08 +01:00
Andreas Rumpf
abec8823aa
bugfix: make 'macros' module available for nimscript
2017-11-14 23:26:46 +01:00
Andreas Rumpf
70ea45cdba
deprecated unary '<'
2017-10-29 08:37:13 +01:00
Andreas Rumpf
f7f3a25be8
first steps of making 'opt' a first class type for Nim
2017-09-25 13:19:36 +02:00
Andreas Rumpf
1a61c4d46d
first implementation of the 'func' keyword
2017-09-23 23:22:53 +02:00
Parashurama
88a5e9d88c
Fix operations on string as openarray in VM. ( #6257 )
...
* fix openarray.len for string as openArray in VM.
* fix openarray[idx] for string as openArray in VM.
* fix openarray[idx]=val for string as openArray in VM.
* add tests for passing string as openArray in VM.
* fix issue with NimNode.len
NimNode.len was also returning len for string literals.
also fix logic bug in if/elif chain.
2017-09-15 13:35:57 +02:00