some progress on --symbolfiles:on
This commit is contained in:
parent
9a1c87d6bf
commit
a6d17b5503
3 changed files with 16 additions and 5 deletions
|
|
@ -165,8 +165,9 @@ proc methodDef*(s: PSym, fromCache: bool) =
|
||||||
if witness.isNil: witness = gMethods[i].methods[0]
|
if witness.isNil: witness = gMethods[i].methods[0]
|
||||||
# create a new dispatcher:
|
# create a new dispatcher:
|
||||||
add(gMethods, (methods: @[s], dispatcher: createDispatcher(s)))
|
add(gMethods, (methods: @[s], dispatcher: createDispatcher(s)))
|
||||||
if fromCache:
|
#echo "adding ", s.info
|
||||||
internalError(s.info, "no method dispatcher found")
|
#if fromCache:
|
||||||
|
# internalError(s.info, "no method dispatcher found")
|
||||||
if witness != nil:
|
if witness != nil:
|
||||||
localError(s.info, "invalid declaration order; cannot attach '" & s.name.s &
|
localError(s.info, "invalid declaration order; cannot attach '" & s.name.s &
|
||||||
"' to method defined here: " & $witness.info)
|
"' to method defined here: " & $witness.info)
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@
|
||||||
const
|
const
|
||||||
MaxSetElements* = 1 shl 16 # (2^16) to support unicode character sets?
|
MaxSetElements* = 1 shl 16 # (2^16) to support unicode character sets?
|
||||||
VersionAsString* = system.NimVersion
|
VersionAsString* = system.NimVersion
|
||||||
RodFileVersion* = "1221" # modify this if the rod-format changes!
|
RodFileVersion* = "1222" # modify this if the rod-format changes!
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -577,15 +577,25 @@ proc process(c: PPassContext, n: PNode): PNode =
|
||||||
for i in countup(0, sonsLen(n) - 1): discard process(c, n.sons[i])
|
for i in countup(0, sonsLen(n) - 1): discard process(c, n.sons[i])
|
||||||
#var s = n.sons[namePos].sym
|
#var s = n.sons[namePos].sym
|
||||||
#addInterfaceSym(w, s)
|
#addInterfaceSym(w, s)
|
||||||
of nkProcDef, nkMethodDef, nkIteratorDef, nkConverterDef,
|
of nkProcDef, nkIteratorDef, nkConverterDef,
|
||||||
nkTemplateDef, nkMacroDef:
|
nkTemplateDef, nkMacroDef:
|
||||||
var s = n.sons[namePos].sym
|
let s = n.sons[namePos].sym
|
||||||
if s == nil: internalError(n.info, "rodwrite.process")
|
if s == nil: internalError(n.info, "rodwrite.process")
|
||||||
if n.sons[bodyPos] == nil:
|
if n.sons[bodyPos] == nil:
|
||||||
internalError(n.info, "rodwrite.process: body is nil")
|
internalError(n.info, "rodwrite.process: body is nil")
|
||||||
if n.sons[bodyPos].kind != nkEmpty or s.magic != mNone or
|
if n.sons[bodyPos].kind != nkEmpty or s.magic != mNone or
|
||||||
sfForward notin s.flags:
|
sfForward notin s.flags:
|
||||||
addInterfaceSym(w, s)
|
addInterfaceSym(w, s)
|
||||||
|
of nkMethodDef:
|
||||||
|
let s = n.sons[namePos].sym
|
||||||
|
if s == nil: internalError(n.info, "rodwrite.process")
|
||||||
|
if n.sons[bodyPos] == nil:
|
||||||
|
internalError(n.info, "rodwrite.process: body is nil")
|
||||||
|
if n.sons[bodyPos].kind != nkEmpty or s.magic != mNone or
|
||||||
|
sfForward notin s.flags:
|
||||||
|
pushSym(w, s)
|
||||||
|
processStacks(w, false)
|
||||||
|
|
||||||
of nkVarSection, nkLetSection, nkConstSection:
|
of nkVarSection, nkLetSection, nkConstSection:
|
||||||
for i in countup(0, sonsLen(n) - 1):
|
for i in countup(0, sonsLen(n) - 1):
|
||||||
var a = n.sons[i]
|
var a = n.sons[i]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue