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

Method dumpStack

src/thread.ts:361–373  ·  view source on GitHub ↗
(log = console.log)

Source from the content-addressed store, hash-verified

359 }
360
361 public dumpStack(log = console.log): void {
362 const top = this.getTop()
363
364 for (let i = 1; i <= top; i++) {
365 const type = this.lua.lua_type(this.address, i)
366 const typename = this.lua.lua_typename(this.address, type)
367 const pointer = this.getPointer(i)
368 const name = this.indexToString(i)
369 const value = this.getValue(i, type)
370
371 log(i, typename, pointer, name, value)
372 }
373 }
374
375 public assertOk(result: LuaReturn): void {
376 if (result !== LuaReturn.Ok && result !== LuaReturn.Yield) {

Callers

nothing calls this directly

Calls 4

getTopMethod · 0.95
getPointerMethod · 0.95
indexToStringMethod · 0.95
getValueMethod · 0.95

Tested by

no test coverage detected