diff options
author | Araq <rumpf_a@web.de> | 2019-04-26 20:33:58 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-04-26 20:33:58 +0200 |
commit | 8e27bddb97cb5629c35807c81ead3da58a09ebcc (patch) | |
tree | b4ad2acbebc7a915175fd61f60d4bdb5350dcbd1 /compiler | |
parent | b350a9fc52d67cabc778887d8f81d0332eb9db91 (diff) | |
download | Nim-8e27bddb97cb5629c35807c81ead3da58a09ebcc.tar.gz |
newruntime: make 'discard new RootObj' work
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ccgstmts.nim | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index 9d7f835ab..abddb7c6c 100644 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -227,8 +227,9 @@ proc blockLeaveActions(p: BProc, howManyTrys, howManyExcepts: int) = if not p.module.compileToCpp or optNoCppExceptions in p.config.globalOptions: # Pop exceptions that was handled by the # except-blocks we are in - for i in countdown(howManyExcepts-1, 0): - linefmt(p, cpsStmts, "#popCurrentException();$n", []) + if not p.noSafePoints: + for i in countdown(howManyExcepts-1, 0): + linefmt(p, cpsStmts, "#popCurrentException();$n", []) proc genGotoState(p: BProc, n: PNode) = # we resist the temptation to translate it into duff's device as it later |