remove nosinks hacks from compiler (#21469)

This commit is contained in:
ringabout 2023-03-04 20:07:33 +08:00 • committed by GitHub
commit d950e5f3a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 13 additions and 13 deletions

View file

@ -1893,7 +1893,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
var error: string
let ast = parseString(regs[rb].node.strVal, c.cache, c.config,
regs[rc].node.strVal, 0,
proc (conf: ConfigRef; info: TLineInfo; msg: TMsgKind; arg: string) {.nosinks.} =
proc (conf: ConfigRef; info: TLineInfo; msg: TMsgKind; arg: string) =
if error.len == 0 and msg <= errMax:
error = formatMsg(conf, info, msg, arg))
if error.len > 0:
@ -1908,7 +1908,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
var error: string
let ast = parseString(regs[rb].node.strVal, c.cache, c.config,
regs[rc].node.strVal, 0,
proc (conf: ConfigRef; info: TLineInfo; msg: TMsgKind; arg: string) {.nosinks.} =
proc (conf: ConfigRef; info: TLineInfo; msg: TMsgKind; arg: string) =
if error.len == 0 and msg <= errMax:
error = formatMsg(conf, info, msg, arg))
if error.len > 0:
@ -2309,7 +2309,7 @@ proc setupGlobalCtx*(module: PSym; graph: ModuleGraph; idgen: IdGenerator) =
else:
refresh(PCtx graph.vm, module, idgen)
proc setupEvalGen*(graph: ModuleGraph; module: PSym; idgen: IdGenerator): PPassContext {.nosinks.} =
proc setupEvalGen*(graph: ModuleGraph; module: PSym; idgen: IdGenerator): PPassContext =
#var c = newEvalContext(module, emRepl)
#c.features = {allowCast, allowInfiniteLoops}
#pushStackFrame(c, newStackFrame())