remove tmpFramePtr when optStackTrace is absent (#19649)

(cherry picked from commit 84ac003519)
This commit is contained in:
flywind
2022-03-26 15:57:29 +08:00
committed by narimiran
parent b13dba2c19
commit 2dbceb319c

View File

@@ -771,10 +771,6 @@ proc genTry(p: PProc, n: PNode, r: var TCompRes) =
if catchBranchesExist:
p.body.add("++excHandler;\L")
var tmpFramePtr = rope"F"
if optStackTrace notin p.options:
tmpFramePtr = p.getTemp(true)
if hasFrameInfo(p):
line(p, tmpFramePtr & " = framePtr;\L")
lineF(p, "try {$n", [])
var a: TCompRes
gen(p, n[0], a)