some bugfixes for symbolfiles
This commit is contained in:
parent
3a5cf3d63a
commit
0857efe512
4 changed files with 16 additions and 20 deletions
|
|
@ -227,9 +227,6 @@ type
|
||||||
sfInnerProc, # proc is an inner proc
|
sfInnerProc, # proc is an inner proc
|
||||||
sfThread, # proc will run as a thread
|
sfThread, # proc will run as a thread
|
||||||
# variable is a thread variable
|
# variable is a thread variable
|
||||||
sfInline # forced-inline procs
|
|
||||||
sfImmediate, # macro or template is immediately expanded without
|
|
||||||
# considering any possible overloads
|
|
||||||
sfCompileTime, # proc can be evaluated at compile time
|
sfCompileTime, # proc can be evaluated at compile time
|
||||||
sfMerge, # proc can be merged with itself
|
sfMerge, # proc can be merged with itself
|
||||||
sfDeadCodeElim, # dead code elimination for the module is turned on
|
sfDeadCodeElim, # dead code elimination for the module is turned on
|
||||||
|
|
@ -246,6 +243,8 @@ const
|
||||||
sfFakeConst* = sfDeadCodeElim # const cannot be put into a data section
|
sfFakeConst* = sfDeadCodeElim # const cannot be put into a data section
|
||||||
sfDispatcher* = sfDeadCodeElim # copied method symbol is the dispatcher
|
sfDispatcher* = sfDeadCodeElim # copied method symbol is the dispatcher
|
||||||
sfNoInit* = sfMainModule # don't generate code to init the variable
|
sfNoInit* = sfMainModule # don't generate code to init the variable
|
||||||
|
sfImmediate* = sfDeadCodeElim # macro or template is immediately expanded
|
||||||
|
# without considering any possible overloads
|
||||||
|
|
||||||
type
|
type
|
||||||
TTypeKind* = enum # order is important!
|
TTypeKind* = enum # order is important!
|
||||||
|
|
|
||||||
|
|
@ -535,7 +535,7 @@ proc cmdChangeTriggersRecompilation(old, new: TCommands): bool =
|
||||||
proc processRodFile(r: PRodReader, crc: TCrc32) =
|
proc processRodFile(r: PRodReader, crc: TCrc32) =
|
||||||
var
|
var
|
||||||
w: string
|
w: string
|
||||||
d, L, inclCrc: int
|
d, inclCrc: int
|
||||||
while r.s[r.pos] != '\0':
|
while r.s[r.pos] != '\0':
|
||||||
var section = rdWord(r)
|
var section = rdWord(r)
|
||||||
if r.reason != rrNone:
|
if r.reason != rrNone:
|
||||||
|
|
@ -573,20 +573,17 @@ proc processRodFile(r: PRodReader, crc: TCrc32) =
|
||||||
of "FILES":
|
of "FILES":
|
||||||
inc(r.pos, 2) # skip "(\10"
|
inc(r.pos, 2) # skip "(\10"
|
||||||
inc(r.line)
|
inc(r.line)
|
||||||
L = 0
|
while r.s[r.pos] != ')':
|
||||||
while r.s[r.pos] > '\x0A' and r.s[r.pos] != ')':
|
|
||||||
setlen(r.files, L + 1)
|
|
||||||
var relativePath = decodeStr(r.s, r.pos)
|
var relativePath = decodeStr(r.s, r.pos)
|
||||||
var resolvedPath = relativePath.findModule
|
var resolvedPath = relativePath.findModule
|
||||||
r.files[L] = if resolvedPath.len > 0: resolvedPath else: relativePath
|
r.files.add(if resolvedPath.len > 0: resolvedPath else: relativePath)
|
||||||
inc(r.pos) # skip #10
|
inc(r.pos) # skip #10
|
||||||
inc(r.line)
|
inc(r.line)
|
||||||
inc(L)
|
|
||||||
if r.s[r.pos] == ')': inc(r.pos)
|
if r.s[r.pos] == ')': inc(r.pos)
|
||||||
of "INCLUDES":
|
of "INCLUDES":
|
||||||
inc(r.pos, 2) # skip "(\10"
|
inc(r.pos, 2) # skip "(\10"
|
||||||
inc(r.line)
|
inc(r.line)
|
||||||
while r.s[r.pos] > '\x0A' and r.s[r.pos] != ')':
|
while r.s[r.pos] != ')':
|
||||||
w = r.files[decodeVInt(r.s, r.pos)]
|
w = r.files[decodeVInt(r.s, r.pos)]
|
||||||
inc(r.pos) # skip ' '
|
inc(r.pos) # skip ' '
|
||||||
inclCrc = decodeVInt(r.s, r.pos)
|
inclCrc = decodeVInt(r.s, r.pos)
|
||||||
|
|
@ -597,13 +594,10 @@ proc processRodFile(r: PRodReader, crc: TCrc32) =
|
||||||
inc(r.pos)
|
inc(r.pos)
|
||||||
inc(r.line)
|
inc(r.line)
|
||||||
if r.s[r.pos] == ')': inc(r.pos)
|
if r.s[r.pos] == ')': inc(r.pos)
|
||||||
of "DEPS":
|
of "DEPS":
|
||||||
inc(r.pos) # skip ':'
|
inc(r.pos) # skip ':'
|
||||||
L = 0
|
|
||||||
while r.s[r.pos] > '\x0A':
|
while r.s[r.pos] > '\x0A':
|
||||||
setlen(r.modDeps, L + 1)
|
r.modDeps.add r.files[decodeVInt(r.s, r.pos)]
|
||||||
r.modDeps[L] = r.files[decodeVInt(r.s, r.pos)]
|
|
||||||
inc(L)
|
|
||||||
if r.s[r.pos] == ' ': inc(r.pos)
|
if r.s[r.pos] == ' ': inc(r.pos)
|
||||||
of "INTERF":
|
of "INTERF":
|
||||||
r.interfIdx = r.pos + 2
|
r.interfIdx = r.pos + 2
|
||||||
|
|
@ -629,9 +623,11 @@ proc processRodFile(r: PRodReader, crc: TCrc32) =
|
||||||
of "INIT":
|
of "INIT":
|
||||||
r.initIdx = r.pos + 2 # "(\10"
|
r.initIdx = r.pos + 2 # "(\10"
|
||||||
skipSection(r)
|
skipSection(r)
|
||||||
else:
|
else:
|
||||||
MsgWriteln("skipping section: " & section &
|
InternalError("invalid section: '" & section &
|
||||||
" at " & $r.pos & " in " & r.filename)
|
"' at " & $r.line & " in " & r.filename)
|
||||||
|
#MsgWriteln("skipping section: " & section &
|
||||||
|
# " at " & $r.line & " in " & r.filename)
|
||||||
skipSection(r)
|
skipSection(r)
|
||||||
if r.s[r.pos] == '\x0A':
|
if r.s[r.pos] == '\x0A':
|
||||||
inc(r.pos)
|
inc(r.pos)
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ proc semSlurp(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||||
result = newStrNode(nkStrLit, content)
|
result = newStrNode(nkStrLit, content)
|
||||||
result.typ = getSysType(tyString)
|
result.typ = getSysType(tyString)
|
||||||
result.info = n.info
|
result.info = n.info
|
||||||
c.slurpedFiles.add(filename)
|
c.slurpedFiles.add(a.strVal)
|
||||||
except EIO:
|
except EIO:
|
||||||
GlobalError(a.info, errCannotOpenFile, a.strVal)
|
GlobalError(a.info, errCannotOpenFile, a.strVal)
|
||||||
|
|
||||||
|
|
|
||||||
3
todo.txt
3
todo.txt
|
|
@ -1,7 +1,6 @@
|
||||||
version 0.9.0
|
version 0.9.0
|
||||||
=============
|
=============
|
||||||
|
|
||||||
- bootstrapping fails with --symbolFiles:on again!
|
|
||||||
- ``=`` should be overloadable; requires specialization for ``=``
|
- ``=`` should be overloadable; requires specialization for ``=``
|
||||||
- fix remaining generics bugs
|
- fix remaining generics bugs
|
||||||
- fix remaining closure bugs:
|
- fix remaining closure bugs:
|
||||||
|
|
@ -49,6 +48,8 @@ Bugs
|
||||||
without ``-d:release`` leaks memory?
|
without ``-d:release`` leaks memory?
|
||||||
- bug: object {.pure, final.} does not work again!
|
- bug: object {.pure, final.} does not work again!
|
||||||
- bug: tsortdev does not run with native GC?
|
- bug: tsortdev does not run with native GC?
|
||||||
|
- bug: pragma statements in combination with symbol files are evaluated twice
|
||||||
|
but this can lead to compilation errors
|
||||||
|
|
||||||
|
|
||||||
version 0.9.XX
|
version 0.9.XX
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue