Andreas Rumpf
da29222f86
init checks and 'out' parameters ( #14521 )
...
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
2020-06-23 10:53:57 +02:00
cooldome
d3b0132061
Step2: fixes #13781 , fixes #13805 ( #13897 )
...
* Fix sym owner in wrapper proc
* threadpool changes
* revert lowerings
* add newFastMoveStmt
* try fixing test by switching to cpp
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-04-16 23:27:08 +02:00
cooldome
586ebb090b
fixes #13708 ( #13711 )
...
* fixes #13708
* differentiate between arc and rest of GC
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-03-21 07:12:10 +01:00
cooldome
7dd787b8a3
fixes #13368 ( #13397 )
2020-02-14 10:13:55 +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
cooldome
002d50f1f0
Sink to MemMove optimization in injectdestructors ( #13002 )
2020-01-02 22:58:01 +01:00
cooldome
584e8c8283
fixes #12989 ( #12992 )
...
* fixes #12989
* Revert "remove unwanted changes"
This reverts commit 501829732a .
2019-12-31 21:13:26 +01:00
Andrii Riabushenko
9eeff690d5
Revert "fixes #12989 "
...
This reverts commit 928c2fee06 .
2019-12-31 00:10:02 +00:00
Andrii Riabushenko
928c2fee06
fixes #12989
2019-12-31 00:07:49 +00:00
Andreas Rumpf
3524944e21
ARC: fixes cycle detection and move the .cursor attribute into closures ( #12872 )
2019-12-11 06:57:00 +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
Araq
72237e2bcf
ARC: ported the GC tests over to --gc:arc
2019-11-26 16:04:28 +01:00
narimiran
015bec6254
Revert "ARC: another critical bugfix; temporary tuples we introduce for tuple unpackaging are not owning the data"
...
This reverts commit 8b2f8f5430 .
2019-11-24 09:50:52 +01:00
Araq
8b2f8f5430
ARC: another critical bugfix; temporary tuples we introduce for tuple unpackaging are not owning the data
2019-11-22 21:41:45 +01:00
Andreas Rumpf
85ffcd80c0
more arc improvements ( #12690 )
...
* ARC: bugfix for =destroy for inherited objects
* added code useful for debugging
2019-11-20 14:34:05 +01:00
Clyybber
ed1d41c51e
Small ast.nim cleanup ( #12156 )
...
* Remove sonsLen
* Use Indexable
2019-09-09 11:54:15 +02:00
cooldome
2b565aad89
Support iterators returning lent T ( #11938 )
...
* lent iterators
* rebase tests
* update changelog
* fix comments, more tests
2019-08-31 19:23:54 +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
9db369063c
[refactoring] moves transformation for 'spawn' into its own spawn.nim implementation
2019-07-14 12:13:19 +02:00
Andreas Rumpf
2678fa679a
fixes #7057
2019-07-06 15:24:14 +02:00
Andreas Rumpf
c65a5d754b
[bugfix] owned closures ( #11544 )
2019-06-20 07:40:45 +02:00
Araq
a3e27ffa2c
fixes #11215
2019-05-12 15:07:35 +02:00
Arne Döring
b92fd30282
rename tyExpr/tyStmt to tyUntyped/tyTyped ( #11227 )
2019-05-11 10:11:08 +02:00
Clyybber
f18b3af9d4
Replace countup(x, y-1) with x ..< y
2019-05-07 12:32:05 +02:00
Araq
d59e9c37fa
added lowerings.evalOnce
2019-04-09 11:38:54 +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
Andreas Rumpf
62ab338900
added lowerings.genLen helper proc
2019-03-14 07:59:44 +01:00
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
cooldome
5b98afb8a8
Destructors: more moves for tuples ( #9808 )
2018-11-27 18:59:21 +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
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
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
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
328e7a1005
options.nim: no global variables anymore
2018-05-13 17:52:21 +02:00
Andreas Rumpf
1310279691
lambda lifting compiles again
2018-05-12 08:30:55 +02:00
Andreas Rumpf
e4081a7201
preparations for language extensions: 'sink' and 'lent' types
2018-01-07 23:09:26 +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
Andreas Rumpf
ec253ada72
initial version of the new untested destructor pass
2017-10-12 11:32:29 +02:00
Andreas Rumpf
1a61c4d46d
first implementation of the 'func' keyword
2017-09-23 23:22:53 +02:00
Andreas Rumpf
ad608838bf
closures have an object type field so that we can perform correct deepCopy() for the BoehmGC target
2017-07-22 11:10:52 +02:00
Andreas Rumpf
920888f382
fixes tuple unpacking regression
2017-04-26 11:10:50 +02:00
Andreas Rumpf
7cba41db23
make nimble compile again
2017-04-22 14:58:53 +02:00
Andreas Rumpf
3f5ababfe8
make sighashes work in more cases
2017-04-21 17:01:57 +02:00
Andreas Rumpf
b7bffa35c7
attempt to make sighashes produce smaller diffs
2017-04-19 08:40:05 +02:00