🎨 improve dump
Nasal Interpreter Test / mac-aarch64 (push) Has been cancelled Details
Nasal Interpreter Test / linux-x86_64 (push) Has been cancelled Details

This commit is contained in:
ValKmjolnir 2025-07-31 20:21:27 +08:00
parent 6034234c87
commit 6b975b4a9c
2 changed files with 3 additions and 3 deletions

View File

@ -18,7 +18,7 @@ using usize = std::size_t;
using f64 = double;
// virtual machine stack depth, both global depth and value stack depth
const u32 VM_STACK_DEPTH = UINT16_MAX;
const u32 VM_STACK_DEPTH = UINT16_MAX + 1;
// avoid error loading function bug in MSVC version nasal.exe
#ifdef _MSC_VER

View File

@ -189,8 +189,7 @@ void vm::value_info(var& val) {
}
void vm::function_detail_info(const nas_func& func) {
std::clog << "func@";
std::clog << std::hex << reinterpret_cast<u64>(&func) << std::dec;
std::clog << "func ";
std::vector<std::string> argument_list = {};
argument_list.resize(func.keys.size());
@ -238,6 +237,7 @@ void vm::function_call_trace() {
// | locals| ... |
// +-------+------------------+
// | func | function | <-- i - 1 - prev_func->local_size - 1
// +-------+------------------+
if (i + 1 <= top && i[0].is_addr() && i[1].is_ret()) {
auto r_addr = i[1].ret();
callsite.push_back(r_addr);