before stack init change

This commit is contained in:
Andreas Rumpf 2010-08-01 14:49:54 +02:00
commit 03724c2952
13 changed files with 93 additions and 57 deletions

View file

@ -666,7 +666,8 @@ proc `&` * (x: char, y: string): string {.
proc add*(x: var string, y: char) {.magic: "AppendStrCh", noSideEffect.}
proc add*(x: var string, y: string) {.magic: "AppendStrStr", noSideEffect.}
include "system/inclrtl"
include "system/cgprocs"
when not defined(ECMAScript):
@ -824,8 +825,6 @@ const
## a string that describes the application type. Possible values:
## "console", "gui", "lib".
include "system/inclrtl"
proc toFloat*(i: int): float {.
magic: "ToFloat", noSideEffect, importc: "toFloat".}
## converts an integer `i` into a ``float``. If the conversion
@ -1305,12 +1304,17 @@ when not defined(EcmaScript) and not defined(NimrodVM):
proc initGC()
proc initStackBottom() {.inline.} =
var locals: array[0..7, int]
setStackBottom(addr(locals))
var
strDesc: TNimType
strDesc.size = sizeof(string)
strDesc.kind = tyString
strDesc.flags = {ntfAcyclic}
initStackBottom()
initGC() # BUGFIX: need to be called here!
{.push stack_trace: off.}