summary refs log tree commit diff stats
path: root/compiler/ccgexprs.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-01-10 23:17:33 +0100
committerGitHub <noreply@github.com>2020-01-10 23:17:33 +0100
commit767592a3c350fca6fc6f01f519a814c0498167f9 (patch)
treeeba566141f64667a068e073cc0ac7c33e927693c /compiler/ccgexprs.nim
parentc0973d1b471644569d3ef459115afc675eb64544 (diff)
downloadNim-767592a3c350fca6fc6f01f519a814c0498167f9.tar.gz
more arc features (#13098)
* config update
* ARC now supports 'repr' and 'new' with finalizers is supported
Diffstat (limited to 'compiler/ccgexprs.nim')
-rw-r--r--compiler/ccgexprs.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim
index 6d5f25567..13e075bf4 100644
--- a/compiler/ccgexprs.nim
+++ b/compiler/ccgexprs.nim
@@ -2172,7 +2172,11 @@ proc genMagicExpr(p: BProc, e: PNode, d: var TLoc, op: TMagic) =
       genRepr(p, e, d)
   of mOf: genOf(p, e, d)
   of mNew: genNew(p, e)
-  of mNewFinalize: genNewFinalize(p, e)
+  of mNewFinalize:
+    if optTinyRtti in p.config.globalOptions:
+      genNew(p, e)
+    else:
+      genNewFinalize(p, e)
   of mNewSeq: genNewSeq(p, e)
   of mNewSeqOfCap: genNewSeqOfCap(p, e, d)
   of mSizeOf: