Neelesh Chandola
9884129058
Tuple unpacking now works for for vars ( #10152 )
...
* Tuple unpacking now works for `for` vars
* Give error if length of tuple vars != length of tuple
* Fix error message showing wrong tuple length
* unpacking now works now for mutable items
* Update changelog
2019-02-23 14:01:34 +01:00
Andreas Rumpf
444f2231c9
make tests green again
2019-02-08 16:54:12 +01:00
LemonBoy
aa6e40abe6
Fix wrong result in tuple assignment ( #9340 )
...
Fixes #9177
2019-02-08 12:24:03 +01:00
Andreas Rumpf
4338f86acb
fixes some bug
2019-02-06 22:00:16 +01:00
Alexander Ivanov
467f53512f
Show lineinfo of for in yield ( #9779 )
2018-12-13 10:38:32 +01:00
Andreas Rumpf
24902394f7
VM: don't inject destructor calls, refs #7041
2018-11-06 19:36:39 +01:00
cooldome
b1ff37c08f
Transf minor code optimization ( #9433 )
2018-10-19 20:17:30 +02: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
Araq
68c6d709d3
fixes #5519
2018-10-18 17:06:04 +02:00
Araq
ec4985a573
fixes #7972
2018-10-18 17:00:23 +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
f98a3056c6
Fix transformation of yield in inline context ( #9135 )
...
When the loop variables are part of the envP block it is not safe to use
a nkFastAsgn.
Fixes #2656
2018-10-09 19:43:31 +02:00
LemonBoy
b97a7dbf3d
Make the registered passes local to the ModuleGraph ( #9259 )
...
Closes #9068
2018-10-09 19:24:02 +02:00
Andreas Rumpf
3c461755e2
enable destructors for top level statements; needs to be documented
2018-09-24 16:00:57 +02:00
LemonBoy
4d9aec1858
Revert #7964
...
Somehow the test case doesn't crash anymore and the regression in the
doc generation is fixed.
Fixes #9019
2018-09-21 18:59:46 +02:00
Andreas Rumpf
3467c455c0
fixes #1616 ; fixes 'nim doc' regressions
2018-09-17 19:54:56 +02:00
LemonBoy
91b37311d9
Fix AST generation for case statements ( #8908 )
...
Fixes #7534
2018-09-07 21:07:06 +02:00
Andreas Rumpf
696c0c48c7
fixes merge conflict
2018-08-19 15:14:03 +02:00
LemonBoy
c04404635b
Fix unsound transform pass ( #8633 )
...
When a `var openArray[T]` function parameter goes trough the
`transformAddrDeref` pass we may lose the `var` specifier, leading to
nasty crashes at runtime.
2018-08-14 20:38:04 +02:00
LemonBoy
ba7c874a7d
Mysterious fix for #8550 ( #8561 )
...
Replacing the `for` body with a nkEmpty node is not the right thing to
do.
2018-08-12 20:41:48 +02:00
Andreas Rumpf
74bf316619
more progress on destructor based strings
2018-07-13 21:15:47 +02:00
Andreas Rumpf
0926754e68
make tests green again
2018-07-05 15:51:04 +02:00
Zahary Karadjov
31651ecd61
allow referencing other parameters in default parameter values
...
fix #7756
fix #1201
fix #7000
fix #3002
fix #1046
2018-06-16 16:46:32 +03:00
Araq
1074cc1fb9
fixes yet another merge conflict
2018-06-11 17:17:34 +02:00
Yuriy Glukhov
5c449c8cd1
Removed oldIterTranf feature
2018-06-10 23:42:53 +03:00
Araq
8e9551b1c7
fixex merge conflicts
2018-06-08 19:50:36 +02:00
Andreas Rumpf
9ab92824f6
AST change: keep nkStaticStmt in the AST for incremental compilation support
2018-06-03 20:16:29 +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
Araq
2a7fc84c86
remove ast.emptyNode global; cleanup configuration.nim
2018-05-16 03:06:07 +02:00
Yuriy Glukhov
cfe40a3e6e
Merge branch 'devel' into yield-in-try
2018-05-15 19:54:52 +03:00
Andreas Rumpf
328e7a1005
options.nim: no global variables anymore
2018-05-13 17:52:21 +02:00
Andreas Rumpf
fedc136985
transf and vmgen compile again
2018-05-12 09:38:41 +02:00
Yuriy Glukhov
48d8e215d5
Don't leak sem PContext into transf
2018-05-09 22:25:28 +03:00
Yuriy Glukhov
d71f69ab50
Closure iter transformation
2018-05-09 22:25:27 +03:00
Andreas Rumpf
ee366f1746
.experimental can now be used to enable specific features
2018-04-24 09:34:29 +02:00
Andreas Rumpf
47335aab41
introduce nkTupleConstr AST node for unary tuple construction; breaking change
2018-04-13 17:45:58 +02:00
cooldome
16c1a90857
Cpp codegen: handling of imported exceptions. Fixes #3571 ( #7360 )
2018-04-10 12:14:59 +02:00
cooldome
12b11fd848
Fix compiler crash on try expression with infix as ( Fixes #7116 ) ( #7112 )
...
* Fix compiler crash
* make sure type is not lost
2018-01-29 05:59:49 +01:00
Andreas Rumpf
e4081a7201
preparations for language extensions: 'sink' and 'lent' types
2018-01-07 23:09:26 +01:00
Araq
720c73e6d5
symbol files: fixes the logic for multi-methods
2018-01-03 02:36:29 +01:00
Araq
ee67a67ac4
first steps in adding template/macro calls to stack traces
2017-12-21 10:03:33 +01:00
Araq
5d2e86ea1a
the documentation generator now supports ':test:' for the testing of test snippets
2017-11-28 01:15:33 +01:00
Andreas Rumpf
d072229975
fixes #6724
2017-11-19 00:37:36 +01:00
Andreas Rumpf
cccdd9b58e
fixes new liftLocals pass
2017-11-02 20:39:08 +01:00
Andreas Rumpf
bd19b5f4d3
implemented undocumented '.liftLocals' feature
2017-11-02 10:42:19 +01:00
Andreas Rumpf
70ea45cdba
deprecated unary '<'
2017-10-29 08:37:13 +01:00
Araq
b2a2522d2d
make tests green again
2017-10-26 00:55:23 +02:00