equal
deleted
inserted
replaced
73 |
73 |
74 // Method pointer |
74 // Method pointer |
75 _method_slot_offset = offset++; |
75 _method_slot_offset = offset++; |
76 if (setup_sp_and_method) { |
76 if (setup_sp_and_method) { |
77 builder()->CreateStore( |
77 builder()->CreateStore( |
78 method, slot_addr(method_slot_offset(), SharkType::Method*_type())); |
78 method, slot_addr(method_slot_offset(), SharkType::Method_type())); |
79 } |
79 } |
80 |
80 |
81 // Unextended SP |
81 // Unextended SP |
82 builder()->CreateStore(stack_pointer, slot_addr(offset++)); |
82 builder()->CreateStore(stack_pointer, slot_addr(offset++)); |
83 |
83 |
161 |
161 |
162 return sp; |
162 return sp; |
163 } |
163 } |
164 |
164 |
165 Value* SharkStack::slot_addr(int offset, |
165 Value* SharkStack::slot_addr(int offset, |
166 const Type* type, |
166 Type* type, |
167 const char* name) const { |
167 const char* name) const { |
168 bool needs_cast = type && type != SharkType::intptr_type(); |
168 bool needs_cast = type && type != SharkType::intptr_type(); |
169 |
169 |
170 Value* result = builder()->CreateStructGEP( |
170 Value* result = builder()->CreateStructGEP( |
171 _frame, offset, needs_cast ? "" : name); |
171 _frame, offset, needs_cast ? "" : name); |