codgen refactoring: prepare for alternative string/seq implementations

This commit is contained in:
Andreas Rumpf 2018-06-29 11:34:39 +02:00
commit b5a96d28c7
5 changed files with 29 additions and 21 deletions

View file

@ -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 =