summary refs log tree commit diff stats
path: root/tests/arc
Commit message (Collapse)AuthorAgeFilesLines
* fixes #22866; fixes #19998; ensure destruction for Object construction with ↵ringabout2023-11-022-10/+16
| | | | | | custom destructors (#22901) fixes #22866; fixes #19998
* fixes #19250; fixes #22259; ORC AssertionDefect not ↵ringabout2023-10-131-0/+53
| | | | | | | | | | | containsManagedMemory(n.typ) (#22823) fixes #19250 fixes #22259 The strings, seqs, refs types all have this flag, why should closures be treated differently? follow up https://github.com/nim-lang/Nim/pull/14336
* fixes #22787; marks `var section` in the loop as reassign preventing cursor ↵ringabout2023-10-071-0/+37
| | | | | | | | | (#22800) fixes #22787 --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* items, pairs and friends now use `unCheckedInc` (#22729)ringabout2023-09-201-0/+4
| | | | | | | | | | | | `{.push overflowChecks: off.}` works in backends. Though it could be implemented as a magic function. By inspecting the generated C code, the overflow check is eliminated in the debug or release mode. ![image](https://github.com/nim-lang/Nim/assets/43030857/49c3dbf4-675e-414a-b972-b91cf218c9f8) Likewise, the index checking is probably not needed.
* fixes #22664; guard against potential seqs self assignments (#22671)ringabout2023-09-081-0/+21
| | | fixes #22664
* round out tuple unpacking assignment, support underscores (#22537)metagn2023-08-241-4/+4
| | | | | | | | | | | | | | | * round out tuple unpacking assignment, support underscores fixes #18710 * fix test messages * use discard instead of continue Co-authored-by: Andreas Rumpf <rumpf_a@web.de> --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* close #22748; cursorinference + -d:nimNoLentIterators results in err… (#22495)ringabout2023-08-171-0/+46
| | | closed #22748; cursorinference + -d:nimNoLentIterators results in erroneous recursion
* fixes #22237; fixes #21160; wrong cursor on unowned parameters in the for ↵ringabout2023-07-101-0/+55
| | | | | loop in ORC (#22240) fixes #22237; fixes #21160; wrong cursor on unowned parameters
* fixes #22175 (#22229)Andreas Rumpf2023-07-061-0/+12
|
* fixes #22132; hoisted openArray params result in erroneous code (#22224)ringabout2023-07-051-0/+18
|
* fix controlflow test (#22194)Jacek Sieka2023-06-301-1/+1
| | | the function actually returns
* fixes #22001 (#22177)Andreas Rumpf2023-06-271-0/+22
| | | | | * fixes #22001 * added test case
* adds =destroy T support for strings and seqs (#22167)ringabout2023-06-271-1/+1
| | | | | | | * adds =destroy T support for strings and seqs * fixes system * fixes tests
* fixes #22058; invalid free with {.noSideEffect.} in template (#22088)ringabout2023-06-131-0/+16
|
* fixes #21987; don't create type bound ops for anything in a function with a ↵ringabout2023-06-041-0/+48
| | | | | | | `nodestroy` pragma (#21992) * fixes #21987; don't create type bound ops for anything in a function with a `nodestroy` pragma * add a comment
* lift the `=dup` hook (#21903)ringabout2023-06-023-15/+10
| | | | | | * fixes tests again * remove helper functions * fixes closures, owned refs * final cleanup
* fixes #21974; fixes sameConstant fieldDefect (#21981)ringabout2023-06-011-0/+30
| | | | | * fixes #21974; fixes sameConstant fieldDefect * add a test case
* close #19990; adds a test case (#21853)ringabout2023-05-151-0/+14
|
* adds documentation for `=wasMoved` and `=dup` hooks and small fixes (#21827)ringabout2023-05-111-1/+1
| | | | | | | | | | | * adds documentation for `=wasMoved` and `=dup` hooks and small fixes * Update doc/destructors.md * Update doc/destructors.md --------- Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* make ORC threadlocal, take two (#21818)Andreas Rumpf2023-05-102-2/+2
| | | | | * ORC: make rootsThreshold thread local [backport] * fixes the regression
* revert #21799 and #21802 which don't pass the tests (#21804)ringabout2023-05-072-2/+2
| | | | | | | | | * Revert "ORC: make rootsThreshold thread local [backport] (#21799)" This reverts commit b74d49c037734079765770426d0f5c79dee6cf87. * Revert "fixes #21752 [backport] (#21802)" This reverts commit d0c62fa169f3970653ce0d5bbd16e123efb24251.
* implement `=dup` hook eliminating `wasMoved` and `=copy` pairs (#21586)ringabout2023-05-062-2/+71
| | | | | | | | | | | | | | | | | | | * import `=dup` hook eliminating `wasMoved` and `=copy` pairs * add dup * add a test for dup * fixes documentation * fixes signature * resolve comments * fixes tests * fixes tests * clean up
* ORC: make rootsThreshold thread local [backport] (#21799)Andreas Rumpf2023-05-062-2/+2
|
* fixes #21617; createTypeBoundOps with PContext in order to instantiate ↵ringabout2023-04-071-0/+6
| | | | | | | generics (#21619) * fixes #21617; createTypeBoundOps with PContext in order to instantiate generics * keep idgen
* fixes #21592; create type bound operations for calls in the method ↵ringabout2023-04-011-0/+11
| | | | | | | dispatcher for ORC (#21594) * fixes #21592; create type operations for the method dispatcher * add a test case
* tuple unpacking for vars as just sugar, allowing nesting (#21563)metagn2023-03-281-0/+30
| | | | | | | | | | | | | | | | | | | * tuple unpacking for vars as just sugar, allowing nesting * set temp symbol AST * hopeful fix some issues, add test for #19364 * always use temp for consts * document, fix small issue * fix manual indentation * actually fix manual * use helper proc * don't resem temp tuple assignment
* fixes #20993 [backport:1.6] (#21574)Andreas Rumpf2023-03-281-0/+41
| | | | | * fixes #20993 [backport:1.6] * proper line endings for the test file
* fixes #14255; Crash in compiler when using `system.any` by accident. (#21562)ringabout2023-03-231-1/+4
| | | fixes #14255; Crash in compiler when using system.any by accident.
* fix #18977; disallow change branch of an object variant in ORC (#21526)ringabout2023-03-163-18/+59
| | | | | | | | | | | * fix #18977 disallow change branch of an object variant in ORC * check errors for goto exception * fixes conditions * fixes tests * add a test case for #18977
* fixes #19857; Exception raised in closure may be "skipped" in ORC (#21530)ringabout2023-03-161-0/+39
| | | fixes #19857; Exception raised in closure may be "skipped"
* fixes #21023; Segfault when mixing seqs, orc, variants and futures (#21497)ringabout2023-03-101-0/+61
| | | | | | | | | * fixes #21023; Segfault when mixing seqs, orc, variants and futures * fixes none of the branches were explicitly selected * add one more test * one more test
* fixes #20422; emit nimPrepareStrMutationV2 for toOpenArray to keep th… ↵Andreas Rumpf2023-03-021-0/+12
| | | | | (#21459) fixes #20422; emit nimPrepareStrMutationV2 for toOpenArray to keep the abstraction of mutable strings which have immutable string literals
* fixes #19291; implements `wasMoved` hook (#21303)ringabout2023-03-023-17/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * fixes #19291; implements `wasMoved` hook * basics * checkpoint * finish `wasMoved` * add a test for #19291 * add documentation and changelog * work `attachedWasMoved` with generics * fixes optimizer * register `=wasMoved` * handle wasMoved magcis * check another round * some patches * try `op == nil` * nicer * generate `wasMoved` before `destroy` * try again * fixes tests * default wasMoved * Update tests/destructor/tv2_cast.nim * Update tests/destructor/tv2_cast.nim * Update tests/arc/topt_refcursors.nim
* fixes #19795; fixes #11852; fixes #19974; remove parsing pipeline, Nim now ↵ringabout2023-02-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parses the whole module at one time (#21379) * fixes #19795; remove parse pipeline * isScript * fixes nimscriptapi * don't touch reorder * check script * fixes tests * it seems implicit imports of system cause troubles * access the first child of `nkStmtList` * ignore comments * minor messages * perhaps increases hloLoopDetector * the module is a stmtList, which changes the errors * fixes nimdoc * fixes tlinter * fixes nim secret tests * fixes arc_misc * fixes nim secret tests again * safe; fixes one more test * GlobalError is the root cause too * fixes parsing errors * put emit types to the cfsForwardTypes section * fixes #11852; `{.push checks:off}` now works in procs * disable navigator * fixes nimdoc * add tests for JS * fixes nimsuggest
* fixes #21171; dynamic acyclic refs need to use dyn decRef (#21184)ringabout2022-12-281-0/+77
| | | | | | | * fixes #21171; dyn destructors for acyclic inherited refs * add a test * Update compiler/liftdestructors.nim
* fix #20588 (#21104)Bung2022-12-151-0/+22
|
* fixes #20954; bounchecks for len(toOpenArray()) [backport] (#20956)ringabout2022-12-051-0/+16
| | | | | * bounchecks for len(toOpenArray()) * add a testcase
* rename `std/threads` to `std/typedthreads` (#20850)ringabout2022-11-161-1/+1
| | | | | | | | | * rename `std/threads` to `std/oldthreads` * fixes tests * rename to `typedthreads` * changelog
* fixes a long-standing ARC bug (#20849)ringabout2022-11-161-0/+12
| | | | | * fixes an ARC bug * add a testcase
* support `UncheckedArray[T]` in repr_v2.nim (#20816)Derek 呆2022-11-111-0/+8
|
* fix topt_no_cursor.nim (#20791)Bung2022-11-091-11/+22
|
* Arc global (#20768)Bung2022-11-062-1/+47
| | | | | | | | | | | | | | | * temp * unsure * fix condition * port macro arc runable examples to one file * trigger doc ci * fix Co-authored-by: ringabout <43030857+ringabout@users.noreply.github.com>
* Revert "fix arc global variable issues" (#20764)ringabout2022-11-051-1/+1
| | | | | | | * Revert "fix arc global variable issues (#20759)" This reverts commit a3d32a4176539d0829a4e868f4b005a1a71eb7ee. * trigger documentation builds
* fix arc global variable issues (#20759)Bung2022-11-051-1/+1
| | | | | * temp * unsure
* put std/threads under the umbrella of nimPreviewSlimSystem (#20711)ringabout2022-10-311-0/+3
| | | | | | | | | | | * put `std/threads` under the umbrella of `nimPreviewSlimSystem` * add changelog * fixes tests * fixes tests again * fixes tests
* fixes #20572 (#20585)Andreas Rumpf2022-10-171-0/+29
| | | | | * fixes #20572 * added a test case
* 'lock levels' are deprecated, now a noop (#20539)ringabout2022-10-111-1/+1
| | | | | * 'lock levels' are deprecated, now a noop * fixes tests
* closes #9401; add testcase (#20507)ringabout2022-10-061-0/+49
|
* closes #11267; closes #11259; closes #11085; add testcases (#20505)ringabout2022-10-061-0/+12
| | | | | | | * closes #11267; add testcase * closes #11259 * closes #11085
* fixes #19231; newFinalize doesn't work with ORC (#20291)ringabout2022-10-051-0/+18
| | | | | | | | | | | | | | | * fixes #19231; newFinalize doesn't work with ORC first make it pass tests * remove the tables dep creates a binding for finalized procs in order to handle the same symbols. It used to wrongly generat a new symbol id for the same symbol as the encountered one before * refactor and revert #14257 * de indentation * fixes tests; uses instantiated types