< prev index next >

src/hotspot/share/c1/c1_CodeStubs.hpp

Print this page
*** 314,16 ***
  
  
  class MonitorAccessStub: public CodeStub {
   protected:
    LIR_Opr _obj_reg;
-   LIR_Opr _lock_reg;
  
   public:
!   MonitorAccessStub(LIR_Opr obj_reg, LIR_Opr lock_reg) {
      _obj_reg  = obj_reg;
-     _lock_reg  = lock_reg;
    }
  
  #ifndef PRODUCT
    virtual void print_name(outputStream* out) const { out->print("MonitorAccessStub"); }
  #endif // PRODUCT
--- 314,14 ---
  
  
  class MonitorAccessStub: public CodeStub {
   protected:
    LIR_Opr _obj_reg;
  
   public:
!   MonitorAccessStub(LIR_Opr obj_reg) {
      _obj_reg  = obj_reg;
    }
  
  #ifndef PRODUCT
    virtual void print_name(outputStream* out) const { out->print("MonitorAccessStub"); }
  #endif // PRODUCT

*** 333,42 ***
  class MonitorEnterStub: public MonitorAccessStub {
   private:
    CodeEmitInfo* _info;
  
   public:
!   MonitorEnterStub(LIR_Opr obj_reg, LIR_Opr lock_reg, CodeEmitInfo* info);
  
    virtual void emit_code(LIR_Assembler* e);
    virtual CodeEmitInfo* info() const             { return _info; }
    virtual void visit(LIR_OpVisitState* visitor) {
      visitor->do_input(_obj_reg);
!     visitor->do_input(_lock_reg);
      visitor->do_slow_case(_info);
    }
  #ifndef PRODUCT
    virtual void print_name(outputStream* out) const { out->print("MonitorEnterStub"); }
  #endif // PRODUCT
  };
  
  
  class MonitorExitStub: public MonitorAccessStub {
-  private:
-   bool _compute_lock;
-   int  _monitor_ix;
- 
   public:
!   MonitorExitStub(LIR_Opr lock_reg, bool compute_lock, int monitor_ix)
!     : MonitorAccessStub(LIR_OprFact::illegalOpr, lock_reg),
-       _compute_lock(compute_lock), _monitor_ix(monitor_ix) { }
    virtual void emit_code(LIR_Assembler* e);
    virtual void visit(LIR_OpVisitState* visitor) {
!     assert(_obj_reg->is_illegal(), "unused");
!     if (_compute_lock) {
-       visitor->do_temp(_lock_reg);
-     } else {
-       visitor->do_input(_lock_reg);
-     }
    }
  #ifndef PRODUCT
    virtual void print_name(outputStream* out) const { out->print("MonitorExitStub"); }
  #endif // PRODUCT
  };
--- 331,33 ---
  class MonitorEnterStub: public MonitorAccessStub {
   private:
    CodeEmitInfo* _info;
  
   public:
!   MonitorEnterStub(LIR_Opr obj_reg, CodeEmitInfo* info);
  
    virtual void emit_code(LIR_Assembler* e);
    virtual CodeEmitInfo* info() const             { return _info; }
    virtual void visit(LIR_OpVisitState* visitor) {
      visitor->do_input(_obj_reg);
!     visitor->do_temp(_obj_reg);
      visitor->do_slow_case(_info);
    }
  #ifndef PRODUCT
    virtual void print_name(outputStream* out) const { out->print("MonitorEnterStub"); }
  #endif // PRODUCT
  };
  
  
  class MonitorExitStub: public MonitorAccessStub {
   public:
!   MonitorExitStub(LIR_Opr obj_reg)
!     : MonitorAccessStub(obj_reg) { }
    virtual void emit_code(LIR_Assembler* e);
    virtual void visit(LIR_OpVisitState* visitor) {
!     visitor->do_input(_obj_reg);
!     visitor->do_temp(_obj_reg);
    }
  #ifndef PRODUCT
    virtual void print_name(outputStream* out) const { out->print("MonitorExitStub"); }
  #endif // PRODUCT
  };

*** 552,6 ***
--- 541,25 ---
  #ifndef PRODUCT
    virtual void print_name(outputStream* out) const { out->print("ArrayCopyStub"); }
  #endif // PRODUCT
  };
  
+ class LoadKlassStub: public CodeStub {
+ private:
+   LIR_Opr          _obj;
+   LIR_Opr          _result;
+ 
+ public:
+   LoadKlassStub(LIR_Opr obj, LIR_Opr result) :
+     CodeStub(), _obj(obj), _result(result) {};
+ 
+   virtual void emit_code(LIR_Assembler* e);
+   virtual void visit(LIR_OpVisitState* visitor) {
+     visitor->do_input(_obj);
+     visitor->do_output(_result);
+   }
+ #ifndef PRODUCT
+ virtual void print_name(outputStream* out) const { out->print("LoadKlassStub"); }
+ #endif // PRODUCT
+ };
+ 
  #endif // SHARE_C1_C1_CODESTUBS_HPP
< prev index next >