newruntime: progress

This commit is contained in:
Araq 2019-04-02 00:46:38 +02:00
commit b77a2037f8
4 changed files with 18 additions and 12 deletions

View file

@ -1706,6 +1706,10 @@ proc `@`* [IDX, T](a: array[IDX, T]): seq[T] {.
## echo @a # => @[1, 3, 5]
## echo @b # => @['f', 'o', 'o']
when defined(nimHasDefault):
proc default*(T: typedesc): T {.magic: "Default", noSideEffect.}
## returns the default value of the type ``T``.
proc setLen*[T](s: var seq[T], newlen: Natural) {.
magic: "SetLengthSeq", noSideEffect.}
## Sets the length of seq `s` to `newlen`. ``T`` may be any sequence type.
@ -4400,10 +4404,6 @@ when defined(genode):
# and return to thread entrypoint.
when defined(nimHasDefault):
proc default*(T: typedesc): T {.magic: "Default", noSideEffect.}
## returns the default value of the type ``T``.
import system/widestrs
export widestrs