< prev index next >

src/hotspot/share/c1/c1_CodeStubs.hpp

Print this page

299 
300  public:
301   NewObjectArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info);
302   virtual void emit_code(LIR_Assembler* e);
303   virtual CodeEmitInfo* info() const             { return _info; }
304   virtual void visit(LIR_OpVisitState* visitor) {
305     visitor->do_slow_case(_info);
306     visitor->do_input(_klass_reg);
307     visitor->do_input(_length);
308     assert(_result->is_valid(), "must be valid"); visitor->do_output(_result);
309   }
310 #ifndef PRODUCT
311   virtual void print_name(outputStream* out) const { out->print("NewObjectArrayStub"); }
312 #endif // PRODUCT
313 };
314 
315 
316 class MonitorAccessStub: public CodeStub {
317  protected:
318   LIR_Opr _obj_reg;
319   LIR_Opr _lock_reg;
320 
321  public:
322   MonitorAccessStub(LIR_Opr obj_reg, LIR_Opr lock_reg) {
323     _obj_reg  = obj_reg;
324     _lock_reg  = lock_reg;
325   }
326 
327 #ifndef PRODUCT
328   virtual void print_name(outputStream* out) const { out->print("MonitorAccessStub"); }
329 #endif // PRODUCT
330 };
331 
332 
333 class MonitorEnterStub: public MonitorAccessStub {
334  private:
335   CodeEmitInfo* _info;
336 
337  public:
338   MonitorEnterStub(LIR_Opr obj_reg, LIR_Opr lock_reg, CodeEmitInfo* info);
339 
340   virtual void emit_code(LIR_Assembler* e);
341   virtual CodeEmitInfo* info() const             { return _info; }
342   virtual void visit(LIR_OpVisitState* visitor) {
343     visitor->do_input(_obj_reg);
344     visitor->do_input(_lock_reg);
345     visitor->do_slow_case(_info);
346   }
347 #ifndef PRODUCT
348   virtual void print_name(outputStream* out) const { out->print("MonitorEnterStub"); }
349 #endif // PRODUCT
350 };
351 
352 
353 class MonitorExitStub: public MonitorAccessStub {
354  private:
355   bool _compute_lock;
356   int  _monitor_ix;
357 
358  public:
359   MonitorExitStub(LIR_Opr lock_reg, bool compute_lock, int monitor_ix)
360     : MonitorAccessStub(LIR_OprFact::illegalOpr, lock_reg),
361       _compute_lock(compute_lock), _monitor_ix(monitor_ix) { }
362   virtual void emit_code(LIR_Assembler* e);
363   virtual void visit(LIR_OpVisitState* visitor) {
364     assert(_obj_reg->is_illegal(), "unused");
365     if (_compute_lock) {
366       visitor->do_temp(_lock_reg);
367     } else {
368       visitor->do_input(_lock_reg);
369     }
370   }
371 #ifndef PRODUCT
372   virtual void print_name(outputStream* out) const { out->print("MonitorExitStub"); }
373 #endif // PRODUCT
374 };
375 
376 
377 class PatchingStub: public CodeStub {
378  public:
379   enum PatchID {
380     access_field_id,
381     load_klass_id,
382     load_mirror_id,
383     load_appendix_id
384   };
385   enum constants {
386     patch_info_size = 3
387   };
388  private:
389   PatchID       _id;

537   ArrayCopyStub(LIR_OpArrayCopy* op): _op(op) { }
538 
539   LIR_Opr src() const                         { return _op->src(); }
540   LIR_Opr src_pos() const                     { return _op->src_pos(); }
541   LIR_Opr dst() const                         { return _op->dst(); }
542   LIR_Opr dst_pos() const                     { return _op->dst_pos(); }
543   LIR_Opr length() const                      { return _op->length(); }
544   LIR_Opr tmp() const                         { return _op->tmp(); }
545 
546   virtual void emit_code(LIR_Assembler* e);
547   virtual CodeEmitInfo* info() const          { return _op->info(); }
548   virtual void visit(LIR_OpVisitState* visitor) {
549     // don't pass in the code emit info since it's processed in the fast path
550     visitor->do_slow_case();
551   }
552 #ifndef PRODUCT
553   virtual void print_name(outputStream* out) const { out->print("ArrayCopyStub"); }
554 #endif // PRODUCT
555 };
556 



















557 #endif // SHARE_C1_C1_CODESTUBS_HPP

299 
300  public:
301   NewObjectArrayStub(LIR_Opr klass_reg, LIR_Opr length, LIR_Opr result, CodeEmitInfo* info);
302   virtual void emit_code(LIR_Assembler* e);
303   virtual CodeEmitInfo* info() const             { return _info; }
304   virtual void visit(LIR_OpVisitState* visitor) {
305     visitor->do_slow_case(_info);
306     visitor->do_input(_klass_reg);
307     visitor->do_input(_length);
308     assert(_result->is_valid(), "must be valid"); visitor->do_output(_result);
309   }
310 #ifndef PRODUCT
311   virtual void print_name(outputStream* out) const { out->print("NewObjectArrayStub"); }
312 #endif // PRODUCT
313 };
314 
315 
316 class MonitorAccessStub: public CodeStub {
317  protected:
318   LIR_Opr _obj_reg;

319 
320  public:
321   MonitorAccessStub(LIR_Opr obj_reg) {
322     _obj_reg  = obj_reg;

323   }
324 
325 #ifndef PRODUCT
326   virtual void print_name(outputStream* out) const { out->print("MonitorAccessStub"); }
327 #endif // PRODUCT
328 };
329 
330 
331 class MonitorEnterStub: public MonitorAccessStub {
332  private:
333   CodeEmitInfo* _info;
334 
335  public:
336   MonitorEnterStub(LIR_Opr obj_reg, CodeEmitInfo* info);
337 
338   virtual void emit_code(LIR_Assembler* e);
339   virtual CodeEmitInfo* info() const             { return _info; }
340   virtual void visit(LIR_OpVisitState* visitor) {
341     visitor->do_input(_obj_reg);
342     visitor->do_temp(_obj_reg);
343     visitor->do_slow_case(_info);
344   }
345 #ifndef PRODUCT
346   virtual void print_name(outputStream* out) const { out->print("MonitorEnterStub"); }
347 #endif // PRODUCT
348 };
349 
350 
351 class MonitorExitStub: public MonitorAccessStub {




352  public:
353   MonitorExitStub(LIR_Opr obj_reg)
354     : MonitorAccessStub(obj_reg) { }

355   virtual void emit_code(LIR_Assembler* e);
356   virtual void visit(LIR_OpVisitState* visitor) {
357     visitor->do_input(_obj_reg);
358     visitor->do_temp(_obj_reg);




359   }
360 #ifndef PRODUCT
361   virtual void print_name(outputStream* out) const { out->print("MonitorExitStub"); }
362 #endif // PRODUCT
363 };
364 
365 
366 class PatchingStub: public CodeStub {
367  public:
368   enum PatchID {
369     access_field_id,
370     load_klass_id,
371     load_mirror_id,
372     load_appendix_id
373   };
374   enum constants {
375     patch_info_size = 3
376   };
377  private:
378   PatchID       _id;

526   ArrayCopyStub(LIR_OpArrayCopy* op): _op(op) { }
527 
528   LIR_Opr src() const                         { return _op->src(); }
529   LIR_Opr src_pos() const                     { return _op->src_pos(); }
530   LIR_Opr dst() const                         { return _op->dst(); }
531   LIR_Opr dst_pos() const                     { return _op->dst_pos(); }
532   LIR_Opr length() const                      { return _op->length(); }
533   LIR_Opr tmp() const                         { return _op->tmp(); }
534 
535   virtual void emit_code(LIR_Assembler* e);
536   virtual CodeEmitInfo* info() const          { return _op->info(); }
537   virtual void visit(LIR_OpVisitState* visitor) {
538     // don't pass in the code emit info since it's processed in the fast path
539     visitor->do_slow_case();
540   }
541 #ifndef PRODUCT
542   virtual void print_name(outputStream* out) const { out->print("ArrayCopyStub"); }
543 #endif // PRODUCT
544 };
545 
546 class LoadKlassStub: public CodeStub {
547 private:
548   LIR_Opr          _obj;
549   LIR_Opr          _result;
550 
551 public:
552   LoadKlassStub(LIR_Opr obj, LIR_Opr result) :
553     CodeStub(), _obj(obj), _result(result) {};
554 
555   virtual void emit_code(LIR_Assembler* e);
556   virtual void visit(LIR_OpVisitState* visitor) {
557     visitor->do_input(_obj);
558     visitor->do_output(_result);
559   }
560 #ifndef PRODUCT
561 virtual void print_name(outputStream* out) const { out->print("LoadKlassStub"); }
562 #endif // PRODUCT
563 };
564 
565 #endif // SHARE_C1_C1_CODESTUBS_HPP
< prev index next >