History

Address more bugs found during limbo compiler testing

arr committed 9 years ago

Commit 84ac3311 parent 220aaf26 files · +52 −63Browse files

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

Unified · Split

src/vm/execution_table.cpp+1−3
@@ -548,8 +548,6 @@ namespace · 547 unmodified lines
548 auto type = types[type_id];548 auto type = types[type_id];
549 549
550 disvm::runtime::inc_ref_count_in_memory(*type, r.src);550 disvm::runtime::inc_ref_count_in_memory(*type, r.src);
551
552 // Decrement allocated pointers in the destination.
553 destroy_memory(*type, r.dest);551 destroy_memory(*type, r.dest);
554 552
555 assert(r.src != nullptr && r.dest != nullptr);553 assert(r.src != nullptr && r.dest != nullptr);
@@ -863,7 +861,7 @@ namespace · 307 unmodified lines
863 throw out_of_range_memory{};861 throw out_of_range_memory{};
864 }862 }
865 863
866 auto new_array = new vm_array_t(arr, begin_index, length);864 auto new_array = new vm_array_t(*arr, begin_index, length);
867 865
868 if (arr->alloc_type->map_in_bytes > 0)866 if (arr->alloc_type->map_in_bytes > 0)
869 vm.get_garbage_collector().track_allocation(new_array);867 vm.get_garbage_collector().track_allocation(new_array);