Andreas Rumpf
d23ae49535
fixes #15071 [backport] ( #15131 )
2020-07-31 12:13:33 +02:00
Andreas Rumpf
355b275175
fixes #15112 ( #15124 )
2020-07-30 19:19:59 +02:00
Andreas Rumpf
d130175342
cursor and mutation tracking fixes ( #15113 )
...
* fixes #15110
* fixes #15096
* prepare varpartitions for cursor inference
* new cursor inference begins to work
* make tests green
2020-07-30 17:32:48 +02:00
jcosborn
32c6146200
fix overloading case with generic alias ( #15116 )
...
* fix overloading case with generic alias
* revert reorganization of tests
2020-07-30 15:34:11 +02:00
Clyybber
2629d619a1
Fix forward declaration issues in template/macro context ( #15091 )
...
* Fix forward declaration issues in template/macro context
* Correct forward declaration resolving for overloads
* Remove old dead code
* WIP consistent gensym ids
* Minimize diff
* Remove obsoleted hack
* Add templInstCounter to give unique IDs to template instantiations
* Remove obsoleted code
* Eh, init in myOpen, not myProcess...
* Remove optNimV019
* Add testcase for #13484
2020-07-29 16:17:20 +02:00
Andreas Rumpf
a3a87cdb29
fixes #14616 [backport:1.2] ( #15109 )
2020-07-29 11:11:58 +02:00
Andreas Rumpf
86c9b78339
disable sink inference, only enable it for the stdlib. Reason: better source code compatibility ( #15105 )
2020-07-28 19:18:46 +02:00
Andreas Rumpf
e6f0d4a5a5
fixes #15076 ( #15095 )
2020-07-27 23:27:20 +02:00
Timothee Cour
377f716766
fix #14698 nkRecWhen caused internalAssert in semConstructFields when generic type not mentioned in fields ( #14709 )
...
* fix #14698 nkRecWhen caused internalAssert in semConstructFields when generic type not mentioned in fields
* address comment
* Update compiler/semtypinst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-07-27 22:32:21 +02:00
Bung
cac09a43ae
fix #11354 jsgen not carefully handle genAddr with nkHiddenAddr,nkStm… ( #15078 )
...
* fix #11354 jsgen not carefully handle genAddr with nkHiddenAddr,nkStmtListExpr; genAsgn with lvalue tyVar and rvalue tyPtr
* correct logic
* add test for #11354
* handle nkHiddenAddr when n.len == 1
* Update compiler/jsgen.nim
* Update compiler/jsgen.nim
* Apply suggestions from code review
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-07-27 21:13:49 +02:00
Bung
191c388792
fixes #14189 ( #15080 ) [backport]
2020-07-27 14:06:54 +02:00
Araq
318f0992ea
fixes a closure iterator memory leaks, progress on #15076
2020-07-27 13:07:09 +02:00
Araq
a0049d1fb0
compiler: minor code cleanups
2020-07-27 08:05:52 +02:00
Andreas Rumpf
aae998feff
fixes #15038 [backport:1.2]
2020-07-26 01:16:06 +02:00
Andreas Rumpf
624762cfb7
fixes #15052
2020-07-26 01:16:06 +02:00
Andreas Rumpf
2aca748ddd
strict func: much better error messages ( #15068 )
...
* strict func: much better error messages
* documented the 'strict funcs' mode
2020-07-25 19:36:53 +02:00
Andreas Rumpf
7ca32c86bb
writing to a location counts as "side effect"; implements https://github.com/nim-lang/RFCs/issues/234 ( #15030 )
2020-07-25 15:14:28 +02:00
Bung
2dddf32726
fix #14684 ( #15059 )
2020-07-25 09:52:29 +02:00
Bung
9746868832
fix #14534 ( #15060 ) [backport]
2020-07-25 09:51:59 +02:00
jcosborn
add003a074
fix assignment to converted concept type ( #15051 )
...
* fix assignment to converted concept type
* check for resolved concepts
* add extra test
2020-07-24 21:19:11 +02:00
Araq
12a9fe017e
fixes #15056 [backport]
2020-07-24 17:49:25 +02:00
Andreas Rumpf
18a70a7563
fixes #15036
2020-07-23 20:27:17 +02:00
Andreas Rumpf
c90c53e8bb
fixes #15044 [backport:1.2]
2020-07-23 20:27:17 +02:00
Andreas Rumpf
d84894de2e
fixes #15026 [backport] ( #15040 )
...
no test case since only a special case was affected and the special case got removed
2020-07-22 13:02:03 +02:00
Andreas Rumpf
911e39351e
ARC: optimize the code better when --panics:off ( #15031 )
2020-07-21 23:23:33 +02:00
Andreas Rumpf
3a4e4cec4d
cursor inference bugfix
2020-07-20 18:37:14 +02:00
Andreas Rumpf
80d3ef9952
hotfix: firstOrd/lastOrd for 'tyLent' as it shows up in strange places, as usual
2020-07-20 17:44:35 +02:00
Andreas Rumpf
49d4b50fe5
fixes #14194 ( #15023 )
2020-07-20 14:28:00 +02:00
Andreas Rumpf
71dd5f85b9
'isolate' builtin; refs https://github.com/nim-lang/RFCs/issues/244 ( #15011 )
2020-07-20 07:50:19 +02:00
Andreas Rumpf
d4984e069a
arc: cursors for simple for loop variables ( #15008 )
...
* arc: cursors for simple for loop variables
* merged devel
2020-07-17 15:24:36 +02:00
Clyybber
1355b461aa
Show that a variable is cursor in --expandArc ( #15002 )
2020-07-17 10:56:17 +02:00
Andreas Rumpf
6b607413e9
cursor inference: hotfix ( #14999 )
2020-07-16 12:07:06 +02:00
Andreas Rumpf
617c1f16d7
disable debug output
2020-07-15 23:04:18 +02:00
Andreas Rumpf
c5358b0d4b
An optimizer for ARC ( #14962 )
...
* WIP: an optimizer for ARC
* do not optimize away destructors in 'finally' if unstructured control flow is involved
* optimized the optimizer
* minor code cleanup
* first steps to .cursor inference
* cursor inference: big steps to a working solution
* baby steps
* better .cursor inference
* new feature: expandArc for easy inspection of the AST after ARC transformations
* added topt_cursor test
* adapt tests
* cleanups, make tests green
* optimize common traversal patterns
* moved test case
* fixes .cursor inference so that npeg compiles once again
* cursor inference: more bugfixes
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-07-15 23:00:06 +02:00
Clyybber
e057b1d839
Fix #14990 ( #14991 )
...
* Fix #14990
* Add testcase
2020-07-15 19:00:52 +02:00
Clyybber
08159733cd
Fix #14985 ( #14988 )
2020-07-15 11:34:10 +02:00
Clyybber
2b0e336c97
injectdestructors fixes and refactor ( #14964 )
...
* injectdestructors fixes and refactor
* Tiny cleanup
* Refactor and expand testcase
* Closes #14902 by adding testcase
* Better naming
* Fix test failures
* Misc cleanup
* Add testcase for #14968
* Better approach; expand testcases
* Optimizations and fixes
* Add testcase
* typo
* Tiny cleanup
2020-07-14 14:15:39 +02:00
flywind
086efac49b
fix #6608 ( #14963 )
...
* fix #6608
2020-07-14 09:22:48 +02:00
Miran
371b416ac8
fix #14912 , make --useVersion:1.0 work again ( #14945 )
...
* fix #14912 , make `--useVersion:1.0` work again
* a better fix
* add test
2020-07-10 16:44:12 +02:00
Araq
4603197fe8
fixes a minor regression
2020-07-10 13:36:02 +02:00
Araq
112511084d
fixes the tcontrolflow regression, clen idea of an escaping expression
2020-07-10 13:36:02 +02:00
Araq
b59385f22b
no wasMoved() calls after destructors necessary
2020-07-10 13:36:02 +02:00
Araq
37a98c77f3
optimize sinks even when in a loop
2020-07-10 13:36:02 +02:00
Araq
78513a9204
renderer.nim: more obvious debug output
2020-07-10 13:36:02 +02:00
Clyybber
4a1128d16c
Move wasMoved out of =destroy
2020-07-10 13:36:02 +02:00
Clyybber
3e52136f26
Cosmetics
2020-07-10 13:36:02 +02:00
Araq
f92d2eaa35
cleanup of PR #14833 (VM profiler)
2020-07-09 19:21:20 +02:00
Ico Doornekamp
d7ccd82eac
VM profiler ( #14833 )
...
* Crude VM profiler
* Added --profileVM flag, refactoring
* fixed FileLine hash
* Use TLineInfo instead of own FileLine, updated formatting
* Refactoring, moved PStackFrame to vmdefs for cleaner data structure
* Moved vmprofiler to separate file
* Simplified TLineInfo hash, use toFileLineCol for output
* Hash
* Moved profile data into Config, dump only once at end of run
* Changed profile output header to show '#instr' instead of 'count'
* Do not accumulate instrcount for non-top frames
Co-authored-by: Ico Doornekamp <git@zevv.nl >
2020-07-09 19:18:35 +02:00
Andreas Rumpf
c38a459582
fixes #14925 ( #14947 )
2020-07-09 17:24:23 +02:00
flywind
40b58a0a18
fix #11009 ( #14935 )
2020-07-09 09:57:35 +02:00