compiler can emulate thread local variables
This commit is contained in:
parent
adbb48fbce
commit
4fa80956b8
10 changed files with 255 additions and 250 deletions
|
|
@ -1479,8 +1479,6 @@ when not defined(EcmaScript) and not defined(NimrodVM):
|
|||
strDesc.size = sizeof(string)
|
||||
strDesc.kind = tyString
|
||||
strDesc.flags = {ntfAcyclic}
|
||||
initStackBottom()
|
||||
initGC() # BUGFIX: need to be called here!
|
||||
|
||||
include "system/ansi_c"
|
||||
|
||||
|
|
@ -1692,6 +1690,10 @@ when not defined(EcmaScript) and not defined(NimrodVM):
|
|||
|
||||
when hasThreadSupport:
|
||||
include "system/threads"
|
||||
else:
|
||||
initStackBottom()
|
||||
initGC()
|
||||
|
||||
include "system/excpt"
|
||||
# we cannot compile this with stack tracing on
|
||||
# as it would recurse endlessly!
|
||||
|
|
@ -1755,8 +1757,7 @@ when not defined(EcmaScript) and not defined(NimrodVM):
|
|||
|
||||
proc getCurrentException*(): ref E_Base {.compilerRtl, inl.} =
|
||||
## retrieves the current exception; if there is none, nil is returned.
|
||||
ThreadGlobals()
|
||||
result = ||currException
|
||||
result = currException
|
||||
|
||||
proc getCurrentExceptionMsg*(): string {.inline.} =
|
||||
## retrieves the error message that was attached to the current
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue