code gen bugfixes; marshal.nim implemented
This commit is contained in:
parent
db0a4a9f86
commit
990dc2d715
21 changed files with 725 additions and 422 deletions
|
|
@ -253,7 +253,8 @@ proc rdLoc(a: TLoc): PRope =
|
|||
|
||||
proc addrLoc(a: TLoc): PRope =
|
||||
result = a.r
|
||||
if lfIndirect notin a.flags: result = con("&", result)
|
||||
if lfIndirect notin a.flags and mapType(a.t) != ctArray:
|
||||
result = con("&", result)
|
||||
|
||||
proc rdCharLoc(a: TLoc): PRope =
|
||||
# read a location that may need a char-cast:
|
||||
|
|
@ -333,7 +334,7 @@ proc initVariable(p: BProc, v: PSym) =
|
|||
zeroVar(p, v.loc, b)
|
||||
|
||||
proc initTemp(p: BProc, tmp: var TLoc) =
|
||||
if containsGarbageCollectedRef(tmp.t):
|
||||
if containsGarbageCollectedRef(tmp.t) or isInvalidReturnType(tmp.t):
|
||||
zeroTemp(p, tmp)
|
||||
|
||||
proc getTemp(p: BProc, t: PType, result: var TLoc) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue