History

Altered API getting the allocation from a vm_alloc_t. Added preliminary internal file descriptor type. Test groups now print out their name.

arr committed 10 years ago

Commit 5a417ba1 parent 9881f459 files · +230 −104Browse files

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

Unified · Split

src/vm/module_reader.cpp+3−3
@@ -389,7 +389,7 @@ namespace · 388 unmodified lines
389 auto array_stack_pointer = std::size_t{ 0 };389 auto array_stack_pointer = std::size_t{ 0 };
390 auto success = bool{};390 auto success = bool{};
391 auto code = byte_t{};391 auto code = byte_t{};
392 auto base = reinterpret_cast<byte_t *>(modobj.original_mp->allocation());392 auto base = reinterpret_cast<byte_t *>(modobj.original_mp->get_allocation());
393 for (;;)393 for (;;)
394 {394 {
395 auto bytesRead = reader.get_next_bytes(sizeof(code), &code);395 auto bytesRead = reader.get_next_bytes(sizeof(code), &code);
@@ -449,7 +449,7 @@ namespace · 53 unmodified lines
449 throw module_reader_exception{ "Failed to read string data" };449 throw module_reader_exception{ "Failed to read string data" };
450 450
451 auto new_string = new vm_string_t(str_buffer.size(), str_buffer.data());451 auto new_string = new vm_string_t(str_buffer.size(), str_buffer.data());
452 *reinterpret_cast<pointer_t *>(data_dest) = new_string->allocation();452 *reinterpret_cast<pointer_t *>(data_dest) = new_string->get_allocation();
453 break;453 break;
454 }454 }
455 case datum_type_t::value_real64:455 case datum_type_t::value_real64:
@@ -469,7 +469,7 @@ namespace · 13 unmodified lines
469 if (!success) throw module_reader_exception{ "Failed to read word" };469 if (!success) throw module_reader_exception{ "Failed to read word" };
470 470
471 auto new_array = new vm_array_t(modobj.type_section[element_type], element_count);471 auto new_array = new vm_array_t(modobj.type_section[element_type], element_count);
472 *reinterpret_cast<pointer_t *>(data_dest) = new_array->allocation();472 *reinterpret_cast<pointer_t *>(data_dest) = new_array->get_allocation();
473 break;473 break;
474 }474 }
475 case datum_type_t::set_array:475 case datum_type_t::set_array: