History

Address various performance issues discovered while profiling debugger Fix logical errors in bit shifting bytecodes Add assert for bit shifting issues that may arise on other compilers Fix bug in vm_array assert

arr committed 10 years ago

Commit d8c9a331 parent 42194725 files · +39 −25Browse files

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

Unified · Split

src/vm/stack.cpp+4−4
@@ -203,7 +203,7 @@ vm_frame_t *vm_stack_t::alloc_frame(std::shared_ptr<const type_descriptor_t> fra · 202 unmodified lines
203203 assert(frame_type != nullptr);
204204 assert(sizeof(vm_frame_base_alloc_t) < frame_type->size_in_bytes && "Requested frame size less than VM frame base size");
205205
206− auto layout = dynamic_cast<vm_stack_layout *>(_mem.get());
206+ auto layout = static_cast<vm_stack_layout *>(_mem.get());
207207
208208 auto page_top_frame = layout->top_page->page_top_frame;
209209 const auto new_frame_size = sizeof(vm_frame_t) + frame_type->size_in_bytes;
@@ -236,7 +236,7 @@ vm_frame_t *vm_stack_t::alloc_frame(std::shared_ptr<const type_descriptor_t> fra · 26 unmodified lines
236236
237237 vm_frame_t *vm_stack_t::push_frame()
238238 {
239− auto layout = dynamic_cast<vm_stack_layout *>(_mem.get());
239+ auto layout = static_cast<vm_stack_layout *>(_mem.get());
240240
241241 auto current_top_frame = layout->top_frame;
242242 auto new_top_frame = layout->top_page->page_top_frame;
@@ -252,7 +252,7 @@ vm_frame_t *vm_stack_t::push_frame() · 9 unmodified lines
252252
253253 vm_frame_t *vm_stack_t::pop_frame()
254254 {
255− auto layout = dynamic_cast<vm_stack_layout *>(_mem.get());
255+ auto layout = static_cast<vm_stack_layout *>(_mem.get());
256256
257257 auto current_frame = layout->top_frame;
258258 if (current_frame == nullptr)
@@ -292,6 +292,6 @@ vm_frame_t *vm_stack_t::pop_frame() · 33 unmodified lines
292292
293293 vm_frame_t *vm_stack_t::peek_frame() const
294294 {
295− auto layout = dynamic_cast<vm_stack_layout *>(_mem.get());
295+ auto layout = static_cast<vm_stack_layout *>(_mem.get());
296296 return layout->top_frame;
297297 }