History

Various perf and style fixes

arr committed 9 years ago

Commit 08c36e01 parent b1b22c24 files · +29 −23Browse files

Showing the changes to src/vm/list.cpp (1 of 4 files). Show all

Unified · Split

src/vm/list.cpp+7−5
@@ -45,10 +45,6 @@ vm_list_t::vm_list_t(std::shared_ptr<const type_descriptor_t> td, vm_list_t *tai · 44 unmodified lines
45 45
46vm_list_t::~vm_list_t()46vm_list_t::~vm_list_t()
47{47{
48 // Remove tail
49 dec_ref_count_and_free(_tail);
50 debug::assign_debug_pointer(&_tail);
51
52 // Destroy and free the list element, if default element size was surpassed.48 // Destroy and free the list element, if default element size was surpassed.
53 if (_is_alloc)49 if (_is_alloc)
54 {50 {
@@ -61,7 +57,13 @@ vm_list_t::~vm_list_t() · 6 unmodified lines
61 }57 }
62 58
63 debug::assign_debug_pointer(&_mem.alloc);59 debug::assign_debug_pointer(&_mem.alloc);
64 disvm::debug::log_msg(component_trace_t::memory, log_level_t::debug, "destroy: vm list");60
61 // Remove tail
62 dec_ref_count_and_free(_tail);
63 debug::assign_debug_pointer(&_tail);
64
65 if (disvm::debug::is_component_tracing_enabled<component_trace_t::memory>())
66 disvm::debug::log_msg(component_trace_t::memory, log_level_t::debug, "destroy: vm list");
65}67}
66 68
67std::shared_ptr<const type_descriptor_t> vm_list_t::get_element_type() const69std::shared_ptr<const type_descriptor_t> vm_list_t::get_element_type() const