initial commit
This commit is contained in:
commit
b6c60365ab
67 changed files with 17447 additions and 0 deletions
27
src/logic/wren/vm/wren_debug.h
Normal file
27
src/logic/wren/vm/wren_debug.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
#ifndef wren_debug_h
|
||||
#define wren_debug_h
|
||||
|
||||
#include "wren_value.h"
|
||||
#include "wren_vm.h"
|
||||
|
||||
// Prints the stack trace for the current fiber.
|
||||
//
|
||||
// Used when a fiber throws a runtime error which is not caught.
|
||||
void wrenDebugPrintStackTrace(WrenVM* vm);
|
||||
|
||||
// The "dump" functions are used for debugging Wren itself. Normal code paths
|
||||
// will not call them unless one of the various DEBUG_ flags is enabled.
|
||||
|
||||
// Prints a representation of [value] to stdout.
|
||||
void wrenDumpValue(Value value);
|
||||
|
||||
// Prints a representation of the bytecode for [fn] at instruction [i].
|
||||
int wrenDumpInstruction(WrenVM* vm, ObjFn* fn, int i);
|
||||
|
||||
// Prints the disassembled code for [fn] to stdout.
|
||||
void wrenDumpCode(WrenVM* vm, ObjFn* fn);
|
||||
|
||||
// Prints the contents of the current stack for [fiber] to stdout.
|
||||
void wrenDumpStack(ObjFiber* fiber);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue