diff --git a/changelog.md b/changelog.md index 4e0eea1f0a..cf3fd642b0 100644 --- a/changelog.md +++ b/changelog.md @@ -245,6 +245,8 @@ provided by the operating system. - Added `then`, `catch` to `asyncjs`, for now hidden behind `-d:nimExperimentalAsyncjsThen`. +- `--newruntime` is deprecated. + ## Tool changes - The rst parser now supports markdown table syntax. diff --git a/compiler/commands.nim b/compiler/commands.nim index 7ee2c04598..abe1970dcb 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -891,6 +891,7 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo; if conf != nil: conf.cppDefine(arg) of "newruntime": + warningDeprecated(conf, info, "newruntime is deprecated, use arc/orc instead!") expectNoArg(conf, switch, arg, pass, info) if pass in {passCmd2, passPP}: doAssert(conf != nil) diff --git a/doc/advopt.txt b/doc/advopt.txt index 86d9cde1ef..02476a1acc 100644 --- a/doc/advopt.txt +++ b/doc/advopt.txt @@ -25,7 +25,6 @@ Runtime checks (see -x): --floatChecks:on|off turn all floating point (NaN/Inf) checks on|off --nanChecks:on|off turn NaN checks on|off --infChecks:on|off turn Inf checks on|off - --refChecks:on|off turn ref checks on|off (only for --newruntime) Advanced options: -o:FILE, --out:FILE set the output filename diff --git a/doc/nimc.rst b/doc/nimc.rst index f92e406171..ea173691f5 100644 --- a/doc/nimc.rst +++ b/doc/nimc.rst @@ -431,8 +431,8 @@ Define Effect ``useMalloc`` Makes Nim use C's `malloc`:idx: instead of Nim's own memory manager, albeit prefixing each allocation with its size to support clearing memory on reallocation. - This only works with ``gc:none`` and - with ``--newruntime``. + This only works with ``gc:none``, ``gc:arc`` and + ``--gc:orc``. ``useRealtimeGC`` Enables support of Nim's GC for *soft* realtime systems. See the documentation of the `gc `_ for further information. diff --git a/tests/arc/t17173.nim b/tests/arc/t17173.nim index 5d868d9d4c..0acd886a24 100644 --- a/tests/arc/t17173.nim +++ b/tests/arc/t17173.nim @@ -1,5 +1,5 @@ discard """ - matrix: "--gc:refc; --gc:arc; --newruntime" + matrix: "--gc:refc; --gc:arc" """ import std/strbasics diff --git a/tests/arc/tcomputedgoto.nim b/tests/arc/tcomputedgoto.nim index 8af17b56ea..541a748c62 100644 --- a/tests/arc/tcomputedgoto.nim +++ b/tests/arc/tcomputedgoto.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim c --newruntime $file''' + cmd: '''nim c --gc:arc $file''' output: '''2 2''' """ diff --git a/tests/arc/tcomputedgotocopy.nim b/tests/arc/tcomputedgotocopy.nim index 78cb6c5c00..8337123ba0 100644 --- a/tests/arc/tcomputedgotocopy.nim +++ b/tests/arc/tcomputedgotocopy.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim c --newruntime $file''' + cmd: '''nim c --gc:arc $file''' output: '''2 2''' """ diff --git a/tests/destructor/t12037.nim b/tests/destructor/t12037.nim index 1a7d536cc6..c2c41dfb54 100644 --- a/tests/destructor/t12037.nim +++ b/tests/destructor/t12037.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim c --newruntime $file''' + cmd: '''nim c --gc:arc $file''' output: ''' showing original type, length, and contents seq[int] 1 @[42] copy length and contents 1 @[42] diff --git a/tests/destructor/tarray_indexing.nim b/tests/destructor/tarray_indexing.nim index 7efd5a00c8..657101c4d2 100644 --- a/tests/destructor/tarray_indexing.nim +++ b/tests/destructor/tarray_indexing.nim @@ -1,7 +1,7 @@ discard """ output: '''allocating 1048576 65536 filling page from 1048576 len 65536''' - cmd: '''nim c --newruntime $file''' + cmd: '''nim c --gc:arc $file''' """ # bug #12669 diff --git a/tests/destructor/tcaseobj_transitions.nim b/tests/destructor/tcaseobj_transitions.nim index 4e203f4efd..61464101f0 100644 --- a/tests/destructor/tcaseobj_transitions.nim +++ b/tests/destructor/tcaseobj_transitions.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim c --newruntime $file''' + cmd: '''nim c --gc:arc $file''' output: '''no crash''' """ diff --git a/tests/destructor/tgcdestructors.nim b/tests/destructor/tgcdestructors.nim index 4731bf694f..07a3731a09 100644 --- a/tests/destructor/tgcdestructors.nim +++ b/tests/destructor/tgcdestructors.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim c -d:nimAllocStats --newruntime $file''' + cmd: '''nim c -d:nimAllocStats --gc:arc $file''' output: '''hi ho ha diff --git a/tests/destructor/tglobaldestructor.nim b/tests/destructor/tglobaldestructor.nim index 403f670a08..4d002a092a 100644 --- a/tests/destructor/tglobaldestructor.nim +++ b/tests/destructor/tglobaldestructor.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim c --newruntime $file''' + cmd: '''nim c --gc:arc $file''' output: '''(v: 42) igotdestroyed''' """ diff --git a/tests/destructor/tnewruntime_strutils.nim b/tests/destructor/tnewruntime_strutils.nim index 0725718d75..8e5378f77d 100644 --- a/tests/destructor/tnewruntime_strutils.nim +++ b/tests/destructor/tnewruntime_strutils.nim @@ -1,6 +1,6 @@ discard """ valgrind: true - cmd: '''nim c -d:nimAllocStats --newruntime -d:useMalloc $file''' + cmd: '''nim c -d:nimAllocStats --gc:arc -d:useMalloc $file''' output: ''' @[(input: @["KXSC", "BGMC"]), (input: @["PXFX"]), (input: @["WXRQ", "ZSCZD"])] 14 diff --git a/tests/destructor/towned_binary_tree.nim b/tests/destructor/towned_binary_tree.nim index 320e33759e..fb635e7c67 100644 --- a/tests/destructor/towned_binary_tree.nim +++ b/tests/destructor/towned_binary_tree.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim c -d:nimAllocStats --newruntime $file''' + cmd: '''nim c -d:nimAllocStats --gc:arc $file''' output: '''31665 (allocCount: 33334, deallocCount: 33334)''' """ diff --git a/tests/destructor/tsimpleclosure.nim b/tests/destructor/tsimpleclosure.nim index 35c57a6342..9626dd6f85 100644 --- a/tests/destructor/tsimpleclosure.nim +++ b/tests/destructor/tsimpleclosure.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim c -d:nimAllocStats --newruntime $file''' + cmd: '''nim c -d:nimAllocStats --gc:arc $file''' output: '''a b 70 hello diff --git a/tests/destructor/tv2_cast.nim b/tests/destructor/tv2_cast.nim index 9c05b2ae17..ef0b3a9362 100644 --- a/tests/destructor/tv2_cast.nim +++ b/tests/destructor/tv2_cast.nim @@ -1,5 +1,5 @@ discard """ - cmd: '''nim c --newruntime $file''' + cmd: '''nim c --gc:arc $file''' output: '''@[1] @[116, 101, 115, 116] @[1953719668, 875770417]'''