Make TRY_CALL work with native functions AND a debug helper #2

Merged
defunkt merged 2 commits from TRY_CALL into main 2025-10-21 01:53:40 +00:00
Showing only changes of commit 7f4f73dd41 - Show all commits

View File

@ -386,7 +386,7 @@ export class VM {
const varName = instruction.operand as string const varName = instruction.operand as string
const value = this.scope.get(varName) const value = this.scope.get(varName)
if (value?.type === 'function') { if (value?.type === 'function' || value?.type === 'native') {
this.stack.push(value) this.stack.push(value)
this.stack.push(toValue(0)) this.stack.push(toValue(0))
this.stack.push(toValue(0)) this.stack.push(toValue(0))