NIR: progress (#22817)

Done:

- [x] Implement conversions to openArray/varargs.
- [x] Implement index/range checking.
This commit is contained in:
Andreas Rumpf
2023-10-12 23:33:38 +02:00
committed by GitHub
parent d790112ea4
commit 8990626ca9
16 changed files with 281 additions and 101 deletions

View File

@@ -206,6 +206,9 @@ proc nimAddStrV1(s: var NimStringV2; src: NimStringV2) {.compilerRtl, inl.} =
prepareAdd(s, src.len)
appendString s, src
proc nimDestroyStrV1(s: NimStringV2) {.compilerRtl, inl.} =
frees(s)
func capacity*(self: string): int {.inline.} =
## Returns the current capacity of the string.
# See https://github.com/nim-lang/RFCs/issues/460