ringabout
21a26548a4
fixes #14255 ; Crash in compiler when using system.any by accident. ( #21562 )
...
fixes #14255 ; Crash in compiler when using system.any by accident.
(cherry picked from commit 55636a2913 )
2023-04-26 15:09:47 +02:00
Bung
f0324e99da
fix #20588 ( #21104 )
...
(cherry picked from commit 8054be6e52 )
2023-04-26 10:57:45 +02:00
Andreas Rumpf
1cdce314a7
fixes #20422 ; emit nimPrepareStrMutationV2 for toOpenArray to keep th… ( #21459 )
...
fixes #20422 ; emit nimPrepareStrMutationV2 for toOpenArray to keep the abstraction of mutable strings which have immutable string literals
(cherry picked from commit 50baf21eac )
2023-03-02 10:29:24 +01:00
ringabout
0da50cef4f
fixes #20954 ; bounchecks for len(toOpenArray()) [backport] ( #20956 )
...
* bounchecks for len(toOpenArray())
* add a testcase
(cherry picked from commit b83bd282dc )
2022-12-15 16:25:56 +01:00
ringabout
ece219de2f
fixes #20303 ; wasMoved expressions with side effects for ORC ( #20307 ) [backport]
...
fixes #20303 ; wasMoved expressions with side effects
(cherry picked from commit bbbfde7341 )
2022-09-08 15:00:51 +02:00
flywind
c9a52971f4
dec inLoop after exiting the while scope in computeLiveRanges [backport] ( #19918 )
...
* dec inLoop after exiting the while scope in computeLiveRanges
* add testcase
(cherry picked from commit bcff13debc )
2022-06-30 10:21:14 +02:00
flywind
06f1828ee2
fix #19862 ; make widestrs consistent between refc and orc ( #19874 ) [backport]
...
fix #19862 ; make widestrs consistent in refc and orc
(cherry picked from commit 1972005439 )
2022-06-09 17:15:34 +02:00
flywind
1368316b7f
style usages part one (openarray => openArray) ( #19321 )
...
* style usages (openArray)
* revert doc changes
(cherry picked from commit 9df195ef58 )
2022-05-25 16:33:37 +02:00
flywind
f194356d21
fix #19435 ; don't create TypeBoundOps for tyOpenArray, tyVarargs [backport: 1.6] ( #19723 )
...
* fix #19435 ; openArray wronyly registers typebounds
* add testcase
* don't create TypeBoundOps for tyOpenArray, tyVarargs
(cherry picked from commit efaa6777a4 )
2022-04-25 14:51:41 +02:00
flywind
7994556f38
don't use a temp for addr [backport: 1.6] ( #19503 )
...
* don't use a temp for addr
fix #19497
* Update compiler/ccgcalls.nim
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
* add a test
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
(cherry picked from commit 27e548140b )
2022-02-08 08:35:28 +01:00
Andreas Rumpf
ac57c3193d
fixes an old ARC bug: the produced copy/sink operations don't copy the hidden type field for objects with enabled inheritance; fixes #19205 [backport:1.6] ( #19232 )
...
(cherry picked from commit 32d4bf3525 )
2021-12-10 11:46:35 +01:00
flywind
233c6e9fb3
fix #18410 (Errors initializing an object of RootObj with the C++ backend) [backport] ( #18836 )
...
* fix #18410
* one line comment
* typo
* typo
* cover cpp
(cherry picked from commit 2f730afe9e )
2021-11-03 15:06:31 +01:00
Derek 呆
97286db546
fix #18971 ( #19070 ) [backport:1.6]
...
since the example code return value from global variable, instead
of first argument, the `n.len` is 1 which causes compiler crashes.
(cherry picked from commit f755e452d2 )
2021-11-03 15:06:24 +01:00
flywind
4b764f4c7c
close #17319 ; add testcase ( #18934 )
2021-10-01 16:19:02 +08:00
flywind
677969f6ea
alternative to #18918 ( #18927 )
...
* fix #16558
* add testcase
2021-09-30 16:57:06 +02:00
flywind
bf1700bab1
add testcase for #7308 ( #18849 )
2021-09-14 19:39:55 +02:00
Andreas Rumpf
e8dad482a3
fixes #16246 ( #18800 )
2021-09-04 15:57:16 +02:00
flywind
13b9729183
fix #18627(Program segfaults with ARC when using openArray[string]) ( #18713 )
...
* fix #18627
* add testcase
* rename
* another
* remove tyVarargs
2021-08-19 19:56:52 +02:00
flywind
2bc07554cc
make proc names consistent ( #18626 )
...
* rename `endswith` to `endsWith`
* rename
2021-08-01 12:52:24 +01:00
Andreas Rumpf
6dc34757b6
fixes #18579 ( #18600 )
2021-07-27 14:32:56 +02:00
Andreas Rumpf
fa0209609d
fixes #18565 ( #18593 )
...
* fixes #18565
2021-07-27 09:36:19 +02:00
Andreas Rumpf
f8519657c4
fixes #18469 ( #18544 )
...
* fixes #18469
* Update compiler/injectdestructors.nim
2021-07-20 22:15:06 +02:00
Andreas Rumpf
af3d2d8ad9
added nimAllocPagesViaMalloc switch ( #18490 )
...
* added switch
* alloc.nim needs page aligned memory blocks
2021-07-15 17:58:47 +02:00
Andreas Rumpf
12da32a891
fixes #17893 ( #18485 )
...
* fixes #17893
2021-07-13 14:17:59 +02:00
Andreas Rumpf
b3aca78e22
closes #18433 ( #18484 )
...
* beneficial refactoring; use system.Endianness
* closes #18433
2021-07-13 12:44:29 +02:00
GordonBGood
9ffc70851b
thamming_orc test created/destroyed counts match ( #18471 )
...
The thamming_orc.nim code now counts all created objects being tested, not just the ones following the "first 20" test, and the position of the `destroyed += 1` counter has been adjusted so it counts all the calls that are as a result of `=trace` tracing and not just the original destruction calls.
2021-07-12 11:55:40 +02:00
Andreas Rumpf
4ec2f74246
ORC: support for custom =trace procs ( #18459 )
...
* ORC: support custom =trace procs (WIP)
* Update tests/arc/tcustomtrace.nim
Co-authored-by: Clyybber <darkmine956@gmail.com >
* =trace is now documented and seems to work
* make test green
Co-authored-by: Clyybber <darkmine956@gmail.com >
2021-07-09 15:15:49 +02:00
Andreas Rumpf
3eb3e6b9a3
ORC: use =destroy instead of =dispose ( #18440 )
...
* ORC refactoring in preparation for further changes (=dispose must die)
* ORC: embrace =destroy, avoid =dispose
* ORC: no need for =dispose
* closes #18421
2021-07-07 09:39:01 +02:00
Andreas Rumpf
3ceaf5c130
fixes #18030 ( #18415 )
2021-07-01 17:35:04 +02:00
Andreas Rumpf
ceb9e3efc9
fixes #18240 ( #18354 )
...
* ORC: track escaping parameters properly
* fixes #18240
2021-06-25 14:12:23 +02:00
Andreas Rumpf
0d194cdbf9
fixes #18287 ( #18346 )
2021-06-25 06:22:52 +02:00
Andreas Rumpf
53935b8b27
ARC: fixes memory leaks with newSeq used in a loop [backport:1.4] ( #18040 )
...
* ARC: fixes memory leaks with newSeq used in a loop [backport:1.4]
* Update tests/arc/tnewseq_legacy.nim
2021-05-18 21:45:37 +02:00
Clyybber
3614523664
Rework DFA traversal ( #18016 )
...
* enable using dbg: without a context
* Optimally joining first write/last read analysis
* Add test for #18002
* potLastReads -> potentialLastReads
2021-05-16 00:15:53 +02:00
Andreas Rumpf
c14427dbf3
ORC: cursor inference bugfix ( #17973 )
...
* fixed a .cursor inference bug
* added a test case
2021-05-08 16:47:06 +02:00
Clyybber
b03d6c9b2f
Fix #17712 ( #17873 )
2021-04-27 13:03:26 +02:00
flywind
53c898de41
fix #17812 (repr fails to compile with ARC/ORC) ( #17816 )
2021-04-22 08:08:56 +02:00
Clyybber
bb3769975b
Fix #17199 ( #17348 )
...
* don't zero out in a move in the VM
* Add testcases for #17199
* Update tests/arc/tarcmisc.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update tests/vm/tissues.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Fix test failures
* Fix test
* Fix tests
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-03-26 13:05:51 +01:00
Clyybber
833084b671
Fixes #17450 ( #17477 )
...
* Fixes #17450
* Add missing test output
2021-03-23 16:30:49 +01:00
Clyybber
97f51ed7c2
Revert "Fixes #17450 ( #17474 )" ( #17476 )
...
This reverts commit 5f0c520489 .
2021-03-23 15:44:20 +01:00
Clyybber
5f0c520489
Fixes #17450 ( #17474 )
...
* Fixes #17450
* Add missing test output
2021-03-23 15:40:30 +01:00
Clyybber
38d82795da
Fix #16437 ( #17277 )
...
* Fix #16437
* Fix
* Small cleanup
2021-03-06 22:35:02 +01:00
flywind
e1cc3b83fb
deprecate newruntime ( #17245 )
...
* deprecate newruntime
* tests
* Update compiler/commands.nim
2021-03-04 19:33:16 +01:00
Andreas Rumpf
bb0c19f42c
fixes #17173 ( #17213 )
...
* fixes #17173
* add testcase (#17214 )
* Apply suggestions from code review
* fix for newruntime
* Apply suggestions from code review
* Update lib/system.nim
* Update lib/system.nim
* Update lib/system.nim
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com >
Co-authored-by: flywind <xzsflywind@gmail.com >
Co-authored-by: Danil Yarantsev <tiberiumk12@gmail.com >
2021-03-01 20:58:12 +01:00
Andreas Rumpf
e9a287fe12
fixes #17170 ( #17171 )
2021-02-24 17:43:13 +01:00
Timothee Cour
11a7fa68f6
fix #17159 items(cstring) works in VM ( #17160 )
...
* fix #17159 items(cstring) works in VM
* improve test coverage tests/stdlib/tcstring.nim; add helpers: whenRuntimeJs, whenVMorJs
* document items(cstring)
* address comments
2021-02-24 14:01:06 +01:00
Clyybber
aa3af9e053
ARC Analysis in one pass v3 ( #17068 )
...
* Analyse last reads all at once
* Integrate firstWrite analysis
* Small cleanup
* Use sets instead of seqs
* Remove instrTargets
* Reap the benefits
* Implement error diagnostics
* Operate on DFA index for lastRead analysis
* Use mgetOrPut
* Cache alias results
This improves performance by a lot, since many
CFG locations map to a single PNode
* Improve performance
* Improve performance
* Cleanup
* Fix #17025
* Grammar
* Expand testcase
2021-02-17 14:17:35 +01:00
Andreas Rumpf
f32ffb6ed8
fixes #17033 [backport:1.4] ( #17061 )
...
* fixes #17033 [backport:1.4]
* make test robust against stdlib gensym things
* cleanup assertions.nim to make topt_no_cursor easier to get right
2021-02-17 11:00:03 +01:00
Clyybber
70b9e9962f
Revert "ARC: Analysis in one pass v2 ( #17000 )" ( #17046 )
...
This reverts commit 216be4060a .
2021-02-15 18:31:15 +01:00
Clyybber
216be4060a
ARC: Analysis in one pass v2 ( #17000 )
...
* Analyse last reads all at once
* Integrate firstWrite analysis
* Small cleanup
* Use sets instead of seqs
* Remove instrTargets
* Reap the benefits
* Implement error diagnostics
* Operate on DFA index for lastRead analysis
* Use mgetOrPut
* Cache alias results
This improves performance by a lot, since many
CFG locations map to a single PNode
* Improve performance
* Improve performance
* Cleanup
2021-02-10 15:03:57 +01:00
Clyybber
9edf719e1e
Revert "ARC Analysis in one pass ( #16849 )" ( #16984 )
...
This reverts commit ab740cb5b9 .
2021-02-09 15:50:52 +01:00