diff options
Diffstat (limited to 'compiler/ccgstmts.nim')
-rw-r--r-- | compiler/ccgstmts.nim | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/compiler/ccgstmts.nim b/compiler/ccgstmts.nim index 8c419caac..7269b337c 100644 --- a/compiler/ccgstmts.nim +++ b/compiler/ccgstmts.nim @@ -1530,20 +1530,21 @@ proc genDiscriminantCheck(p: BProc, a, tmp: TLoc, objtype: PType, [rdLoc(a), rdLoc(tmp), discriminatorTableName(p.module, t, field), intLiteral(toInt64(lengthOrd(p.config, field.typ))+1)]) -proc genCaseObjDiscMapping(p: BProc, e: PNode, t: PType, field: PSym; d: var TLoc) = - const ObjDiscMappingProcSlot = -5 - var theProc: PSym = nil - for idx, p in items(t.methods): - if idx == ObjDiscMappingProcSlot: - theProc = p - break - if theProc == nil: - theProc = genCaseObjDiscMapping(t, field, e.info, p.module.g.graph, p.module.idgen) - t.methods.add((ObjDiscMappingProcSlot, theProc)) - var call = newNodeIT(nkCall, e.info, getSysType(p.module.g.graph, e.info, tyUInt8)) - call.add newSymNode(theProc) - call.add e - expr(p, call, d) +when false: + proc genCaseObjDiscMapping(p: BProc, e: PNode, t: PType, field: PSym; d: var TLoc) = + const ObjDiscMappingProcSlot = -5 + var theProc: PSym = nil + for idx, p in items(t.methods): + if idx == ObjDiscMappingProcSlot: + theProc = p + break + if theProc == nil: + theProc = genCaseObjDiscMapping(t, field, e.info, p.module.g.graph, p.module.idgen) + t.methods.add((ObjDiscMappingProcSlot, theProc)) + var call = newNodeIT(nkCall, e.info, getSysType(p.module.g.graph, e.info, tyUInt8)) + call.add newSymNode(theProc) + call.add e + expr(p, call, d) proc asgnFieldDiscriminant(p: BProc, e: PNode) = var a, tmp: TLoc |