Showing the changes to src/vm/stack.cpp (1 of 5 files). Show all
Unified · Split
| @@ -203,7 +203,7 @@ vm_frame_t *vm_stack_t::alloc_frame(std::shared_ptr<const type_descriptor_t> fra · 202 unmodified lines | ||
| 203 | 203 | assert(frame_type != nullptr); |
| 204 | 204 | assert(sizeof(vm_frame_base_alloc_t) < frame_type->size_in_bytes && "Requested frame size less than VM frame base size"); |
| 205 | 205 | |
| 206 | − auto layout = dynamic_cast<vm_stack_layout *>(_mem.get()); | |
| 206 | + auto layout = static_cast<vm_stack_layout *>(_mem.get()); | |
| 207 | 207 | |
| 208 | 208 | auto page_top_frame = layout->top_page->page_top_frame; |
| 209 | 209 | 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 | ||
| 236 | 236 | |
| 237 | 237 | vm_frame_t *vm_stack_t::push_frame() |
| 238 | 238 | { |
| 239 | − auto layout = dynamic_cast<vm_stack_layout *>(_mem.get()); | |
| 239 | + auto layout = static_cast<vm_stack_layout *>(_mem.get()); | |
| 240 | 240 | |
| 241 | 241 | auto current_top_frame = layout->top_frame; |
| 242 | 242 | 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 | ||
| 252 | 252 | |
| 253 | 253 | vm_frame_t *vm_stack_t::pop_frame() |
| 254 | 254 | { |
| 255 | − auto layout = dynamic_cast<vm_stack_layout *>(_mem.get()); | |
| 255 | + auto layout = static_cast<vm_stack_layout *>(_mem.get()); | |
| 256 | 256 | |
| 257 | 257 | auto current_frame = layout->top_frame; |
| 258 | 258 | if (current_frame == nullptr) |
| @@ -292,6 +292,6 @@ vm_frame_t *vm_stack_t::pop_frame() · 33 unmodified lines | ||
| 292 | 292 | |
| 293 | 293 | vm_frame_t *vm_stack_t::peek_frame() const |
| 294 | 294 | { |
| 295 | − auto layout = dynamic_cast<vm_stack_layout *>(_mem.get()); | |
| 295 | + auto layout = static_cast<vm_stack_layout *>(_mem.get()); | |
| 296 | 296 | return layout->top_frame; |
| 297 | 297 | } |