diff options
author | Araq <rumpf_a@web.de> | 2015-02-09 00:08:14 +0100 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-02-09 00:08:55 +0100 |
commit | ecd0dea091cfddacb2fb28c9fa4b716b571e8007 (patch) | |
tree | 84fd9b0fdbd7fe8f22194ce82d586a221aebcd79 /compiler/vmgen.nim | |
parent | 9431b734b4751b804a0e07e6fe52f29dea0b6b1c (diff) | |
download | Nim-ecd0dea091cfddacb2fb28c9fa4b716b571e8007.tar.gz |
tables work in 'const' sections; echo supports 'nil' strings; minor cleanups
Diffstat (limited to 'compiler/vmgen.nim')
-rw-r--r-- | compiler/vmgen.nim | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/vmgen.nim b/compiler/vmgen.nim index fe6526a34..70f81bc72 100644 --- a/compiler/vmgen.nim +++ b/compiler/vmgen.nim @@ -604,7 +604,8 @@ proc genNarrowU(c: PCtx; n: PNode; dest: TDest) = let t = skipTypes(n.typ, abstractVar-{tyTypeDesc}) # uint is uint64 in the VM, we we only need to mask the result for # other unsigned types: - if t.kind in {tyUInt8..tyUInt32, tyInt8..tyInt32}: + if t.kind in {tyUInt8..tyUInt32, tyInt8..tyInt32} or + (t.kind == tyInt and t.size == 4): c.gABC(n, opcNarrowU, dest, TRegister(t.size*8)) proc genBinaryABCnarrow(c: PCtx; n: PNode; dest: var TDest; opc: TOpcode) = |