Showing the changes to src/vm/module_ref.cpp (1 of 31 files). Show all
Unified · Split
| @@ -10,8 +10,22 @@ · 9 unmodified lines | ||
| 10 | 10 | #include <utils.h> |
| 11 | 11 | #include <debug.h> |
| 12 | 12 | |
| 13 | −using namespace disvm; | |
| 14 | −using namespace disvm::runtime; | |
| 13 | +using disvm::debug::component_trace_t; | |
| 14 | +using disvm::debug::log_level_t; | |
| 15 | + | |
| 16 | +using disvm::runtime::type_descriptor_t; | |
| 17 | +using disvm::runtime::intrinsic_type_desc; | |
| 18 | +using disvm::runtime::byte_t; | |
| 19 | +using disvm::runtime::word_t; | |
| 20 | +using disvm::runtime::vm_array_t; | |
| 21 | +using disvm::runtime::vm_string_t; | |
| 22 | +using disvm::runtime::vm_module_t; | |
| 23 | +using disvm::runtime::vm_module_ref_t; | |
| 24 | +using disvm::runtime::export_section_t; | |
| 25 | +using disvm::runtime::import_vm_module_t; | |
| 26 | +using disvm::runtime::vm_module_function_ref_t; | |
| 27 | +using disvm::runtime::vm_system_exception; | |
| 28 | +using disvm::runtime::vm_user_exception; | |
| 15 | 29 | |
| 16 | 30 | namespace |
| 17 | 31 | { |
| @@ -47,11 +61,11 @@ namespace · 29 unmodified lines | ||
| 47 | 61 | ref.entry_pc = export_entry.pc; |
| 48 | 62 | ref.frame_type = export_entry.frame_type; |
| 49 | 63 | |
| 50 | − if (debug::is_component_tracing_enabled<debug::component_trace_t::module>()) | |
| 64 | + if (disvm::debug::is_component_tracing_enabled<component_trace_t::module>()) | |
| 51 | 65 | { |
| 52 | − debug::log_msg( | |
| 53 | − debug::component_trace_t::module, | |
| 54 | − debug::log_level_t::debug, | |
| 66 | + disvm::debug::log_msg( | |
| 67 | + component_trace_t::module, | |
| 68 | + log_level_t::debug, | |
| 55 | 69 | "export: %d %#08x >>%s<<", |
| 56 | 70 | index, |
| 57 | 71 | export_entry.sig, |
| @@ -79,8 +93,8 @@ vm_module_ref_t::vm_module_ref_t(std::shared_ptr<const vm_module_t> module) · 21 unmodified lines | ||
| 79 | 93 | if (module->original_mp != nullptr) |
| 80 | 94 | mp_base = vm_alloc_t::copy(*module->original_mp); |
| 81 | 95 | |
| 82 | − if (debug::is_component_tracing_enabled<debug::component_trace_t::memory>()) | |
| 83 | − debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "init: vm module ref"); | |
| 96 | + if (disvm::debug::is_component_tracing_enabled<component_trace_t::memory>()) | |
| 97 | + disvm::debug::log_msg(component_trace_t::memory, log_level_t::debug, "init: vm module ref"); | |
| 84 | 98 | } |
| 85 | 99 | |
| 86 | 100 | vm_module_ref_t::vm_module_ref_t(std::shared_ptr<const vm_module_t> module, const import_vm_module_t &imports) |
| @@ -97,8 +111,8 @@ vm_module_ref_t::vm_module_ref_t(std::shared_ptr<const vm_module_t> module, cons · 10 unmodified lines | ||
| 97 | 111 | if (module->original_mp != nullptr) |
| 98 | 112 | mp_base = vm_alloc_t::copy(*module->original_mp); |
| 99 | 113 | |
| 100 | − if (debug::is_component_tracing_enabled<debug::component_trace_t::memory>()) | |
| 101 | − debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "init: vm module ref: exported %d", _function_refs->get_length()); | |
| 114 | + if (disvm::debug::is_component_tracing_enabled<component_trace_t::memory>()) | |
| 115 | + disvm::debug::log_msg(component_trace_t::memory, log_level_t::debug, "init: vm module ref: exported %d", _function_refs->get_length()); | |
| 102 | 116 | } |
| 103 | 117 | |
| 104 | 118 | vm_module_ref_t::~vm_module_ref_t() |
| @@ -108,8 +122,8 @@ vm_module_ref_t::~vm_module_ref_t() · 3 unmodified lines | ||
| 108 | 122 | if (_function_refs != nullptr) |
| 109 | 123 | _function_refs->release(); |
| 110 | 124 | |
| 111 | − if (debug::is_component_tracing_enabled<debug::component_trace_t::memory>()) | |
| 112 | − debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "destroy: vm module ref"); | |
| 125 | + if (disvm::debug::is_component_tracing_enabled<component_trace_t::memory>()) | |
| 126 | + disvm::debug::log_msg(component_trace_t::memory, log_level_t::debug, "destroy: vm module ref"); | |
| 113 | 127 | } |
| 114 | 128 | |
| 115 | 129 | bool vm_module_ref_t::is_builtin_module() const |