pocketlang/src/debug.h

25 lines
522 B
C
Raw Normal View History

/*
* Copyright (c) 2021 Thakee Nathees
* Licensed under: MIT License
*/
#ifndef DEBUG_H
#define DEBUG_H
#include "common.h"
#include "var.h"
// Dump the value of the [value] without a new line at the end.
2021-05-09 18:28:00 +08:00
void dumpValue(PKVM* vm, Var value);
// Dump opcodes of the given function.
2021-05-16 15:05:54 +08:00
void dumpFunctionCode(PKVM* vm, Function* func);
2021-05-19 02:59:09 +08:00
// Dump the all the global values of the script.
void dumpGlobalValues(PKVM* vm);
2021-05-16 15:05:54 +08:00
// Dump the current (top most) stack call frame.
void dumpStackFrame(PKVM* vm);
#endif // DEBUG_H