mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-03 18:34:43 +00:00
some bugfixes for symbolfiles
This commit is contained in:
@@ -227,9 +227,6 @@ type
|
||||
sfInnerProc, # proc is an inner proc
|
||||
sfThread, # proc will run as a thread
|
||||
# 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
|
||||
sfMerge, # proc can be merged with itself
|
||||
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
|
||||
sfDispatcher* = sfDeadCodeElim # copied method symbol is the dispatcher
|
||||
sfNoInit* = sfMainModule # don't generate code to init the variable
|
||||
sfImmediate* = sfDeadCodeElim # macro or template is immediately expanded
|
||||
# without considering any possible overloads
|
||||
|
||||
type
|
||||
TTypeKind* = enum # order is important!
|
||||
|
||||
@@ -535,7 +535,7 @@ proc cmdChangeTriggersRecompilation(old, new: TCommands): bool =
|
||||
proc processRodFile(r: PRodReader, crc: TCrc32) =
|
||||
var
|
||||
w: string
|
||||
d, L, inclCrc: int
|
||||
d, inclCrc: int
|
||||
while r.s[r.pos] != '\0':
|
||||
var section = rdWord(r)
|
||||
if r.reason != rrNone:
|
||||
@@ -573,20 +573,17 @@ proc processRodFile(r: PRodReader, crc: TCrc32) =
|
||||
of "FILES":
|
||||
inc(r.pos, 2) # skip "(\10"
|
||||
inc(r.line)
|
||||
L = 0
|
||||
while r.s[r.pos] > '\x0A' and r.s[r.pos] != ')':
|
||||
setlen(r.files, L + 1)
|
||||
while r.s[r.pos] != ')':
|
||||
var relativePath = decodeStr(r.s, r.pos)
|
||||
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.line)
|
||||
inc(L)
|
||||
if r.s[r.pos] == ')': inc(r.pos)
|
||||
of "INCLUDES":
|
||||
inc(r.pos, 2) # skip "(\10"
|
||||
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)]
|
||||
inc(r.pos) # skip ' '
|
||||
inclCrc = decodeVInt(r.s, r.pos)
|
||||
@@ -597,13 +594,10 @@ proc processRodFile(r: PRodReader, crc: TCrc32) =
|
||||
inc(r.pos)
|
||||
inc(r.line)
|
||||
if r.s[r.pos] == ')': inc(r.pos)
|
||||
of "DEPS":
|
||||
of "DEPS":
|
||||
inc(r.pos) # skip ':'
|
||||
L = 0
|
||||
while r.s[r.pos] > '\x0A':
|
||||
setlen(r.modDeps, L + 1)
|
||||
r.modDeps[L] = r.files[decodeVInt(r.s, r.pos)]
|
||||
inc(L)
|
||||
r.modDeps.add r.files[decodeVInt(r.s, r.pos)]
|
||||
if r.s[r.pos] == ' ': inc(r.pos)
|
||||
of "INTERF":
|
||||
r.interfIdx = r.pos + 2
|
||||
@@ -629,9 +623,11 @@ proc processRodFile(r: PRodReader, crc: TCrc32) =
|
||||
of "INIT":
|
||||
r.initIdx = r.pos + 2 # "(\10"
|
||||
skipSection(r)
|
||||
else:
|
||||
MsgWriteln("skipping section: " & section &
|
||||
" at " & $r.pos & " in " & r.filename)
|
||||
else:
|
||||
InternalError("invalid section: '" & section &
|
||||
"' at " & $r.line & " in " & r.filename)
|
||||
#MsgWriteln("skipping section: " & section &
|
||||
# " at " & $r.line & " in " & r.filename)
|
||||
skipSection(r)
|
||||
if r.s[r.pos] == '\x0A':
|
||||
inc(r.pos)
|
||||
|
||||
@@ -22,7 +22,7 @@ proc semSlurp(c: PContext, n: PNode, flags: TExprFlags): PNode =
|
||||
result = newStrNode(nkStrLit, content)
|
||||
result.typ = getSysType(tyString)
|
||||
result.info = n.info
|
||||
c.slurpedFiles.add(filename)
|
||||
c.slurpedFiles.add(a.strVal)
|
||||
except EIO:
|
||||
GlobalError(a.info, errCannotOpenFile, a.strVal)
|
||||
|
||||
|
||||
3
todo.txt
3
todo.txt
@@ -1,7 +1,6 @@
|
||||
version 0.9.0
|
||||
=============
|
||||
|
||||
- bootstrapping fails with --symbolFiles:on again!
|
||||
- ``=`` should be overloadable; requires specialization for ``=``
|
||||
- fix remaining generics bugs
|
||||
- fix remaining closure bugs:
|
||||
@@ -49,6 +48,8 @@ Bugs
|
||||
without ``-d:release`` leaks memory?
|
||||
- bug: object {.pure, final.} does not work again!
|
||||
- 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
|
||||
|
||||
Reference in New Issue
Block a user