< prev index next >

src/hotspot/share/c1/c1_CodeStubs.hpp

Print this page




 215  private:
 216   CodeEmitInfo* _info;
 217   int           _offset;
 218 
 219  public:
 220   ImplicitNullCheckStub(int offset, CodeEmitInfo* info)
 221     : _info(info), _offset(offset) {
 222   }
 223   virtual void emit_code(LIR_Assembler* e);
 224   virtual CodeEmitInfo* info() const             { return _info; }
 225   virtual bool is_exception_throw_stub() const   { return true; }
 226   virtual void visit(LIR_OpVisitState* visitor) {
 227     visitor->do_slow_case(_info);
 228   }
 229 #ifndef PRODUCT
 230   virtual void print_name(outputStream* out) const { out->print("ImplicitNullCheckStub"); }
 231 #endif // PRODUCT
 232 };
 233 
 234 













































































 235 class NewInstanceStub: public CodeStub {
 236  private:
 237   ciInstanceKlass* _klass;
 238   LIR_Opr          _klass_reg;
 239   LIR_Opr          _result;
 240   CodeEmitInfo*    _info;
 241   Runtime1::StubID _stub_id;
 242 
 243  public:
 244   NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id);
 245   virtual void emit_code(LIR_Assembler* e);
 246   virtual CodeEmitInfo* info() const             { return _info; }
 247   virtual void visit(LIR_OpVisitState* visitor) {
 248     visitor->do_slow_case(_info);
 249     visitor->do_input(_klass_reg);
 250     visitor->do_output(_result);
 251   }
 252 #ifndef PRODUCT
 253   virtual void print_name(outputStream* out) const { out->print("NewInstanceStub"); }
 254 #endif // PRODUCT


 267   virtual void emit_code(LIR_Assembler* e);
 268   virtual CodeEmitInfo* info() const             { return _info; }
 269   virtual void visit(LIR_OpVisitState* visitor) {
 270     visitor->do_slow_case(_info);
 271     visitor->do_input(_klass_reg);
 272     visitor->do_input(_length);
 273     assert(_result->is_valid(), "must be valid"); visitor->do_output(_result);
 274   }
 275 #ifndef PRODUCT
 276   virtual void print_name(outputStream* out) const { out->print("NewTypeArrayStub"); }
 277 #endif // PRODUCT
 278 };
 279 
 280 
 281 class NewObjectArrayStub: public CodeStub {
 282  private:
 283   LIR_Opr        _klass_reg;
 284   LIR_Opr        _length;
 285   LIR_Opr        _result;
 286   CodeEmitInfo*  _info;
 287 
 288  public:
 289   NewObjectArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info);
 290   virtual void emit_code(LIR_Assembler* e);
 291   virtual CodeEmitInfo* info() const             { return _info; }
 292   virtual void visit(LIR_OpVisitState* visitor) {
 293     visitor->do_slow_case(_info);
 294     visitor->do_input(_klass_reg);
 295     visitor->do_input(_length);
 296     assert(_result->is_valid(), "must be valid"); visitor->do_output(_result);
 297   }
 298 #ifndef PRODUCT
 299   virtual void print_name(outputStream* out) const { out->print("NewObjectArrayStub"); }
 300 #endif // PRODUCT
 301 };
 302 
 303 
 304 class MonitorAccessStub: public CodeStub {
 305  protected:
 306   LIR_Opr _obj_reg;
 307   LIR_Opr _lock_reg;
 308 
 309  public:
 310   MonitorAccessStub(LIR_Opr obj_reg, LIR_Opr lock_reg) {
 311     _obj_reg  = obj_reg;
 312     _lock_reg  = lock_reg;
 313   }
 314 
 315 #ifndef PRODUCT
 316   virtual void print_name(outputStream* out) const { out->print("MonitorAccessStub"); }
 317 #endif // PRODUCT
 318 };
 319 
 320 
 321 class MonitorEnterStub: public MonitorAccessStub {
 322  private:
 323   CodeEmitInfo* _info;


 324 
 325  public:
 326   MonitorEnterStub(LIR_Opr obj_reg, LIR_Opr lock_reg, CodeEmitInfo* info);
 327 
 328   virtual void emit_code(LIR_Assembler* e);
 329   virtual CodeEmitInfo* info() const             { return _info; }
 330   virtual void visit(LIR_OpVisitState* visitor) {
 331     visitor->do_input(_obj_reg);
 332     visitor->do_input(_lock_reg);



 333     visitor->do_slow_case(_info);
 334   }
 335 #ifndef PRODUCT
 336   virtual void print_name(outputStream* out) const { out->print("MonitorEnterStub"); }
 337 #endif // PRODUCT
 338 };
 339 
 340 
 341 class MonitorExitStub: public MonitorAccessStub {
 342  private:
 343   bool _compute_lock;
 344   int  _monitor_ix;
 345 
 346  public:
 347   MonitorExitStub(LIR_Opr lock_reg, bool compute_lock, int monitor_ix)
 348     : MonitorAccessStub(LIR_OprFact::illegalOpr, lock_reg),
 349       _compute_lock(compute_lock), _monitor_ix(monitor_ix) { }
 350   virtual void emit_code(LIR_Assembler* e);
 351   virtual void visit(LIR_OpVisitState* visitor) {
 352     assert(_obj_reg->is_illegal(), "unused");




 215  private:
 216   CodeEmitInfo* _info;
 217   int           _offset;
 218 
 219  public:
 220   ImplicitNullCheckStub(int offset, CodeEmitInfo* info)
 221     : _info(info), _offset(offset) {
 222   }
 223   virtual void emit_code(LIR_Assembler* e);
 224   virtual CodeEmitInfo* info() const             { return _info; }
 225   virtual bool is_exception_throw_stub() const   { return true; }
 226   virtual void visit(LIR_OpVisitState* visitor) {
 227     visitor->do_slow_case(_info);
 228   }
 229 #ifndef PRODUCT
 230   virtual void print_name(outputStream* out) const { out->print("ImplicitNullCheckStub"); }
 231 #endif // PRODUCT
 232 };
 233 
 234 
 235 class LoadFlattenedArrayStub: public CodeStub {
 236  private:
 237   LIR_Opr          _array;
 238   LIR_Opr          _index;
 239   LIR_Opr          _result;
 240   LIR_Opr          _scratch_reg;
 241   CodeEmitInfo*    _info;
 242 
 243  public:
 244   LoadFlattenedArrayStub(LIR_Opr array, LIR_Opr index, LIR_Opr result, CodeEmitInfo* info);
 245   virtual void emit_code(LIR_Assembler* e);
 246   virtual CodeEmitInfo* info() const             { return _info; }
 247   virtual void visit(LIR_OpVisitState* visitor) {
 248     visitor->do_slow_case(_info);
 249     visitor->do_input(_array);
 250     visitor->do_input(_index);
 251     visitor->do_output(_result);
 252     if (_scratch_reg != LIR_OprFact::illegalOpr) {
 253       visitor->do_temp(_scratch_reg);
 254     }
 255   }
 256 
 257 #ifndef PRODUCT
 258   virtual void print_name(outputStream* out) const { out->print("LoadFlattenedArrayStub"); }
 259 #endif // PRODUCT
 260 };
 261 
 262 
 263 class StoreFlattenedArrayStub: public CodeStub {
 264  private:
 265   LIR_Opr          _array;
 266   LIR_Opr          _index;
 267   LIR_Opr          _value;
 268   LIR_Opr          _scratch_reg;
 269   CodeEmitInfo*    _info;
 270 
 271  public:
 272   StoreFlattenedArrayStub(LIR_Opr array, LIR_Opr index, LIR_Opr value, CodeEmitInfo* info);
 273   virtual void emit_code(LIR_Assembler* e);
 274   virtual CodeEmitInfo* info() const             { return _info; }
 275   virtual void visit(LIR_OpVisitState* visitor) {
 276     visitor->do_slow_case(_info);
 277     visitor->do_input(_array);
 278     visitor->do_input(_index);
 279     visitor->do_input(_value);
 280     if (_scratch_reg != LIR_OprFact::illegalOpr) {
 281       visitor->do_temp(_scratch_reg);
 282     }
 283   }
 284 #ifndef PRODUCT
 285   virtual void print_name(outputStream* out) const { out->print("StoreFlattenedArrayStub"); }
 286 #endif // PRODUCT
 287 };
 288 
 289 class SubstitutabilityCheckStub: public CodeStub {
 290  private:
 291   LIR_Opr          _left;
 292   LIR_Opr          _right;
 293   LIR_Opr          _scratch_reg;
 294   CodeEmitInfo*    _info;
 295  public:
 296   SubstitutabilityCheckStub(LIR_Opr left, LIR_Opr right, CodeEmitInfo* info);
 297   virtual void emit_code(LIR_Assembler* e);
 298   virtual CodeEmitInfo* info() const             { return _info; }
 299   virtual void visit(LIR_OpVisitState* visitor) {
 300     visitor->do_slow_case(_info);
 301     visitor->do_input(_left);
 302     visitor->do_input(_right);
 303     if (_scratch_reg != LIR_OprFact::illegalOpr) {
 304       visitor->do_temp(_scratch_reg);
 305     }
 306   }
 307 #ifndef PRODUCT
 308   virtual void print_name(outputStream* out) const { out->print("SubstitutabilityCheckStub"); }
 309 #endif // PRODUCT
 310 };
 311 
 312 class NewInstanceStub: public CodeStub {
 313  private:
 314   ciInstanceKlass* _klass;
 315   LIR_Opr          _klass_reg;
 316   LIR_Opr          _result;
 317   CodeEmitInfo*    _info;
 318   Runtime1::StubID _stub_id;
 319 
 320  public:
 321   NewInstanceStub(LIR_Opr klass_reg, LIR_Opr result, ciInstanceKlass* klass, CodeEmitInfo* info, Runtime1::StubID stub_id);
 322   virtual void emit_code(LIR_Assembler* e);
 323   virtual CodeEmitInfo* info() const             { return _info; }
 324   virtual void visit(LIR_OpVisitState* visitor) {
 325     visitor->do_slow_case(_info);
 326     visitor->do_input(_klass_reg);
 327     visitor->do_output(_result);
 328   }
 329 #ifndef PRODUCT
 330   virtual void print_name(outputStream* out) const { out->print("NewInstanceStub"); }
 331 #endif // PRODUCT


 344   virtual void emit_code(LIR_Assembler* e);
 345   virtual CodeEmitInfo* info() const             { return _info; }
 346   virtual void visit(LIR_OpVisitState* visitor) {
 347     visitor->do_slow_case(_info);
 348     visitor->do_input(_klass_reg);
 349     visitor->do_input(_length);
 350     assert(_result->is_valid(), "must be valid"); visitor->do_output(_result);
 351   }
 352 #ifndef PRODUCT
 353   virtual void print_name(outputStream* out) const { out->print("NewTypeArrayStub"); }
 354 #endif // PRODUCT
 355 };
 356 
 357 
 358 class NewObjectArrayStub: public CodeStub {
 359  private:
 360   LIR_Opr        _klass_reg;
 361   LIR_Opr        _length;
 362   LIR_Opr        _result;
 363   CodeEmitInfo*  _info;
 364   bool           _is_value_type;
 365  public:
 366   NewObjectArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info, bool is_value_type);
 367   virtual void emit_code(LIR_Assembler* e);
 368   virtual CodeEmitInfo* info() const             { return _info; }
 369   virtual void visit(LIR_OpVisitState* visitor) {
 370     visitor->do_slow_case(_info);
 371     visitor->do_input(_klass_reg);
 372     visitor->do_input(_length);
 373     assert(_result->is_valid(), "must be valid"); visitor->do_output(_result);
 374   }
 375 #ifndef PRODUCT
 376   virtual void print_name(outputStream* out) const { out->print("NewObjectArrayStub"); }
 377 #endif // PRODUCT
 378 };
 379 
 380 
 381 class MonitorAccessStub: public CodeStub {
 382  protected:
 383   LIR_Opr _obj_reg;
 384   LIR_Opr _lock_reg;
 385 
 386  public:
 387   MonitorAccessStub(LIR_Opr obj_reg, LIR_Opr lock_reg) {
 388     _obj_reg  = obj_reg;
 389     _lock_reg  = lock_reg;
 390   }
 391 
 392 #ifndef PRODUCT
 393   virtual void print_name(outputStream* out) const { out->print("MonitorAccessStub"); }
 394 #endif // PRODUCT
 395 };
 396 
 397 
 398 class MonitorEnterStub: public MonitorAccessStub {
 399  private:
 400   CodeEmitInfo* _info;
 401   CodeStub* _throw_imse_stub;
 402   LIR_Opr _scratch_reg;
 403 
 404  public:
 405   MonitorEnterStub(LIR_Opr obj_reg, LIR_Opr lock_reg, CodeEmitInfo* info, CodeStub* throw_imse_stub = NULL, LIR_Opr scratch_reg = LIR_OprFact::illegalOpr);
 406 
 407   virtual void emit_code(LIR_Assembler* e);
 408   virtual CodeEmitInfo* info() const             { return _info; }
 409   virtual void visit(LIR_OpVisitState* visitor) {
 410     visitor->do_input(_obj_reg);
 411     visitor->do_input(_lock_reg);
 412     if (_scratch_reg != LIR_OprFact::illegalOpr) {
 413       visitor->do_temp(_scratch_reg);
 414     }
 415     visitor->do_slow_case(_info);
 416   }
 417 #ifndef PRODUCT
 418   virtual void print_name(outputStream* out) const { out->print("MonitorEnterStub"); }
 419 #endif // PRODUCT
 420 };
 421 
 422 
 423 class MonitorExitStub: public MonitorAccessStub {
 424  private:
 425   bool _compute_lock;
 426   int  _monitor_ix;
 427 
 428  public:
 429   MonitorExitStub(LIR_Opr lock_reg, bool compute_lock, int monitor_ix)
 430     : MonitorAccessStub(LIR_OprFact::illegalOpr, lock_reg),
 431       _compute_lock(compute_lock), _monitor_ix(monitor_ix) { }
 432   virtual void emit_code(LIR_Assembler* e);
 433   virtual void visit(LIR_OpVisitState* visitor) {
 434     assert(_obj_reg->is_illegal(), "unused");


< prev index next >