fixes #6096
This commit is contained in:
parent
81ce73db94
commit
f127a7f7aa
2 changed files with 3 additions and 3 deletions
|
|
@ -2340,7 +2340,7 @@ proc gen(p: PProc, n: PNode, r: var TCompRes) =
|
||||||
of nkPragma: genPragma(p, n)
|
of nkPragma: genPragma(p, n)
|
||||||
of nkProcDef, nkMethodDef, nkConverterDef:
|
of nkProcDef, nkMethodDef, nkConverterDef:
|
||||||
var s = n.sons[namePos].sym
|
var s = n.sons[namePos].sym
|
||||||
if sfExportc in s.flags and compilingLib:
|
if {sfExportc, sfCompilerProc} * s.flags == {sfExportc}:
|
||||||
genSym(p, n.sons[namePos], r)
|
genSym(p, n.sons[namePos], r)
|
||||||
r.res = nil
|
r.res = nil
|
||||||
of nkGotoState, nkState:
|
of nkGotoState, nkState:
|
||||||
|
|
|
||||||
|
|
@ -157,10 +157,10 @@ proc reraiseException() {.compilerproc, asmNoStackFrame.} =
|
||||||
|
|
||||||
asm "throw lastJSError;"
|
asm "throw lastJSError;"
|
||||||
|
|
||||||
proc raiseOverflow {.exportc: "raiseOverflow", noreturn.} =
|
proc raiseOverflow {.exportc: "raiseOverflow", noreturn, compilerProc.} =
|
||||||
raise newException(OverflowError, "over- or underflow")
|
raise newException(OverflowError, "over- or underflow")
|
||||||
|
|
||||||
proc raiseDivByZero {.exportc: "raiseDivByZero", noreturn.} =
|
proc raiseDivByZero {.exportc: "raiseDivByZero", noreturn, compilerProc.} =
|
||||||
raise newException(DivByZeroError, "division by zero")
|
raise newException(DivByZeroError, "division by zero")
|
||||||
|
|
||||||
proc raiseRangeError() {.compilerproc, noreturn.} =
|
proc raiseRangeError() {.compilerproc, noreturn.} =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue