initial commit

This commit is contained in:
Fabien Freling 2019-09-27 18:36:36 +02:00
commit b6c60365ab
67 changed files with 17447 additions and 0 deletions

View 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