remove add stop from macro assembler

This commit is contained in:
andri lim 2019-02-22 15:56:40 +07:00 committed by zah
parent 47a8089ff8
commit 7ff9a7f02e
1 changed files with 0 additions and 6 deletions

View File

@ -142,7 +142,6 @@ proc addOpCode(code: var seq[byte], node, params: NimNode) =
proc parseCode(codes: NimNode): seq[byte] =
let emptyNode = newEmptyNode()
codes.expectKind nnkStmtList
var addStop = true
for pc, line in codes:
line.expectKind({nnkCommand, nnkIdent, nnkStrLit})
if line.kind == nnkStrLit:
@ -151,8 +150,6 @@ proc parseCode(codes: NimNode): seq[byte] =
let sym = bindSym(line)
validateOpcode(sym)
result.addOpCode(sym, emptyNode)
if pc == codes.len - 1:
addStop = $sym != "Stop"
elif line.kind == nnkCommand:
let sym = bindSym(line[0])
validateOpcode(sym)
@ -163,9 +160,6 @@ proc parseCode(codes: NimNode): seq[byte] =
else:
error("unknown syntax: " & line.toStrLit.strVal, line)
if addStop:
result.addOpCode(bindSym"Stop", emptyNode)
proc generateVMProxy(boa: Assembler): NimNode =
let
vmProxy = genSym(nskProc, "vmProxy")