Commit Graph

187 Commits

Author SHA1 Message Date
Andreas Rumpf
2f213db7ee fixes #11225; generic sandwich problems; [backport:1.2] (#17255)
* fixes #11225; generic sandwich problems; [backport:1.2]
* progress
* delegating these symbols must be done via 'bind'
2021-03-09 20:19:24 +01:00
Andreas Rumpf
73a8b950cb big steps torwards an efficient, simple IC implementation (#16543)
* reworked ID handling
* the packed AST now has its own ID mechanism
* basic serialization code works
* extract rodfiles to its own module
* rodfiles: store and compare configs
* rodfiles: store dependencies
* store config at the end
* precise dependency tracking
* dependency tracking for rodfiles
* completed loading of PSym, PType, etc
* removed dead code
* bugfix: do not realloc seqs when taking addr into an element
* make IC opt-in for now
* makes tcompilerapi green again
* final cleanups

Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
2021-01-02 07:30:39 +01:00
cooldome
fbc8a40c7a fix #15043 (#16441) [backport:1.4]
* fix #15043

* Trigger build
2020-12-27 20:05:33 +01:00
cooldome
00b495de95 Use modern enums in compiler (#15775) 2020-11-02 10:35:24 +01:00
Andreas Rumpf
226595515c explicit ID generation for easier IC (#15559)
* refactoring: idents don't need inheritance
* refactoring: adding an IdGenerator (part 1)
* refactoring: adding an IdGenerator (part 2)
* refactoring: adding an IdGenerator (part 3)
* refactoring: adding an IdGenerator (part 4)
* refactoring: adding an IdGenerator (part 5)
* refactoring: adding an IdGenerator (part 5)
* IdGenerator must be a ref type; hello world works again
* make bootstrapping work again
* progress: add back the 'exactReplica' ideas
* added back the missing exactReplica hacks
* make tcompilerapi work again
* make important packages green
* attempt to fix the build for 32 bit machines (probably need a better solution here)
2020-10-25 08:50:47 +01:00
Clyybber
b022576ce9 Use typeflag instead 2020-08-10 12:57:32 +02:00
Clyybber
38068f9778 Make explicit {.nimcall.} a seperate calling convention 2020-08-08 12:36:20 +02:00
Timothee Cour
63d1a0289e fix #14421 items uses lent T (#14447)
* fix #14421 items uses lent T for seq + openArray
* add -d:nimWorkaround14447
* fix test
2020-05-29 17:10:59 +02:00
Timothee Cour
9502e39b63 nim doc --backend:js, nim doc --doccmd:-d:foo, nim r --backend:js, --doccmd:skip + other improvements (#14278)
* `nim doc --backend:js|cpp...`
`nim doc --doccmd:'-d:foo --threads:on'`
`nim r --backend:cpp...` (implies --run --usenimcache)
* --usenimcache works with all targets
* --docCmd:skip now skips compiling snippets; 50X speedup for doc/manual.rst
2020-05-11 12:01:18 +02: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
83a736a34a ARC: cycle detector (#12823)
* first implementation of the =trace and =dispose hooks for the cycle collector
* a cycle collector for ARC: progress
* manual: the .acyclic pragma is a thing once again
* gcbench: adaptations for --gc:arc
* enable valgrind tests for the strutils tests
* testament: better valgrind support
* ARC refactoring: growable jumpstacks
* ARC cycle detector: non-recursive algorithm
* moved and renamed core/ files back to system/
* refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
2019-12-17 17:37:50 +01:00
Araq
2dea920379 ARC: implemented a simple cycle detector 2019-11-28 23:00:34 +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
Andreas Rumpf
5278cf80eb ARC: closure bugfixes (#12677)
* ARC: closure bugfixes
* progress
* ARC closures: create =hooks for captured parameters
* ARC: always destroy constructions like tuples, arrays properly, even in edge cases
* fixes a regression
2019-11-18 12:33:44 +01:00
Andreas Rumpf
76179cbec2 ARC: fixes leaking new() statement (#12665) 2019-11-15 12:38:11 +01:00
Andreas Rumpf
a14abc5708 ARC: solves phase ordering problems (#12654) 2019-11-14 23:19:18 +01:00
Araq
3020e49b75 ARC: use the new .cursor annotation for 'up' pointers 2019-11-13 23:29:21 +01:00
Andreas Rumpf
ceda586d88 fixes #12577 [backport] (#12584) 2019-11-03 07:55:55 +01:00
Andreas Rumpf
44a27ccfe1 --gc:destructors: simple closures work 2019-11-02 00:39:04 +01:00
Andreas Rumpf
1746da2d9e --gc:destructors now means Nim uses pure refcounting (#12557) 2019-10-30 16:15:17 +01:00
Andreas Rumpf
c52a2c3ab0 proof that refcounting can handle Nim's async (#12533) 2019-10-28 16:13:38 +01:00
Andreas Rumpf
7192b13609 some progress on bug #12443 2019-10-27 17:50:30 +01:00
Araq
ed2fb36bc6 refactoring: use the new strings and seqs when optSeqDestructors is active 2019-10-20 08:11:07 +02:00
Araq
61ea85687c refactoring: --newruntime consists of 3 different switches 2019-10-20 08:11:07 +02:00
Andreas Rumpf
a60f18d025 fixes #12323 [backport] 2019-10-07 06:47:30 +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
edbe02b4e1 newruntime: progress to make 'async' work with --newruntime 2019-07-15 10:56:55 +02:00
Araq
c94647aeca styleCheck: make the compiler and large parts of the stdlib compatible with --styleCheck:error 2019-07-10 12:42:41 +02:00
Andreas Rumpf
135fdde6a9 fixes #11523 2019-06-26 23:41:20 +02:00
Araq
6adcc09877 [bugfix] newruntime: trivial closure iterator works 2019-06-20 11:31:20 +02:00
Andreas Rumpf
c65a5d754b [bugfix] owned closures (#11544) 2019-06-20 07:40:45 +02:00
Araq
b056d32a79 [refactoring] liftdestructors.nim is callable from lambdalifting; refs #11217 2019-06-12 10:44:45 +02:00
Andreas Rumpf
7215341190 make fullpaths the default in error messages and stack traces for mor… (#11385)
* make fullpaths the default in error messages and stack traces for more convenient development
* split up -d:release into -d:release and -d:danger flags
* workaround a Nim config parser bug
* fixes an old nim config parser bug
* make megatest green again
* make nimpretty tests work again
* make nimsuggest green
2019-06-05 08:02:54 +02:00
Andreas Rumpf
55aa2129b5 make twidgets example green (#11135) 2019-04-28 13:28:18 +02:00
Andreas Rumpf
0e6eb7d483 make strscans module work with --newruntime 2019-04-14 23:13:49 +02:00
Andreas Rumpf
2851f316f6 ignore nkCommentStmt in lambda lifting 2019-02-06 22:00:16 +01:00
Araq
2ce9845fe4 fixes silly typo causing tons of async regressions 2019-01-30 19:48:21 +01:00
Araq
0a628f36f0 destructors: do not produce strong backrefs in closure environments so that refcounting works 2019-01-30 18:17:49 +01:00
Araq
e874705971 fixes nested gensym'ed parameters; fixes #9476 2018-12-08 13:30:06 +01:00
Araq
7a0191ac7e fixes #9441 2018-12-06 08:06:54 +01:00
Araq
9eaf99f7e6 lambdalifting: be consistent in its handling for 'func' 2018-12-05 11:25:47 +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
Miran
e8cf289bee improve error message, closes #2361 (#9387)
* improve error message

* use single % operation
2018-10-17 00:18:51 +02:00
LemonBoy
1fc3a68205 Access implicit result trough envP in closures (#8471)
Reuse the existing machinery, most of the changes are only needed to
handle the `result = result` node in nkReturnStmt produced by the
closure iterator transform.

Fixes #338
2018-07-30 08:34:15 +02: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
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