src/share/vm/c1/c1_Instruction.hpp

Print this page




 684   // (these should never be referenced, otherwise the bytecodes are illegal)
 685   void   make_illegal() {
 686     set(cannot_simplify);
 687     set_type(illegalType);
 688   }
 689 
 690   bool is_illegal() const {
 691     return type()->is_illegal();
 692   }
 693 
 694   // generic
 695   virtual void input_values_do(ValueVisitor* f) {
 696   }
 697 };
 698 
 699 
 700 // A local is a placeholder for an incoming argument to a function call.
 701 LEAF(Local, Instruction)
 702  private:
 703   int      _java_index;                          // the local index within the method to which the local belongs

 704   ciType*  _declared_type;
 705  public:
 706   // creation
 707   Local(ciType* declared, ValueType* type, int index)
 708     : Instruction(type)
 709     , _java_index(index)
 710     , _declared_type(declared)

 711   {
 712     NOT_PRODUCT(set_printable_bci(-1));
 713   }
 714 
 715   // accessors
 716   int java_index() const                         { return _java_index; }

 717 
 718   virtual ciType* declared_type() const          { return _declared_type; }
 719 
 720   // generic
 721   virtual void input_values_do(ValueVisitor* f)   { /* no values */ }
 722 };
 723 
 724 
 725 LEAF(Constant, Instruction)
 726  public:
 727   // creation
 728   Constant(ValueType* type):
 729       Instruction(type, NULL, /*type_is_constant*/ true)
 730   {
 731     assert(type->is_constant(), "must be a constant");
 732   }
 733 
 734   Constant(ValueType* type, ValueStack* state_before):
 735     Instruction(type, state_before, /*type_is_constant*/ true)
 736   {




 684   // (these should never be referenced, otherwise the bytecodes are illegal)
 685   void   make_illegal() {
 686     set(cannot_simplify);
 687     set_type(illegalType);
 688   }
 689 
 690   bool is_illegal() const {
 691     return type()->is_illegal();
 692   }
 693 
 694   // generic
 695   virtual void input_values_do(ValueVisitor* f) {
 696   }
 697 };
 698 
 699 
 700 // A local is a placeholder for an incoming argument to a function call.
 701 LEAF(Local, Instruction)
 702  private:
 703   int      _java_index;                          // the local index within the method to which the local belongs
 704   bool     _is_receiver;                         // if local variable holds the receiver: "this" for non-static methods
 705   ciType*  _declared_type;
 706  public:
 707   // creation
 708   Local(ciType* declared, ValueType* type, int index, bool receiver)
 709     : Instruction(type)
 710     , _java_index(index)
 711     , _declared_type(declared)
 712     , _is_receiver(receiver)
 713   {
 714     NOT_PRODUCT(set_printable_bci(-1));
 715   }
 716 
 717   // accessors
 718   int java_index() const                         { return _java_index; }
 719   bool is_receiver() const                       { return _is_receiver; }
 720 
 721   virtual ciType* declared_type() const          { return _declared_type; }
 722 
 723   // generic
 724   virtual void input_values_do(ValueVisitor* f)   { /* no values */ }
 725 };
 726 
 727 
 728 LEAF(Constant, Instruction)
 729  public:
 730   // creation
 731   Constant(ValueType* type):
 732       Instruction(type, NULL, /*type_is_constant*/ true)
 733   {
 734     assert(type->is_constant(), "must be a constant");
 735   }
 736 
 737   Constant(ValueType* type, ValueStack* state_before):
 738     Instruction(type, state_before, /*type_is_constant*/ true)
 739   {