History

Alter debugger API to accept vector value not reference.

Remove global memory lock mechanism - Wasn't being used but showed up on profile report :( Move enum_pointer_fields and is_offset_pointer impls into cpp file Create enum_pointer_fields_with_offset function since the VM never needs the offset values and the generated code was about 5% bigger. Now the VM can use the callback without the offset. Removed pointless init_memory() usage since alloc_memory() now is required to return zeroed out memory. Fixed bugs in GC Added support - Ranged absolute disassembly in debugger - New duration log component

arr committed 9 years ago

Commit cc8f2b61 parent 41616d412 files · +167 −250Browse files

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

Unified · Split

src/vm/array.cpp+1−12
@@ -29,18 +29,7 @@ vm_array_t::vm_array_t(std::shared_ptr<const type_descriptor_t> td, word_t lengt · 28 unmodified lines
2929 _arr = alloc_memory<byte_t>(_length * _element_type->size_in_bytes);
3030 debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "init: vm array: %d", _length);
3131
32− // Initialize the array
33− auto arr_local = _arr;
34− const auto array_len = _length;
35− const auto &element_type = *_element_type;
36− debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "begin: init: elements: %d", array_len);
37− for (word_t i = 0; i < array_len; ++i)
38− {
39− init_memory(element_type, arr_local);
40− arr_local += element_type.size_in_bytes;
41− }
42−
43− debug::log_msg(debug::component_trace_t::memory, debug::log_level_t::debug, "end: init: elements: %d", array_len);
32+ // [SPEC] Element memory is already initialized to zero based on the alloc_memory contract
4433 }
4534
4635 vm_array_t::vm_array_t(vm_array_t &original, word_t begin_index, word_t length)