2021-02-18 02:27:24 +08:00
|
|
|
/*
|
2022-04-03 02:39:57 +08:00
|
|
|
* Copyright (c) 2020-2022 Thakee Nathees
|
|
|
|
* Copyright (c) 2021-2022 Pocketlang Contributors
|
2021-06-09 18:42:26 +08:00
|
|
|
* Distributed Under The MIT License
|
2021-02-18 02:27:24 +08:00
|
|
|
*/
|
|
|
|
|
2022-04-07 08:43:29 +08:00
|
|
|
#ifndef PK_DEBUG_H
|
|
|
|
#define PK_DEBUG_H
|
2021-02-18 02:27:24 +08:00
|
|
|
|
2021-06-21 21:02:20 +08:00
|
|
|
#include "pk_internal.h"
|
2022-04-07 08:43:29 +08:00
|
|
|
#include "pk_value.h"
|
2021-02-18 02:27:24 +08:00
|
|
|
|
2022-04-08 00:02:20 +08:00
|
|
|
// Dump opcodes of the given function to the stdout.
|
|
|
|
void dumpFunctionCode(PKVM* vm, Function* func);
|
2021-02-18 02:27:24 +08:00
|
|
|
|
2022-04-08 00:02:20 +08:00
|
|
|
// Dump the all the global values of the script to the stdout.
|
2021-05-19 02:59:09 +08:00
|
|
|
void dumpGlobalValues(PKVM* vm);
|
|
|
|
|
2022-04-08 00:02:20 +08:00
|
|
|
// Dump the current (top most) stack call frame to the stdout.
|
2021-05-16 15:05:54 +08:00
|
|
|
void dumpStackFrame(PKVM* vm);
|
2021-02-25 17:03:06 +08:00
|
|
|
|
2022-04-07 08:43:29 +08:00
|
|
|
#endif // PK_DEBUG_H
|