minor improvements
This commit is contained in:
parent
f3b56e7ac0
commit
0631d2dccc
2 changed files with 9 additions and 8 deletions
|
|
@ -4193,7 +4193,7 @@ proc shallow*[T](s: var seq[T]) {.noSideEffect, inline.} =
|
||||||
##
|
##
|
||||||
## This is only useful for optimization purposes.
|
## This is only useful for optimization purposes.
|
||||||
if s.len == 0: return
|
if s.len == 0: return
|
||||||
when not defined(JS) and not defined(nimscript):
|
when not defined(JS) and not defined(nimscript) and not defined(nimSeqsV2):
|
||||||
var s = cast[PGenericSeq](s)
|
var s = cast[PGenericSeq](s)
|
||||||
s.reserved = s.reserved or seqShallowFlag
|
s.reserved = s.reserved or seqShallowFlag
|
||||||
|
|
||||||
|
|
@ -4550,12 +4550,12 @@ type
|
||||||
|
|
||||||
when defined(genode):
|
when defined(genode):
|
||||||
var componentConstructHook*: proc (env: GenodeEnv) {.nimcall.}
|
var componentConstructHook*: proc (env: GenodeEnv) {.nimcall.}
|
||||||
## Hook into the Genode component bootstrap process.
|
## Hook into the Genode component bootstrap process.
|
||||||
##
|
##
|
||||||
## This hook is called after all globals are initialized.
|
## This hook is called after all globals are initialized.
|
||||||
## When this hook is set the component will not automatically exit,
|
## When this hook is set the component will not automatically exit,
|
||||||
## call ``quit`` explicitly to do so. This is the only available method
|
## call ``quit`` explicitly to do so. This is the only available method
|
||||||
## of accessing the initial Genode environment.
|
## of accessing the initial Genode environment.
|
||||||
|
|
||||||
proc nim_component_construct(env: GenodeEnv) {.exportc.} =
|
proc nim_component_construct(env: GenodeEnv) {.exportc.} =
|
||||||
## Procedure called during ``Component::construct`` by the loader.
|
## Procedure called during ``Component::construct`` by the loader.
|
||||||
|
|
|
||||||
|
|
@ -680,7 +680,8 @@ proc gcMark(gch: var GcHeap, p: pointer) {.inline.} =
|
||||||
garbage collection that is used by Nim. For more information, please see the documentation of
|
garbage collection that is used by Nim. For more information, please see the documentation of
|
||||||
`CLANG_NO_SANITIZE_ADDRESS` in `lib/nimbase.h`.
|
`CLANG_NO_SANITIZE_ADDRESS` in `lib/nimbase.h`.
|
||||||
]#
|
]#
|
||||||
proc markStackAndRegisters(gch: var GcHeap) {.noinline, cdecl, codegenDecl: "CLANG_NO_SANITIZE_ADDRESS $# $#$#".} =
|
proc markStackAndRegisters(gch: var GcHeap) {.noinline, cdecl,
|
||||||
|
codegenDecl: "CLANG_NO_SANITIZE_ADDRESS $# $#$#".} =
|
||||||
forEachStackSlot(gch, gcMark)
|
forEachStackSlot(gch, gcMark)
|
||||||
|
|
||||||
proc collectZCT(gch: var GcHeap): bool =
|
proc collectZCT(gch: var GcHeap): bool =
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue