diff options
author | Aman Gupta <aman@tmm1.net> | 2015-10-13 15:25:40 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2015-10-13 15:25:40 -0700 |
commit | e2dbf222e60e00eb3f321151f4f206ed9c606a6c (patch) | |
tree | c513c0051fcb789add33cd3daaaab42344ee1da4 /compiler/vmhooks.nim | |
parent | c3415a27d77f302be4f41d5f9bbcdf7c0dd3e80a (diff) | |
parent | 7f4f37eaa20ea8aa5cf8c34e497aaa8245c590b3 (diff) | |
download | Nim-e2dbf222e60e00eb3f321151f4f206ed9c606a6c.tar.gz |
Merge remote-tracking branch 'origin/devel' into appveyor
Diffstat (limited to 'compiler/vmhooks.nim')
-rw-r--r-- | compiler/vmhooks.nim | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/vmhooks.nim b/compiler/vmhooks.nim index 5dd27feda..576b0565f 100644 --- a/compiler/vmhooks.nim +++ b/compiler/vmhooks.nim @@ -30,6 +30,14 @@ proc setResult*(a: VmArgs; v: string) = s[a.ra].node = newNode(nkStrLit) s[a.ra].node.strVal = v +proc setResult*(a: VmArgs; n: PNode) = + var s: seq[TFullReg] + move(s, cast[seq[TFullReg]](a.slots)) + if s[a.ra].kind != rkNode: + myreset(s[a.ra]) + s[a.ra].kind = rkNode + s[a.ra].node = n + proc setResult*(a: VmArgs; v: seq[string]) = var s: seq[TFullReg] move(s, cast[seq[TFullReg]](a.slots)) |