diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2014-05-29 02:15:01 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2014-05-29 02:15:01 +0200 |
commit | 208a594ff1b5bb38b27ff7e71422e515a45159be (patch) | |
tree | 73ff31d247e0f0c64a7678ce1503ebf8a0c10c0c | |
parent | 7ab2bc38e63d1428409f023c332949fd4eeea1cf (diff) | |
parent | 19c73a5d0219f93858c188e15bdc4714941bc36e (diff) | |
download | Nim-208a594ff1b5bb38b27ff7e71422e515a45159be.tar.gz |
Merge pull request #1178 from EXetoC/nostackframe
noStackFrame -> asmNoStackFrame
-rw-r--r-- | doc/manual.txt | 4 | ||||
-rw-r--r-- | doc/nimrodc.txt | 4 | ||||
-rw-r--r-- | lib/pure/osproc.nim | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/doc/manual.txt b/doc/manual.txt index f0389a35e..5afe385bb 100644 --- a/doc/manual.txt +++ b/doc/manual.txt @@ -2408,7 +2408,8 @@ Nimrod identifiers shall be enclosed in a special character which can be specified in the statement's pragmas. The default special character is ``'`'``: .. code-block:: nimrod - proc addInt(a, b: int): int {.noStackFrame.} = + {.push stackTrace:off.} + proc addInt(a, b: int): int = # a in eax, and b in edx asm """ mov eax, `a` @@ -2417,6 +2418,7 @@ specified in the statement's pragmas. The default special character is ``'`'``: call `raiseOverflow` theEnd: """ + {.pop.} If the GNU assembler is used, quotes and newlines are inserted automatically: diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt index 379e8469e..e4f1c41dc 100644 --- a/doc/nimrodc.txt +++ b/doc/nimrodc.txt @@ -360,10 +360,12 @@ Example: static int cvariable = 420; """.} - proc embedsC() {.noStackFrame.} = + {.push stackTrace:off.} + proc embedsC() = var nimrodVar = 89 # use backticks to access Nimrod symbols within an emit section: {.emit: """fprintf(stdout, "%d\n", cvariable + (int)`nimrodVar`);""".} + {.pop.} embedsC() diff --git a/lib/pure/osproc.nim b/lib/pure/osproc.nim index d2ada7014..cb9792f2b 100644 --- a/lib/pure/osproc.nim +++ b/lib/pure/osproc.nim @@ -800,8 +800,8 @@ elif not defined(useNimRtl): proc startProcessAfterFork(data: ptr TStartProcessData) = # Warning: no GC here! - # Or anythink that touches global structures - all called nimrod procs - # must be marked with noStackFrame. Inspect C code after making changes. + # Or anything that touches global structures - all called nimrod procs + # must be marked with stackTrace:off. Inspect C code after making changes. if not data.optionPoParentStreams: discard close(data.pStdin[writeIdx]) if dup2(data.pStdin[readIdx], readIdx) < 0: |