History

Create specific exception when index is out of range. Update thread class to print out exception details. Throw exception when an invalid op-code is detected. Enforce mspawn instruction cannot start from a built-in module.

arr committed 10 years ago

Commit 266fad61 parent 9af409310 files · +63 −40Browse files

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

Unified · Split

src/vm/stack.cpp+2−2
@@ -161,7 +161,7 @@ vm_module_ref_t *&vm_frame_t::prev_module_ref() const · 160 unmodified lines
161 161
162pointer_t vm_frame_t::fixed_point_register_1() const162pointer_t vm_frame_t::fixed_point_register_1() const
163{163{
164 const auto offset = vm_frame_constants::fixed_point_register_1_frame_offset;164 const auto offset = vm_frame_constants::fixed_point_register_1_offset;
165 assert(offset < frame_type->size_in_bytes);165 assert(offset < frame_type->size_in_bytes);
166 166
167 auto p = reinterpret_cast<uint8_t *>(base()) + offset;167 auto p = reinterpret_cast<uint8_t *>(base()) + offset;
@@ -170,7 +170,7 @@ pointer_t vm_frame_t::fixed_point_register_1() const · 2 unmodified lines
170 170
171pointer_t vm_frame_t::fixed_point_register_2() const171pointer_t vm_frame_t::fixed_point_register_2() const
172{172{
173 const auto offset = vm_frame_constants::fixed_point_register_2_frame_offset;173 const auto offset = vm_frame_constants::fixed_point_register_2_offset;
174 assert(offset < frame_type->size_in_bytes);174 assert(offset < frame_type->size_in_bytes);
175 175
176 auto p = reinterpret_cast<uint8_t *>(base()) + offset;176 auto p = reinterpret_cast<uint8_t *>(base()) + offset;