mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-21 06:45:27 +00:00
--gc:destructors: baby steps
This commit is contained in:
@@ -70,12 +70,6 @@ proc `=sink`[T](x: var seq[T]; y: seq[T]) =
|
||||
a.len = b.len
|
||||
a.p = b.p
|
||||
|
||||
when false:
|
||||
proc incrSeqV3(s: PGenericSeq, typ: PNimType): PGenericSeq {.compilerProc.}
|
||||
proc setLengthSeqV2(s: PGenericSeq, typ: PNimType, newLen: int): PGenericSeq {.
|
||||
compilerRtl.}
|
||||
proc newSeq(typ: PNimType, len: int): pointer {.compilerRtl.}
|
||||
|
||||
|
||||
type
|
||||
PayloadBase = object
|
||||
|
||||
@@ -3431,6 +3431,10 @@ when not defined(JS): #and not defined(nimscript):
|
||||
when defined(memtracker):
|
||||
include "system/memtracker"
|
||||
|
||||
when defined(gcDestructors):
|
||||
include "core/strs"
|
||||
include "core/seqs"
|
||||
|
||||
when hostOS == "standalone":
|
||||
include "system/embedded"
|
||||
else:
|
||||
@@ -3479,10 +3483,7 @@ when not defined(JS): #and not defined(nimscript):
|
||||
{.pop.}
|
||||
{.push stack_trace: off, profiler:off.}
|
||||
when hasAlloc:
|
||||
when defined(gcDestructors):
|
||||
include "core/strs"
|
||||
include "core/seqs"
|
||||
else:
|
||||
when not defined(gcDestructors):
|
||||
include "system/sysstr"
|
||||
{.pop.}
|
||||
when hasAlloc: include "system/strmantle"
|
||||
|
||||
Reference in New Issue
Block a user