emerald project has a chance of working
This commit is contained in:
parent
e205a9e3af
commit
9275d5c617
2 changed files with 23 additions and 13 deletions
|
|
@ -120,10 +120,10 @@ template decodeBx(k: expr) {.immediate, dirty.} =
|
|||
template move(a, b: expr) {.immediate, dirty.} = system.shallowCopy(a, b)
|
||||
# XXX fix minor 'shallowCopy' overloading bug in compiler
|
||||
|
||||
proc createStrKeepNode(x: var TFullReg) =
|
||||
proc createStrKeepNode(x: var TFullReg; keepNode=true) =
|
||||
if x.node.isNil:
|
||||
x.node = newNode(nkStrLit)
|
||||
elif x.node.kind == nkNilLit:
|
||||
elif x.node.kind == nkNilLit and keepNode:
|
||||
when defined(useNodeIds):
|
||||
let id = x.node.id
|
||||
system.reset(x.node[])
|
||||
|
|
@ -385,6 +385,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
|||
#if c.traceActive:
|
||||
# echo "PC ", pc, " ", c.code[pc].opcode, " ra ", ra
|
||||
# message(c.debug[pc], warnUser, "Trace")
|
||||
|
||||
case instr.opcode
|
||||
of opcEof: return regs[ra]
|
||||
of opcRet:
|
||||
|
|
@ -407,8 +408,8 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
|||
decodeB(rkInt)
|
||||
regs[ra].intVal = regs[rb].intVal
|
||||
of opcAsgnStr:
|
||||
decodeB(rkNode)
|
||||
createStrKeepNode regs[ra]
|
||||
decodeBC(rkNode)
|
||||
createStrKeepNode regs[ra], rc != 0
|
||||
regs[ra].node.strVal = regs[rb].node.strVal
|
||||
of opcAsgnFloat:
|
||||
decodeB(rkFloat)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue