< prev index next >

src/hotspot/share/c1/c1_CodeStubs.hpp

Print this page
rev 49800 : 8201593: Print array length in ArrayIndexOutOfBoundsException.


 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   RangeCheckStub(CodeEmitInfo* info, LIR_Opr index, LIR_Opr array);
 155   virtual void emit_code(LIR_Assembler* e);
 156   virtual CodeEmitInfo* info() const             { return _info; }
 157   virtual bool is_exception_throw_stub() const   { return true; }
 158   virtual bool is_range_check_stub() const       { return true; }
 159   virtual void visit(LIR_OpVisitState* visitor) {
 160     visitor->do_slow_case(_info);
 161     visitor->do_input(_index);
 162     if (_array) { visitor->do_input(_array); }
 163   }
 164 #ifndef PRODUCT
 165   virtual void print_name(outputStream* out) const { out->print("RangeCheckStub"); }
 166 #endif // PRODUCT
 167 };
 168 
 169 // stub used when predicate fails and deoptimization is needed
 170 class PredicateFailedStub: public CodeStub {
 171  private:
 172   CodeEmitInfo* _info;
 173 
 174  public:
 175   PredicateFailedStub(CodeEmitInfo* info);
 176   virtual void emit_code(LIR_Assembler* e);
 177   virtual CodeEmitInfo* info() const             { return _info; }
 178   virtual void visit(LIR_OpVisitState* visitor) {
 179     visitor->do_slow_case(_info);
 180   }
 181 #ifndef PRODUCT
 182   virtual void print_name(outputStream* out) const { out->print("PredicateFailedStub"); }


< prev index next >