MCPcopy Create free account
hub / github.com/ceifa/wasmoon / resume

Method resume

src/thread.ts:71–83  ·  view source on GitHub ↗
(argCount = 0)

Source from the content-addressed store, hash-verified

69 }
70
71 public resume(argCount = 0): LuaResumeResult {
72 const dataPointer = this.lua.module._malloc(PointerSize)
73 try {
74 this.lua.module.setValue(dataPointer, 0, 'i32')
75 const luaResult = this.lua.lua_resume(this.address, null, argCount, dataPointer)
76 return {
77 result: luaResult,
78 resultCount: this.lua.module.getValue(dataPointer, 'i32'),
79 }
80 } finally {
81 this.lua.module._free(dataPointer)
82 }
83 }
84
85 public getTop(): number {
86 return this.lua.lua_gettop(this.address)

Callers 2

runMethod · 0.95
engine.test.jsFile · 0.80

Calls 1

getValueMethod · 0.45

Tested by

no test coverage detected