2021-02-18 02:27:24 +08:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2021 Thakee Nathees
|
|
|
|
* Licensed under: MIT License
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef DEBUG_H
|
|
|
|
#define DEBUG_H
|
|
|
|
|
|
|
|
#include "common.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);
|
2021-02-18 02:27:24 +08:00
|
|
|
|
|
|
|
// Dump opcodes of the given function.
|
2021-05-16 15:05:54 +08:00
|
|
|
void dumpFunctionCode(PKVM* vm, Function* func);
|
2021-02-18 02:27:24 +08:00
|
|
|
|
2021-05-16 15:05:54 +08:00
|
|
|
// Dump the current (top most) stack call frame.
|
|
|
|
void dumpStackFrame(PKVM* vm);
|
2021-02-25 17:03:06 +08:00
|
|
|
|
2021-02-18 02:27:24 +08:00
|
|
|
#endif // DEBUG_H
|