destructors: we are cooking now
This commit is contained in:
parent
fab75fbaf1
commit
6e6a9a721f
9 changed files with 73 additions and 43 deletions
|
|
@ -2971,6 +2971,30 @@ proc compiles*(x: untyped): bool {.magic: "Compiles", noSideEffect, compileTime.
|
|||
when not defined(js) and not defined(nimscript):
|
||||
include "system/ansi_c"
|
||||
|
||||
when not defined(js):
|
||||
{.push stackTrace:off.}
|
||||
|
||||
when hasThreadSupport and hostOS != "standalone":
|
||||
const insideRLocksModule = false
|
||||
include "system/syslocks"
|
||||
include "system/threadlocalstorage"
|
||||
|
||||
when defined(nimV2):
|
||||
type
|
||||
TNimNode {.compilerProc.} = object # to keep the code generator simple
|
||||
DestructorProc = proc (p: pointer) {.nimcall, benign.}
|
||||
TNimType {.compilerProc.} = object
|
||||
destructor: pointer
|
||||
size: int
|
||||
name: cstring
|
||||
PNimType = ptr TNimType
|
||||
|
||||
when defined(gcDestructors) and not defined(nimscript):
|
||||
include "core/strs"
|
||||
include "core/seqs"
|
||||
|
||||
{.pop.}
|
||||
|
||||
when not declared(sysFatal):
|
||||
include "system/fatal"
|
||||
|
||||
|
|
@ -3481,15 +3505,6 @@ when not defined(JS): #and not defined(nimscript):
|
|||
when defined(endb):
|
||||
proc endbStep()
|
||||
|
||||
when hasThreadSupport and hostOS != "standalone":
|
||||
const insideRLocksModule = false
|
||||
include "system/syslocks"
|
||||
include "system/threadlocalstorage"
|
||||
|
||||
when defined(gcDestructors) and not defined(nimscript):
|
||||
include "core/strs"
|
||||
include "core/seqs"
|
||||
|
||||
when declared(newSeq):
|
||||
proc cstringArrayToSeq*(a: cstringArray, len: Natural): seq[string] =
|
||||
## Converts a ``cstringArray`` to a ``seq[string]``. `a` is supposed to be
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue