VM: fixed an error introduced in the last merging

This commit is contained in:
Sidi Liang 2025-02-05 14:58:54 +08:00
parent 0c54f216fc
commit 3ff885abe3
No known key found for this signature in database
GPG Key ID: 9785F5EECFFA5311
1 changed files with 6 additions and 5 deletions

View File

@ -31,7 +31,7 @@ protected:
/* nasal native functions */ /* nasal native functions */
std::vector<nasal_builtin_table> native_function; std::vector<nasal_builtin_table> native_function;
/* garbage collector */ /* garbage collector */
gc ngc; gc ngc;
@ -320,15 +320,16 @@ public:
flag_limited_mode = flag; flag_limited_mode = flag;
} }
auto get_gc_time_ms() const {
return ngc.get_gc_time_ms();
}
void set_interrupt_ptr(std::atomic<bool>* p) { void set_interrupt_ptr(std::atomic<bool>* p) {
interrupt_ptr = p; interrupt_ptr = p;
} }
private: private:
std::atomic<bool>* interrupt_ptr = nullptr; std::atomic<bool>* interrupt_ptr = nullptr;
auto get_gc_time_ms() const {
return ngc.get_gc_time_ms();
}
}; };
inline bool vm::boolify(const var& val) { inline bool vm::boolify(const var& val) {
@ -983,7 +984,7 @@ inline void vm::o_callfh() {
for(u32 i = 0; i<func.local_size; ++i) { for(u32 i = 0; i<func.local_size; ++i) {
local[i] = func.local[i]; local[i] = func.local[i];
} }
bool lack_arguments_flag = false; bool lack_arguments_flag = false;
for(const auto& i : func.keys) { for(const auto& i : func.keys) {
const auto& key = i.first; const auto& key = i.first;