[vm] refactor stdlib.marshal.load (#19905)
refactor stdlib.marshal.load
This commit is contained in:
parent
ef2dd2e473
commit
332aa0af75
1 changed files with 1 additions and 17 deletions
|
|
@ -364,21 +364,5 @@ proc registerAdditionalOps*(c: PCtx) =
|
||||||
let typ = a.getNode(0).typ
|
let typ = a.getNode(0).typ
|
||||||
let p = a.getReg(1)
|
let p = a.getReg(1)
|
||||||
var res: string
|
var res: string
|
||||||
|
storeAny(res, typ, regToNode(p[]), c.config)
|
||||||
var node: PNode
|
|
||||||
case p.kind
|
|
||||||
of rkNone:
|
|
||||||
node = newNode(nkEmpty)
|
|
||||||
of rkInt:
|
|
||||||
node = newIntNode(nkIntLit, p.intVal)
|
|
||||||
of rkFloat:
|
|
||||||
node = newFloatNode(nkFloatLit, p.floatVal)
|
|
||||||
of rkNode:
|
|
||||||
node = p.node
|
|
||||||
of rkRegisterAddr:
|
|
||||||
node = p.regAddr.node
|
|
||||||
of rkNodeAddr:
|
|
||||||
node = p.nodeAddr[]
|
|
||||||
|
|
||||||
storeAny(res, typ, node, c.config)
|
|
||||||
setResult(a, res)
|
setResult(a, res)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue