< prev index next >

src/hotspot/share/c1/c1_Instruction.hpp

Print this page




2105 
2106   // accessors
2107   Value tag() const                              { return _tag; }
2108   int length() const                             { return number_of_sux() - 1; }
2109 
2110   virtual bool needs_exception_state() const     { return false; }
2111 
2112   // generic
2113   virtual void input_values_do(ValueVisitor* f)   { BlockEnd::input_values_do(f); f->visit(&_tag); }
2114 };
2115 
2116 
2117 LEAF(TableSwitch, Switch)
2118  private:
2119   int _lo_key;
2120 
2121  public:
2122   // creation
2123   TableSwitch(Value tag, BlockList* sux, int lo_key, ValueStack* state_before, bool is_safepoint)
2124     : Switch(tag, sux, state_before, is_safepoint)
2125   , _lo_key(lo_key) {}
2126 
2127   // accessors
2128   int lo_key() const                             { return _lo_key; }
2129   int hi_key() const                             { return _lo_key + length() - 1; }
2130 };
2131 
2132 
2133 LEAF(LookupSwitch, Switch)
2134  private:
2135   intArray* _keys;
2136 
2137  public:
2138   // creation
2139   LookupSwitch(Value tag, BlockList* sux, intArray* keys, ValueStack* state_before, bool is_safepoint)
2140   : Switch(tag, sux, state_before, is_safepoint)
2141   , _keys(keys) {
2142     assert(keys != NULL, "keys must exist");
2143     assert(keys->length() == length(), "sux & keys have incompatible lengths");
2144   }
2145 
2146   // accessors
2147   int key_at(int i) const                        { return _keys->at(i); }
2148 };
2149 




2105 
2106   // accessors
2107   Value tag() const                              { return _tag; }
2108   int length() const                             { return number_of_sux() - 1; }
2109 
2110   virtual bool needs_exception_state() const     { return false; }
2111 
2112   // generic
2113   virtual void input_values_do(ValueVisitor* f)   { BlockEnd::input_values_do(f); f->visit(&_tag); }
2114 };
2115 
2116 
2117 LEAF(TableSwitch, Switch)
2118  private:
2119   int _lo_key;
2120 
2121  public:
2122   // creation
2123   TableSwitch(Value tag, BlockList* sux, int lo_key, ValueStack* state_before, bool is_safepoint)
2124     : Switch(tag, sux, state_before, is_safepoint)
2125   , _lo_key(lo_key) { assert(_lo_key <= hi_key(), "integer overflow"); }
2126 
2127   // accessors
2128   int lo_key() const                             { return _lo_key; }
2129   int hi_key() const                             { return _lo_key + (length() - 1); }
2130 };
2131 
2132 
2133 LEAF(LookupSwitch, Switch)
2134  private:
2135   intArray* _keys;
2136 
2137  public:
2138   // creation
2139   LookupSwitch(Value tag, BlockList* sux, intArray* keys, ValueStack* state_before, bool is_safepoint)
2140   : Switch(tag, sux, state_before, is_safepoint)
2141   , _keys(keys) {
2142     assert(keys != NULL, "keys must exist");
2143     assert(keys->length() == length(), "sux & keys have incompatible lengths");
2144   }
2145 
2146   // accessors
2147   int key_at(int i) const                        { return _keys->at(i); }
2148 };
2149 


< prev index next >