Andreas Rumpf
fb641483f0
arc optimizations ( #13325 )
...
* scope based destructors
* handle 'or' and 'and' expressions properly, see the new test arc/tcontrolflow.nim
* make this branch mergable, logic is disabled for now
2020-03-18 16:57:34 +01:00
Jasper Jenkins
796aafe7e0
make case-object transitions explicit, make unknownLineInfo a const, replace a few magic numbers with consts ( #13170 )
2020-01-17 10:34:31 +01:00
Andreas Rumpf
fb1b51f1e3
fixes #12956 ( #13020 )
2020-01-03 17:36:09 +01:00
Clyybber
7e747d11c6
Cosmetic compiler cleanup ( #12718 )
...
* Cleanup compiler code base
* Unify add calls
* Unify len invocations
* Unify range operators
* Fix oversight
* Remove {.procvar.} pragma
* initCandidate -> newCandidate where reasonable
* Unify safeLen calls
2019-11-28 17:13:04 +01:00
Yuriy Glukhov
1aed455e7c
Fixed yield in nkCheckedFieldExpr ( #12429 ) [backport]
2019-10-15 09:16:06 +02:00
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Andreas Rumpf
d363eced3a
closureiters.nim: finish the bugfix
2019-09-10 08:50:05 +02:00
Yuriy Glukhov
60911304b4
Fixed yield in nnkChckRange ( #12160 )
2019-09-10 07:54:06 +02:00
Yuriy Glukhov
721ca3e830
Reset closure iter exception before rethrowing
2019-08-16 17:26:00 +02:00
Arne Döring
afbcd1b330
int128 on firstOrd, lastOrd and lengthOrd ( #11701 )
...
* fixes #11847
2019-08-07 15:53:16 +02:00
Araq
07d465ca42
[refactoring] remove unused imports in the compiler and in some stdlib modules
2019-07-18 00:36:03 +02:00
Araq
c83914b435
[refactoring] closureiters.nim: style change
2019-06-20 11:31:20 +02:00
Andreas Rumpf
bf592c4e94
more destructor based changes ( #10885 )
...
* mark user defined destructors with sfOverriden to simplify the logic
* refactoring in preparation to merge liftings and generic instantiations for destructors
* ast: introduce nkHiddenTryStmt for destructor generation in order to be able to optimize better the code later on
* renamed 'patterns' switch to 'trmacros' as it was totally misleading before
* destructors: introduce tfCheckedForDestructor flag in preparation of strict =destroy checking
* test for invalid/too late destructor introductions
* liftdestructors: make code robust for nimsuggest
* --newruntime works for hello world again
* newruntime: code generation for closures
2019-03-23 00:12:05 +01:00
Yuriy Glukhov
410fd1deae
Fixes 9716 [backport] ( #9790 )
...
* reuse temporary variable
* fixes #9716 [backport]
* Declare local vars in safer place
2018-11-24 10:50:48 +01:00
Yuriy Glukhov
5a2290f788
Fixed yield in nkObjConstr. Fixes #9694 [backport] ( #9744 )
...
* Fixed yield in nkObjConstr. Fixes #9694
* Separate expr lowering from state splitting, introduce a clear lowering internal error
2018-11-18 23:09:33 +01: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
Yuriy Glukhov
1e6eca973d
Fixes #8243 ( #8904 )
2018-09-07 16:30:50 +02:00
Yuriy Glukhov
d2eea9e1c9
Fixes #8851 ( #8859 )
2018-09-04 08:18:11 +02:00
LemonBoy
fd7fd1819c
Make sure addGotoOut always inserts its node ( #8843 )
...
Fixes #8773
2018-09-03 00:32:26 +02:00
Yuriy Glukhov
2094209837
Fixed #8399 ( #8401 )
2018-07-22 22:30:59 +02:00
Araq
8e9551b1c7
fixex merge conflicts
2018-06-08 19:50:36 +02:00
Yuriy Glukhov
60b9c9dc1f
Fixes #7985
2018-06-07 19:14:14 +03:00
Yuriy Glukhov
fef60716bf
Fixed yield in nkBlockExpr
2018-06-07 00:15:46 +03:00
Yuriy Glukhov
0ec2b33c50
Fixed yield in dotExpr and nkOfBranch lowering. Closes #7969 .
2018-06-06 16:35:40 +03:00
Yuriy Glukhov
44589e9ca8
Cosmetics
2018-06-05 22:47:07 +03:00
Yuriy Glukhov
cfe40a3e6e
Merge branch 'devel' into yield-in-try
2018-05-15 19:54:52 +03:00
Yuriy Glukhov
5d166fcc0a
Review comments addressed. More thorough line info tracking.
2018-05-10 00:27:50 +03:00
Yuriy Glukhov
c1dde282d6
Fixed line info
2018-05-09 22:25:28 +03:00
Yuriy Glukhov
d99c82bc3b
Cosmetics
2018-05-09 22:25:28 +03:00
Yuriy Glukhov
0b5883c21e
Small fix and cosmetics
2018-05-09 22:25:28 +03:00
Yuriy Glukhov
c854865d3e
Corrected nkExceptBranch transformation
2018-05-09 22:25:28 +03:00
Yuriy Glukhov
14ca79fe1f
More elaborate nkStmtListExpr lowering
2018-05-09 22:25:28 +03:00
Yuriy Glukhov
ac86b8ce61
Cleanup
2018-05-09 22:25:28 +03:00
Yuriy Glukhov
ce63490928
Yield in try
2018-05-09 22:25:28 +03:00
Yuriy Glukhov
0ed6c3e476
Minor dry up
2018-05-09 22:25:28 +03:00
Yuriy Glukhov
13167c85f6
Cosmetics
2018-05-09 22:25:27 +03:00
Yuriy Glukhov
d71f69ab50
Closure iter transformation
2018-05-09 22:25:27 +03:00