docgen should work again
This commit is contained in:
parent
fc47c0edc7
commit
a9a5766c66
15 changed files with 120 additions and 106 deletions
|
|
@ -69,6 +69,8 @@ const
|
|||
reportMissedDeadlines avoidTimeMachine useClone ignoreAllocationSize
|
||||
debugExecProcesses pcreDll useLipzipSrc
|
||||
preventDeadlocks UNICODE winUnicode trackGcHeaders posixRealtime
|
||||
|
||||
nimStdSetjmp nimRawSetjmp nimSigSetjmp
|
||||
""".split
|
||||
|
||||
proc initDefines*() =
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@ type
|
|||
warnDifferentHeaps, warnWriteToForeignHeap, warnUnsafeCode,
|
||||
warnEachIdentIsTuple, warnShadowIdent,
|
||||
warnProveInit, warnProveField, warnProveIndex, warnGcUnsafe, warnGcUnsafe2,
|
||||
warnUninit, warnGcMem, warnUnguardedAccess, warnUser,
|
||||
warnUninit, warnGcMem, warnLockLevel, warnUser,
|
||||
hintSuccess, hintSuccessX,
|
||||
hintLineTooLong, hintXDeclaredButNotUsed, hintConvToBaseNotNeeded,
|
||||
hintConvFromXtoItselfNotNeeded, hintExprAlwaysX, hintQuitCalled,
|
||||
|
|
@ -390,7 +390,7 @@ const
|
|||
warnGcUnsafe2: "cannot prove '$1' is GC-safe. Does not compile with --threads:on.",
|
||||
warnUninit: "'$1' might not have been initialized [Uninit]",
|
||||
warnGcMem: "'$1' uses GC'ed memory [GcMem]",
|
||||
warnUnguardedAccess: "'$1' is accessed without its guard [UnguardedAccess]",
|
||||
warnLockLevel: "$1 [LockLevel]",
|
||||
warnUser: "$1 [User]",
|
||||
hintSuccess: "operation successful [Success]",
|
||||
hintSuccessX: "operation successful ($# lines compiled; $# sec total; $#) [SuccessX]",
|
||||
|
|
@ -420,7 +420,7 @@ const
|
|||
"AnalysisLoophole", "DifferentHeaps", "WriteToForeignHeap",
|
||||
"UnsafeCode", "EachIdentIsTuple", "ShadowIdent",
|
||||
"ProveInit", "ProveField", "ProveIndex", "GcUnsafe", "GcUnsafe2", "Uninit",
|
||||
"GcMem", "UnguardedAccess", "User"]
|
||||
"GcMem", "LockLevel", "User"]
|
||||
|
||||
HintsToStr*: array[0..16, string] = ["Success", "SuccessX", "LineTooLong",
|
||||
"XDeclaredButNotUsed", "ConvToBaseNotNeeded", "ConvFromXtoItselfNotNeeded",
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ App: Console
|
|||
License: "copying.txt"
|
||||
|
||||
[Config]
|
||||
Files: "config/nimrod.cfg"
|
||||
Files: "config/nim.cfg"
|
||||
Files: "config/nimdoc.cfg"
|
||||
Files: "config/nimdoc.tex.cfg"
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ Files: "icons/koch_icon.o"
|
|||
|
||||
Files: "compiler/readme.txt"
|
||||
Files: "compiler/nim.ini"
|
||||
Files: "compiler/nimrod.cfg"
|
||||
Files: "compiler/nim.nimrod.cfg"
|
||||
Files: "compiler/*.nim"
|
||||
Files: "compiler/c2nim/*.nim"
|
||||
Files: "compiler/c2nim/*.cfg"
|
||||
|
|
|
|||
|
|
@ -411,6 +411,7 @@ proc getLockLevel(s: PSym): TLockLevel =
|
|||
result = 0.TLockLevel
|
||||
else:
|
||||
result = UnknownLockLevel
|
||||
#message(s.info, warnUser, "FOR THIS " & s.name.s)
|
||||
|
||||
proc mergeLockLevels(tracked: PEffects, n: PNode, lockLevel: TLockLevel) =
|
||||
if lockLevel >= tracked.currLockLevel:
|
||||
|
|
@ -757,9 +758,15 @@ proc checkMethodEffects*(disp, branch: PSym) =
|
|||
localError(branch.info, "base method is GC-safe, but '$1' is not" %
|
||||
branch.name.s)
|
||||
if branch.typ.lockLevel > disp.typ.lockLevel:
|
||||
localError(branch.info,
|
||||
"base method has lock level $1, but dispatcher has $2" %
|
||||
[$branch.typ.lockLevel, $disp.typ.lockLevel])
|
||||
when true:
|
||||
message(branch.info, warnLockLevel,
|
||||
"base method has lock level $1, but dispatcher has $2" %
|
||||
[$branch.typ.lockLevel, $disp.typ.lockLevel])
|
||||
else:
|
||||
# XXX make this an error after bigbreak has been released:
|
||||
localError(branch.info,
|
||||
"base method has lock level $1, but dispatcher has $2" %
|
||||
[$branch.typ.lockLevel, $disp.typ.lockLevel])
|
||||
|
||||
proc setEffectsForProcType*(t: PType, n: PNode) =
|
||||
var effects = t.n.sons[0]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue