src/share/vm/shark/sharkCacheDecache.hpp

Print this page
rev 3850 : [mq]: shark.patch


 175   virtual bool stack_slot_needs_write(int index, SharkValue* value) = 0;
 176   virtual bool stack_slot_needs_oopmap(int index, SharkValue* value) = 0;
 177   virtual bool stack_slot_needs_debuginfo(int index, SharkValue* value) = 0;
 178 
 179   static Location::Type stack_location_type(int index, SharkValue** addr) {
 180     return location_type(addr, *addr == NULL);
 181   }
 182 
 183   // Local slot helpers
 184  protected:
 185   virtual bool local_slot_needs_write(int index, SharkValue* value) = 0;
 186   virtual bool local_slot_needs_oopmap(int index, SharkValue* value) = 0;
 187   virtual bool local_slot_needs_debuginfo(int index, SharkValue* value) = 0;
 188 
 189   static Location::Type local_location_type(int index, SharkValue** addr) {
 190     return location_type(addr, index > 0);
 191   }
 192 
 193   // Writer helper
 194  protected:
 195   void write_value_to_frame(const llvm::Type* type,
 196                             llvm::Value*      value,
 197                             int               offset);
 198 };
 199 
 200 class SharkJavaCallDecacher : public SharkDecacher {
 201  public:
 202   SharkJavaCallDecacher(SharkFunction* function, int bci, ciMethod* callee)
 203     : SharkDecacher(function, bci), _callee(callee) {}
 204 
 205  private:
 206   ciMethod* _callee;
 207 
 208  protected:
 209   ciMethod* callee() const {
 210     return _callee;
 211   }
 212 
 213   // Stack slot helpers
 214  protected:
 215   bool stack_slot_needs_write(int index, SharkValue* value) {


 304  protected:
 305   void process_stack_slot(int index, SharkValue** value, int offset);
 306 
 307   void process_oop_tmp_slot(llvm::Value** value, int offset);
 308   virtual void process_method_slot(llvm::Value** value, int offset);
 309 
 310   virtual void process_local_slot(int index, SharkValue** value, int offset);
 311 
 312   // Stack slot helper
 313  protected:
 314   virtual bool stack_slot_needs_read(int index, SharkValue* value) = 0;
 315 
 316   // Local slot helper
 317  protected:
 318   virtual bool local_slot_needs_read(int index, SharkValue* value) {
 319     return value && value->is_jobject();
 320   }
 321 
 322   // Writer helper
 323  protected:
 324   llvm::Value* read_value_from_frame(const llvm::Type* type, int offset);
 325 };
 326 
 327 class SharkJavaCallCacher : public SharkCacher {
 328  public:
 329   SharkJavaCallCacher(SharkFunction* function, ciMethod* callee)
 330     : SharkCacher(function), _callee(callee) {}
 331 
 332  private:
 333   ciMethod* _callee;
 334 
 335  protected:
 336   ciMethod* callee() const {
 337     return _callee;
 338   }
 339 
 340   // Stack slot helper
 341  protected:
 342   bool stack_slot_needs_read(int index, SharkValue* value) {
 343     return value && (index < callee()->return_type()->size() ||
 344                      value->is_jobject());


 405           llvm::PointerType::getUnqual(
 406             llvm::ArrayType::get(
 407               SharkType::intptr_type(),
 408               max_locals() + max_monitors() * 2)))) {}
 409 
 410  private:
 411   llvm::Value* _osr_buf;
 412 
 413  private:
 414   llvm::Value* osr_buf() const {
 415     return _osr_buf;
 416   }
 417 
 418   // Callbacks
 419  protected:
 420   void process_monitor(int index, int box_offset, int obj_offset);
 421   void process_local_slot(int index, SharkValue** value, int offset);
 422 
 423   // Helper
 424  private:
 425   llvm::Value* CreateAddressOfOSRBufEntry(int offset, const llvm::Type* type);
 426 };
 427 
 428 #endif // SHARE_VM_SHARK_SHARKCACHEDECACHE_HPP


 175   virtual bool stack_slot_needs_write(int index, SharkValue* value) = 0;
 176   virtual bool stack_slot_needs_oopmap(int index, SharkValue* value) = 0;
 177   virtual bool stack_slot_needs_debuginfo(int index, SharkValue* value) = 0;
 178 
 179   static Location::Type stack_location_type(int index, SharkValue** addr) {
 180     return location_type(addr, *addr == NULL);
 181   }
 182 
 183   // Local slot helpers
 184  protected:
 185   virtual bool local_slot_needs_write(int index, SharkValue* value) = 0;
 186   virtual bool local_slot_needs_oopmap(int index, SharkValue* value) = 0;
 187   virtual bool local_slot_needs_debuginfo(int index, SharkValue* value) = 0;
 188 
 189   static Location::Type local_location_type(int index, SharkValue** addr) {
 190     return location_type(addr, index > 0);
 191   }
 192 
 193   // Writer helper
 194  protected:
 195   void write_value_to_frame(llvm::Type* type,
 196                             llvm::Value*      value,
 197                             int               offset);
 198 };
 199 
 200 class SharkJavaCallDecacher : public SharkDecacher {
 201  public:
 202   SharkJavaCallDecacher(SharkFunction* function, int bci, ciMethod* callee)
 203     : SharkDecacher(function, bci), _callee(callee) {}
 204 
 205  private:
 206   ciMethod* _callee;
 207 
 208  protected:
 209   ciMethod* callee() const {
 210     return _callee;
 211   }
 212 
 213   // Stack slot helpers
 214  protected:
 215   bool stack_slot_needs_write(int index, SharkValue* value) {


 304  protected:
 305   void process_stack_slot(int index, SharkValue** value, int offset);
 306 
 307   void process_oop_tmp_slot(llvm::Value** value, int offset);
 308   virtual void process_method_slot(llvm::Value** value, int offset);
 309 
 310   virtual void process_local_slot(int index, SharkValue** value, int offset);
 311 
 312   // Stack slot helper
 313  protected:
 314   virtual bool stack_slot_needs_read(int index, SharkValue* value) = 0;
 315 
 316   // Local slot helper
 317  protected:
 318   virtual bool local_slot_needs_read(int index, SharkValue* value) {
 319     return value && value->is_jobject();
 320   }
 321 
 322   // Writer helper
 323  protected:
 324   llvm::Value* read_value_from_frame(llvm::Type* type, int offset);
 325 };
 326 
 327 class SharkJavaCallCacher : public SharkCacher {
 328  public:
 329   SharkJavaCallCacher(SharkFunction* function, ciMethod* callee)
 330     : SharkCacher(function), _callee(callee) {}
 331 
 332  private:
 333   ciMethod* _callee;
 334 
 335  protected:
 336   ciMethod* callee() const {
 337     return _callee;
 338   }
 339 
 340   // Stack slot helper
 341  protected:
 342   bool stack_slot_needs_read(int index, SharkValue* value) {
 343     return value && (index < callee()->return_type()->size() ||
 344                      value->is_jobject());


 405           llvm::PointerType::getUnqual(
 406             llvm::ArrayType::get(
 407               SharkType::intptr_type(),
 408               max_locals() + max_monitors() * 2)))) {}
 409 
 410  private:
 411   llvm::Value* _osr_buf;
 412 
 413  private:
 414   llvm::Value* osr_buf() const {
 415     return _osr_buf;
 416   }
 417 
 418   // Callbacks
 419  protected:
 420   void process_monitor(int index, int box_offset, int obj_offset);
 421   void process_local_slot(int index, SharkValue** value, int offset);
 422 
 423   // Helper
 424  private:
 425   llvm::Value* CreateAddressOfOSRBufEntry(int offset, llvm::Type* type);
 426 };
 427 
 428 #endif // SHARE_VM_SHARK_SHARKCACHEDECACHE_HPP