🎨 opcode dump can get global variable name

This commit is contained in:
ValKmjolnir
2025-03-15 18:17:35 +08:00
parent 10d2965197
commit b5f02de883
6 changed files with 54 additions and 8 deletions

View File

@@ -327,7 +327,13 @@ void vm::trace_back() {
std::clog << "\nback trace ";
std::clog << (ngc.cort? "(coroutine)":"(main)") << "\n";
codestream::set(const_number, const_string, native_function.data(), files);
codestream::set(
const_number,
const_string,
global_symbol_name,
native_function.data(),
files
);
for(u64 p = 0, same = 0, prev = 0xffffffff; !ret.empty(); prev = p, ret.pop()) {
if ((p = ret.top())==prev) {