got rid of gToTypeInfoId
This commit is contained in:
parent
d871cadbb3
commit
ddbad192a4
3 changed files with 6 additions and 16 deletions
|
|
@ -733,21 +733,12 @@ proc genSetInfo(m: BModule, typ: PType, name: PRope) =
|
||||||
proc genArrayInfo(m: BModule, typ: PType, name: PRope) =
|
proc genArrayInfo(m: BModule, typ: PType, name: PRope) =
|
||||||
genTypeInfoAuxBase(m, typ, name, genTypeInfo(m, typ.sons[1]))
|
genTypeInfoAuxBase(m, typ, name, genTypeInfo(m, typ.sons[1]))
|
||||||
|
|
||||||
var
|
|
||||||
gToTypeInfoId: TIiTable
|
|
||||||
|
|
||||||
proc genTypeInfo(m: BModule, typ: PType): PRope =
|
proc genTypeInfo(m: BModule, typ: PType): PRope =
|
||||||
var dataGenerated: bool
|
|
||||||
var t = getUniqueType(typ)
|
var t = getUniqueType(typ)
|
||||||
var id = IiTableGet(gToTypeInfoId, t.id)
|
# gNimDat contains all the type information nowadays:
|
||||||
if id == invalidKey:
|
var dataGenerated = ContainsOrIncl(gNimDat.typeInfoMarker, t.id)
|
||||||
dataGenerated = false
|
result = ropef("NTI$1", [toRope(t.id)])
|
||||||
id = t.id # getID();
|
if not ContainsOrIncl(m.typeInfoMarker, t.id):
|
||||||
IiTablePut(gToTypeInfoId, t.id, id)
|
|
||||||
else:
|
|
||||||
dataGenerated = true
|
|
||||||
result = ropef("NTI$1", [toRope(id)])
|
|
||||||
if not ContainsOrIncl(m.typeInfoMarker, id):
|
|
||||||
# declare type information structures:
|
# declare type information structures:
|
||||||
discard cgsym(m, "TNimType")
|
discard cgsym(m, "TNimType")
|
||||||
discard cgsym(m, "TNimNode")
|
discard cgsym(m, "TNimNode")
|
||||||
|
|
|
||||||
|
|
@ -966,5 +966,3 @@ proc cgenPass(): TPass =
|
||||||
result.process = myProcess
|
result.process = myProcess
|
||||||
result.close = myClose
|
result.close = myClose
|
||||||
|
|
||||||
InitIiTable(gToTypeInfoId)
|
|
||||||
|
|
||||||
|
|
|
||||||
3
todo.txt
3
todo.txt
|
|
@ -16,9 +16,10 @@ Version 0.8.14
|
||||||
incremental compilation
|
incremental compilation
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
- implement C file merge operation
|
|
||||||
- adapt thread var implementation to care about the new merge operation
|
- adapt thread var implementation to care about the new merge operation
|
||||||
- write test cases: needs test script support
|
- write test cases: needs test script support
|
||||||
|
- test thread var
|
||||||
|
- test DLL interfacing!
|
||||||
- fix remaining bugs
|
- fix remaining bugs
|
||||||
- write documentation
|
- write documentation
|
||||||
- make the compiler output a warning if linking fails with --symbolFiles:on
|
- make the compiler output a warning if linking fails with --symbolFiles:on
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue