mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
got rid of gToTypeInfoId
This commit is contained in:
@@ -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")
|
||||
|
||||
@@ -966,5 +966,3 @@ proc cgenPass(): TPass =
|
||||
result.process = myProcess
|
||||
result.close = myClose
|
||||
|
||||
InitIiTable(gToTypeInfoId)
|
||||
|
||||
|
||||
3
todo.txt
3
todo.txt
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user