diff options
author | Araq <rumpf_a@web.de> | 2011-06-15 02:09:02 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-06-15 02:09:02 +0200 |
commit | 4fa80956b89c2ee06d8940018101240efec7dc02 (patch) | |
tree | 5e3d03d41122f0ad8def8e7d9be8b2eff2a2ea81 /lib/system.nim | |
parent | adbb48fbcecd82e60c3a25ee006baa0aa5dd7b10 (diff) | |
download | Nim-4fa80956b89c2ee06d8940018101240efec7dc02.tar.gz |
compiler can emulate thread local variables
Diffstat (limited to 'lib/system.nim')
-rwxr-xr-x | lib/system.nim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/system.nim b/lib/system.nim index 1c8bf3ae9..7670288fc 100755 --- a/lib/system.nim +++ b/lib/system.nim @@ -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 |