codgen refactoring: prepare for alternative string/seq implementations
This commit is contained in:
parent
a9e96888d0
commit
b5a96d28c7
5 changed files with 29 additions and 21 deletions
|
|
@ -235,6 +235,12 @@ proc getTempName(m: BModule): Rope =
|
|||
result = m.tmpBase & rope(m.labels)
|
||||
inc m.labels
|
||||
|
||||
proc lenField(p: BProc): Rope =
|
||||
result = rope(if p.module.compileToCpp: "len" else: "Sup.len")
|
||||
|
||||
proc dataField(p: BProc): Rope =
|
||||
result = rope"->data"
|
||||
|
||||
include ccgliterals
|
||||
include ccgtypes
|
||||
|
||||
|
|
@ -495,9 +501,6 @@ proc initLocExprSingleUse(p: BProc, e: PNode, result: var TLoc) =
|
|||
result.flags.incl lfSingleUse
|
||||
expr(p, e, result)
|
||||
|
||||
proc lenField(p: BProc): Rope =
|
||||
result = rope(if p.module.compileToCpp: "len" else: "Sup.len")
|
||||
|
||||
include ccgcalls, "ccgstmts.nim"
|
||||
|
||||
proc initFrame(p: BProc, procname, filename: Rope): Rope =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue