got rid of gToTypeInfoId

This commit is contained in:
Araq
2011-10-21 21:39:12 +02:00
parent d871cadbb3
commit ddbad192a4
3 changed files with 6 additions and 16 deletions

View File

@@ -733,21 +733,12 @@ proc genSetInfo(m: BModule, typ: PType, name: PRope) =
proc genArrayInfo(m: BModule, typ: PType, name: PRope) =
genTypeInfoAuxBase(m, typ, name, genTypeInfo(m, typ.sons[1]))
var
gToTypeInfoId: TIiTable
proc genTypeInfo(m: BModule, typ: PType): PRope =
var dataGenerated: bool
var t = getUniqueType(typ)
var id = IiTableGet(gToTypeInfoId, t.id)
if id == invalidKey:
dataGenerated = false
id = t.id # getID();
IiTablePut(gToTypeInfoId, t.id, id)
else:
dataGenerated = true
result = ropef("NTI$1", [toRope(id)])
if not ContainsOrIncl(m.typeInfoMarker, id):
# gNimDat contains all the type information nowadays:
var dataGenerated = ContainsOrIncl(gNimDat.typeInfoMarker, t.id)
result = ropef("NTI$1", [toRope(t.id)])
if not ContainsOrIncl(m.typeInfoMarker, t.id):
# declare type information structures:
discard cgsym(m, "TNimType")
discard cgsym(m, "TNimNode")

View File

@@ -966,5 +966,3 @@ proc cgenPass(): TPass =
result.process = myProcess
result.close = myClose
InitIiTable(gToTypeInfoId)

View File

@@ -16,9 +16,10 @@ Version 0.8.14
incremental compilation
-----------------------
- implement C file merge operation
- adapt thread var implementation to care about the new merge operation
- write test cases: needs test script support
- test thread var
- test DLL interfacing!
- fix remaining bugs
- write documentation
- make the compiler output a warning if linking fails with --symbolFiles:on