code cleanup and getting rid of debugging comments that nihilated the sighashes approach
This commit is contained in:
parent
04b91b0d3b
commit
02d39277eb
1 changed files with 3 additions and 14 deletions
|
|
@ -114,10 +114,6 @@ proc mangleName(m: BModule; s: PSym): Rope =
|
||||||
result.add "0"
|
result.add "0"
|
||||||
else:
|
else:
|
||||||
add(result, m.idOrSig(s))
|
add(result, m.idOrSig(s))
|
||||||
#add(result, ~"_")
|
|
||||||
#add(result, rope(hashOwner(s).BiggestInt))
|
|
||||||
#if s.typ != nil and s.typ.callConv == ccInline:
|
|
||||||
# result.add "/* " & rope(m.module.name.s) & " */"
|
|
||||||
s.loc.r = result
|
s.loc.r = result
|
||||||
|
|
||||||
proc typeName(typ: PType): Rope =
|
proc typeName(typ: PType): Rope =
|
||||||
|
|
@ -340,8 +336,6 @@ proc getTypeForward(m: BModule, typ: PType; sig: SigHash): Rope =
|
||||||
result = getTypeName(m, typ, sig)
|
result = getTypeName(m, typ, sig)
|
||||||
m.forwTypeCache[sig] = result
|
m.forwTypeCache[sig] = result
|
||||||
if not isImportedType(concrete):
|
if not isImportedType(concrete):
|
||||||
addf(m.s[cfsForwardTypes], "/* getTypeForward: $1 $2 $3 */", [rope typeToString typ,
|
|
||||||
rope typ.id, rope($typ.kind)])
|
|
||||||
addf(m.s[cfsForwardTypes], getForwardStructFormat(m),
|
addf(m.s[cfsForwardTypes], getForwardStructFormat(m),
|
||||||
[structOrUnion(typ), result])
|
[structOrUnion(typ), result])
|
||||||
doAssert m.forwTypeCache[sig] == result
|
doAssert m.forwTypeCache[sig] == result
|
||||||
|
|
@ -766,8 +760,6 @@ proc getTypeDescAux(m: BModule, origTyp: PType, check: var IntSet): Rope =
|
||||||
result = getTypeName(m, origTyp, sig)
|
result = getTypeName(m, origTyp, sig)
|
||||||
m.forwTypeCache[sig] = result
|
m.forwTypeCache[sig] = result
|
||||||
if not isImportedType(t):
|
if not isImportedType(t):
|
||||||
addf(m.s[cfsForwardTypes], "/* tyObject: $1 $2 $3 */", [rope typeToString origTyp,
|
|
||||||
rope t.id, rope m.module.id])
|
|
||||||
addf(m.s[cfsForwardTypes], getForwardStructFormat(m),
|
addf(m.s[cfsForwardTypes], getForwardStructFormat(m),
|
||||||
[structOrUnion(t), result])
|
[structOrUnion(t), result])
|
||||||
assert m.forwTypeCache[sig] == result
|
assert m.forwTypeCache[sig] == result
|
||||||
|
|
@ -882,8 +874,7 @@ proc genTypeInfoAuxBase(m: BModule; typ, origType: PType; name, base: Rope) =
|
||||||
addf(m.s[cfsTypeInit3], "$1.name = $2;$n",
|
addf(m.s[cfsTypeInit3], "$1.name = $2;$n",
|
||||||
[name, makeCstring typeToString(origType, preferName)])
|
[name, makeCstring typeToString(origType, preferName)])
|
||||||
discard cgsym(m, "TNimType")
|
discard cgsym(m, "TNimType")
|
||||||
addf(m.s[cfsVars], "TNimType $1; /* $2 */$n",
|
addf(m.s[cfsVars], "TNimType $1;$n", [name])
|
||||||
[name, rope(typeToString(typ))])
|
|
||||||
|
|
||||||
proc genTypeInfoAux(m: BModule, typ, origType: PType, name: Rope) =
|
proc genTypeInfoAux(m: BModule, typ, origType: PType, name: Rope) =
|
||||||
var base: Rope
|
var base: Rope
|
||||||
|
|
@ -1098,8 +1089,7 @@ proc genTypeInfo(m: BModule, t: PType): Rope =
|
||||||
if result != nil:
|
if result != nil:
|
||||||
discard cgsym(m, "TNimType")
|
discard cgsym(m, "TNimType")
|
||||||
discard cgsym(m, "TNimNode")
|
discard cgsym(m, "TNimNode")
|
||||||
addf(m.s[cfsVars], "extern TNimType $1; /* $2 */$n",
|
addf(m.s[cfsVars], "extern TNimType $1;$n", [result])
|
||||||
[result, rope(typeToString(t))])
|
|
||||||
#return "(&".rope & result & ")".rope
|
#return "(&".rope & result & ")".rope
|
||||||
#result = "NTI$1" % [rope($sig)]
|
#result = "NTI$1" % [rope($sig)]
|
||||||
# also store in local type section:
|
# also store in local type section:
|
||||||
|
|
@ -1116,8 +1106,7 @@ proc genTypeInfo(m: BModule, t: PType): Rope =
|
||||||
# reference the type info as extern here
|
# reference the type info as extern here
|
||||||
discard cgsym(m, "TNimType")
|
discard cgsym(m, "TNimType")
|
||||||
discard cgsym(m, "TNimNode")
|
discard cgsym(m, "TNimNode")
|
||||||
addf(m.s[cfsVars], "extern TNimType $1; /* $2 */$n",
|
addf(m.s[cfsVars], "extern TNimType $1;$n", [result])
|
||||||
[result, rope(typeToString(t))])
|
|
||||||
return "(&".rope & result & ")".rope
|
return "(&".rope & result & ")".rope
|
||||||
|
|
||||||
m.g.typeInfoMarker[sig] = result
|
m.g.typeInfoMarker[sig] = result
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue