Mercurial > hg > graal-compiler
comparison src/share/vm/shark/sharkCacheDecache.cpp @ 7212:291ffc492eb6
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 14 Dec 2012 14:35:13 +0100 |
parents | e522a00b91aa 2cd5e15048e6 |
children | f78ac2ce44ef |
comparison
equal
deleted
inserted
replaced
7163:2ed8d74e5984 | 7212:291ffc492eb6 |
---|---|
105 } | 105 } |
106 | 106 |
107 void SharkDecacher::process_method_slot(Value** value, int offset) { | 107 void SharkDecacher::process_method_slot(Value** value, int offset) { |
108 // Decache the method pointer | 108 // Decache the method pointer |
109 write_value_to_frame( | 109 write_value_to_frame( |
110 SharkType::Method*_type(), | 110 SharkType::Method_type(), |
111 *value, | 111 *value, |
112 offset); | 112 offset); |
113 | 113 |
114 oopmap()->set_oop(slot2reg(offset)); | |
115 } | 114 } |
116 | 115 |
117 void SharkDecacher::process_pc_slot(int offset) { | 116 void SharkDecacher::process_pc_slot(int offset) { |
118 // Record the PC | 117 // Record the PC |
119 builder()->CreateStore( | 118 builder()->CreateStore( |
205 *value = read_value_from_frame(SharkType::oop_type(), offset); | 204 *value = read_value_from_frame(SharkType::oop_type(), offset); |
206 } | 205 } |
207 | 206 |
208 void SharkCacher::process_method_slot(Value** value, int offset) { | 207 void SharkCacher::process_method_slot(Value** value, int offset) { |
209 // Cache the method pointer | 208 // Cache the method pointer |
210 *value = read_value_from_frame(SharkType::Method*_type(), offset); | 209 *value = read_value_from_frame(SharkType::Method_type(), offset); |
211 } | 210 } |
212 | 211 |
213 void SharkFunctionEntryCacher::process_method_slot(Value** value, int offset) { | 212 void SharkFunctionEntryCacher::process_method_slot(Value** value, int offset) { |
214 // "Cache" the method pointer | 213 // "Cache" the method pointer |
215 *value = method(); | 214 *value = method(); |
230 value->zero_checked()); | 229 value->zero_checked()); |
231 } | 230 } |
232 } | 231 } |
233 | 232 |
234 Value* SharkOSREntryCacher::CreateAddressOfOSRBufEntry(int offset, | 233 Value* SharkOSREntryCacher::CreateAddressOfOSRBufEntry(int offset, |
235 const Type* type) { | 234 Type* type) { |
236 Value *result = builder()->CreateStructGEP(osr_buf(), offset); | 235 Value *result = builder()->CreateStructGEP(osr_buf(), offset); |
237 if (type != SharkType::intptr_type()) | 236 if (type != SharkType::intptr_type()) |
238 result = builder()->CreateBitCast(result, PointerType::getUnqual(type)); | 237 result = builder()->CreateBitCast(result, PointerType::getUnqual(type)); |
239 return result; | 238 return result; |
240 } | 239 } |
254 SharkType::to_stackType(value->basic_type()))), | 253 SharkType::to_stackType(value->basic_type()))), |
255 value->zero_checked()); | 254 value->zero_checked()); |
256 } | 255 } |
257 } | 256 } |
258 | 257 |
259 void SharkDecacher::write_value_to_frame(const Type* type, | 258 void SharkDecacher::write_value_to_frame(Type* type, |
260 Value* value, | 259 Value* value, |
261 int offset) { | 260 int offset) { |
262 builder()->CreateStore(value, stack()->slot_addr(offset, type)); | 261 builder()->CreateStore(value, stack()->slot_addr(offset, type)); |
263 } | 262 } |
264 | 263 |
265 Value* SharkCacher::read_value_from_frame(const Type* type, int offset) { | 264 Value* SharkCacher::read_value_from_frame(Type* type, int offset) { |
266 return builder()->CreateLoad(stack()->slot_addr(offset, type)); | 265 return builder()->CreateLoad(stack()->slot_addr(offset, type)); |
267 } | 266 } |