187 return _locals_slots_offset;
188 }
189 int monitor_offset(int index) const {
190 assert(index >= 0 && index < max_monitors(), "invalid monitor index");
191 return _monitors_slots_offset +
192 (max_monitors() - 1 - index) * frame::interpreter_frame_monitor_size();
193 }
194 int monitor_object_offset(int index) const {
195 return monitor_offset(index) +
196 (BasicObjectLock::obj_offset_in_bytes() >> LogBytesPerWord);
197 }
198 int monitor_header_offset(int index) const {
199 return monitor_offset(index) +
200 ((BasicObjectLock::lock_offset_in_bytes() +
201 BasicLock::displaced_header_offset_in_bytes()) >> LogBytesPerWord);
202 }
203
204 // Addresses of things in the frame
205 public:
206 llvm::Value* slot_addr(int offset,
207 const llvm::Type* type = NULL,
208 const char* name = "") const;
209
210 llvm::Value* monitor_addr(int index) const {
211 return slot_addr(
212 monitor_offset(index),
213 SharkType::monitor_type(),
214 "monitor");
215 }
216 llvm::Value* monitor_object_addr(int index) const {
217 return slot_addr(
218 monitor_object_offset(index),
219 SharkType::oop_type(),
220 "object_addr");
221 }
222 llvm::Value* monitor_header_addr(int index) const {
223 return slot_addr(
224 monitor_header_offset(index),
225 SharkType::intptr_type(),
226 "displaced_header_addr");
227 }
|
187 return _locals_slots_offset;
188 }
189 int monitor_offset(int index) const {
190 assert(index >= 0 && index < max_monitors(), "invalid monitor index");
191 return _monitors_slots_offset +
192 (max_monitors() - 1 - index) * frame::interpreter_frame_monitor_size();
193 }
194 int monitor_object_offset(int index) const {
195 return monitor_offset(index) +
196 (BasicObjectLock::obj_offset_in_bytes() >> LogBytesPerWord);
197 }
198 int monitor_header_offset(int index) const {
199 return monitor_offset(index) +
200 ((BasicObjectLock::lock_offset_in_bytes() +
201 BasicLock::displaced_header_offset_in_bytes()) >> LogBytesPerWord);
202 }
203
204 // Addresses of things in the frame
205 public:
206 llvm::Value* slot_addr(int offset,
207 llvm::Type* type = NULL,
208 const char* name = "") const;
209
210 llvm::Value* monitor_addr(int index) const {
211 return slot_addr(
212 monitor_offset(index),
213 SharkType::monitor_type(),
214 "monitor");
215 }
216 llvm::Value* monitor_object_addr(int index) const {
217 return slot_addr(
218 monitor_object_offset(index),
219 SharkType::oop_type(),
220 "object_addr");
221 }
222 llvm::Value* monitor_header_addr(int index) const {
223 return slot_addr(
224 monitor_header_offset(index),
225 SharkType::intptr_type(),
226 "displaced_header_addr");
227 }
|