Merge branch 'devel' of github.com:nim-lang/Nim into devel

This commit is contained in:
Andreas Rumpf 2016-07-06 16:48:14 +02:00
commit 17d97462cf
25 changed files with 3914 additions and 1574 deletions

View file

@ -516,8 +516,11 @@ proc genCall(c: PCtx; n: PNode; dest: var TDest) =
if dest < 0 and not isEmptyType(n.typ): dest = getTemp(c, n.typ)
let x = c.getTempRange(n.len, slotTempUnknown)
# varargs need 'opcSetType' for the FFI support:
let fntyp = n.sons[0].typ
let fntyp = skipTypes(n.sons[0].typ, abstractInst)
for i in 0.. <n.len:
if i > 0 and i < sonsLen(fntyp):
let paramType = fntyp.n.sons[i]
if paramType.typ.isCompileTimeOnly: continue
var r: TRegister = x+i
c.gen(n.sons[i], r)
if i >= fntyp.len: