minor bug fixes to make some tests green
This commit is contained in:
parent
8be307713e
commit
41cbd1c980
3 changed files with 8 additions and 4 deletions
|
|
@ -603,11 +603,18 @@ type
|
||||||
|
|
||||||
PLib* = ref TLib
|
PLib* = ref TLib
|
||||||
TSym* = object of TIdObj
|
TSym* = object of TIdObj
|
||||||
|
# proc and type instantiations are cached in the generic symbol
|
||||||
case kind*: TSymKind
|
case kind*: TSymKind
|
||||||
of skType: # generic instantiation caches
|
of skType:
|
||||||
typeInstCache*: seq[PType]
|
typeInstCache*: seq[PType]
|
||||||
of routineKinds:
|
of routineKinds:
|
||||||
procInstCache*: seq[PInstantiation]
|
procInstCache*: seq[PInstantiation]
|
||||||
|
of skModule:
|
||||||
|
# modules keep track of the generic symbols they use from other modules.
|
||||||
|
# this is because in incremental compilation, when a module is about to
|
||||||
|
# be replaced with a newer version, we must decrement the usage count
|
||||||
|
# of all previously used generics.
|
||||||
|
usedGenerics*: seq[PInstantiation]
|
||||||
else: nil
|
else: nil
|
||||||
|
|
||||||
magic*: TMagic
|
magic*: TMagic
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,6 @@ proc searchInstTypes(key: PType): PType =
|
||||||
return
|
return
|
||||||
|
|
||||||
for inst in genericTyp.sym.typeInstCache:
|
for inst in genericTyp.sym.typeInstCache:
|
||||||
InternalAssert inst.sons.len == key.sons.len + 1
|
|
||||||
if inst.id == key.id: return inst
|
if inst.id == key.id: return inst
|
||||||
block MatchType:
|
block MatchType:
|
||||||
for j in 1 .. high(key.sons):
|
for j in 1 .. high(key.sons):
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,6 @@ when withRealTime and not defined(getTicks):
|
||||||
when defined(memProfiler):
|
when defined(memProfiler):
|
||||||
proc nimProfile(requestedSize: int)
|
proc nimProfile(requestedSize: int)
|
||||||
|
|
||||||
include "system/timers"
|
|
||||||
|
|
||||||
const
|
const
|
||||||
rcShift = 6 # the reference count is shifted so we can use
|
rcShift = 6 # the reference count is shifted so we can use
|
||||||
# the least significat bits for additinal flags:
|
# the least significat bits for additinal flags:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue