diff options
author | Araq <rumpf_a@web.de> | 2013-05-03 23:51:43 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2013-05-03 23:51:43 +0200 |
commit | fa0a327dd6f8f18ce935f6bd8993e4af474d1231 (patch) | |
tree | 444367f8069a14968bbc4c9e1d6986c281c6862b /compiler/cgen.nim | |
parent | 8e5d6834cc51062a9d249fd7730432d32b7f6adc (diff) | |
download | Nim-fa0a327dd6f8f18ce935f6bd8993e4af474d1231.tar.gz |
completed expr/stmt unification
Diffstat (limited to 'compiler/cgen.nim')
-rw-r--r-- | compiler/cgen.nim | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 753576aa0..cb796e456 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -552,9 +552,21 @@ proc genVarPrototype(m: BModule, sym: PSym) proc requestConstImpl(p: BProc, sym: PSym) proc genProc(m: BModule, prc: PSym) proc genStmts(p: BProc, t: PNode) +proc expr(p: BProc, n: PNode, d: var TLoc) proc genProcPrototype(m: BModule, sym: PSym) +proc putLocIntoDest(p: BProc, d: var TLoc, s: TLoc) +proc genAssignment(p: BProc, dest, src: TLoc, flags: TAssignmentFlags) +proc intLiteral(i: biggestInt): PRope +proc genLiteral(p: BProc, n: PNode): PRope -include "ccgexprs.nim", "ccgstmts.nim" +proc initLocExpr(p: BProc, e: PNode, result: var TLoc) = + initLoc(result, locNone, e.typ, OnUnknown) + expr(p, e, result) + +proc lenField: PRope {.inline.} = + result = toRope(if gCmd != cmdCompileToCpp: "Sup.len" else: "len") + +include ccgcalls, "ccgstmts.nim", "ccgexprs.nim" # ----------------------------- dynamic library handling ----------------- # We don't finalize dynamic libs as this does the OS for us. |