refactoring: TLoc knows the node it originated from; it is planned to use this to produce better C code (move optimizations)
This commit is contained in:
parent
a04c7d8b38
commit
405b9c8a85
8 changed files with 215 additions and 196 deletions
|
|
@ -181,10 +181,11 @@ proc encodeLoc(w: PRodWriter, loc: TLoc, result: var string) =
|
|||
if loc.flags != {}:
|
||||
add(result, '$')
|
||||
encodeVInt(cast[int32](loc.flags), result)
|
||||
if loc.t != nil:
|
||||
if loc.lode != nil:
|
||||
add(result, '^')
|
||||
encodeVInt(cast[int32](loc.t.id), result)
|
||||
pushType(w, loc.t)
|
||||
encodeNode(w, unknownLineInfo(), loc.lode, result)
|
||||
#encodeVInt(cast[int32](loc.t.id), result)
|
||||
#pushType(w, loc.t)
|
||||
if loc.r != nil:
|
||||
add(result, '!')
|
||||
encodeStr($loc.r, result)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue