< prev index next >

src/hotspot/share/c1/c1_CodeStubs.hpp

Print this page
rev 49948 : 8201593: Print array length in ArrayIndexOutOfBoundsException.
Reviewed-by: dholmes, mdoerr, smonteith


 130   LIR_Opr         result()   { return _result; }
 131 
 132   virtual void emit_code(LIR_Assembler* e);
 133   virtual void visit(LIR_OpVisitState* visitor) {
 134     visitor->do_slow_case();
 135     visitor->do_input(_input);
 136     visitor->do_output(_result);
 137   }
 138 #ifndef PRODUCT
 139   virtual void print_name(outputStream* out) const { out->print("ConversionStub"); }
 140 #endif // PRODUCT
 141 };
 142 
 143 
 144 // Throws ArrayIndexOutOfBoundsException by default but can be
 145 // configured to throw IndexOutOfBoundsException in constructor
 146 class RangeCheckStub: public CodeStub {
 147  private:
 148   CodeEmitInfo* _info;
 149   LIR_Opr       _index;

 150   bool          _throw_index_out_of_bounds_exception;
 151 
 152  public:
 153   RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, bool throw_index_out_of_bounds_exception = false);



 154   virtual void emit_code(LIR_Assembler* e);
 155   virtual CodeEmitInfo* info() const             { return _info; }
 156   virtual bool is_exception_throw_stub() const   { return true; }
 157   virtual bool is_range_check_stub() const       { return true; }
 158   virtual void visit(LIR_OpVisitState* visitor) {
 159     visitor->do_slow_case(_info);
 160     visitor->do_input(_index);

 161   }
 162 #ifndef PRODUCT
 163   virtual void print_name(outputStream* out) const { out->print("RangeCheckStub"); }
 164 #endif // PRODUCT
 165 };
 166 
 167 // stub used when predicate fails and deoptimization is needed
 168 class PredicateFailedStub: public CodeStub {
 169  private:
 170   CodeEmitInfo* _info;
 171 
 172  public:
 173   PredicateFailedStub(CodeEmitInfo* info);
 174   virtual void emit_code(LIR_Assembler* e);
 175   virtual CodeEmitInfo* info() const             { return _info; }
 176   virtual void visit(LIR_OpVisitState* visitor) {
 177     visitor->do_slow_case(_info);
 178   }
 179 #ifndef PRODUCT
 180   virtual void print_name(outputStream* out) const { out->print("PredicateFailedStub"); }




 130   LIR_Opr         result()   { return _result; }
 131 
 132   virtual void emit_code(LIR_Assembler* e);
 133   virtual void visit(LIR_OpVisitState* visitor) {
 134     visitor->do_slow_case();
 135     visitor->do_input(_input);
 136     visitor->do_output(_result);
 137   }
 138 #ifndef PRODUCT
 139   virtual void print_name(outputStream* out) const { out->print("ConversionStub"); }
 140 #endif // PRODUCT
 141 };
 142 
 143 
 144 // Throws ArrayIndexOutOfBoundsException by default but can be
 145 // configured to throw IndexOutOfBoundsException in constructor
 146 class RangeCheckStub: public CodeStub {
 147  private:
 148   CodeEmitInfo* _info;
 149   LIR_Opr       _index;
 150   LIR_Opr       _array;
 151   bool          _throw_index_out_of_bounds_exception;
 152 
 153  public:
 154   // For ArrayIndexOutOfBoundsException.
 155   RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array);
 156   // For IndexOutOfBoundsException.
 157   RangeCheckStub(CodeEmitInfo* info, LIR_Opr index);
 158   virtual void emit_code(LIR_Assembler* e);
 159   virtual CodeEmitInfo* info() const             { return _info; }
 160   virtual bool is_exception_throw_stub() const   { return true; }
 161   virtual bool is_range_check_stub() const       { return true; }
 162   virtual void visit(LIR_OpVisitState* visitor) {
 163     visitor->do_slow_case(_info);
 164     visitor->do_input(_index);
 165     if (_array) { visitor->do_input(_array); }
 166   }
 167 #ifndef PRODUCT
 168   virtual void print_name(outputStream* out) const { out->print("RangeCheckStub"); }
 169 #endif // PRODUCT
 170 };
 171 
 172 // stub used when predicate fails and deoptimization is needed
 173 class PredicateFailedStub: public CodeStub {
 174  private:
 175   CodeEmitInfo* _info;
 176 
 177  public:
 178   PredicateFailedStub(CodeEmitInfo* info);
 179   virtual void emit_code(LIR_Assembler* e);
 180   virtual CodeEmitInfo* info() const             { return _info; }
 181   virtual void visit(LIR_OpVisitState* visitor) {
 182     visitor->do_slow_case(_info);
 183   }
 184 #ifndef PRODUCT
 185   virtual void print_name(outputStream* out) const { out->print("PredicateFailedStub"); }


< prev index next >