mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-20 14:25:23 +00:00
* fixes #20746; remove string copies for ORC booted compiler * add a test case * use `cursor` thanks to @beef331 * for old compilers * change file extension * change test cases
This commit is contained in:
@@ -32,6 +32,8 @@ const
|
||||
when hasFFI:
|
||||
import evalffi
|
||||
|
||||
when not defined(nimHasCursor):
|
||||
{.pragma: cursor.}
|
||||
|
||||
proc stackTraceAux(c: PCtx; x: PStackFrame; pc: int; recursionLimit=100) =
|
||||
if x != nil:
|
||||
@@ -787,7 +789,7 @@ proc rawExecute(c: PCtx, start: int, tos: PStackFrame): TFullReg =
|
||||
of opcLdStrIdx:
|
||||
decodeBC(rkInt)
|
||||
let idx = regs[rc].intVal.int
|
||||
let s = regs[rb].node.strVal
|
||||
let s {.cursor.} = regs[rb].node.strVal
|
||||
if idx <% s.len:
|
||||
regs[ra].intVal = s[idx].ord
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user