< prev index next >

src/hotspot/share/c1/c1_ValueStack.hpp

Print this page


 187   Value pop(ValueType* type) {
 188     switch (type->tag()) {
 189       case intTag    : return ipop();
 190       case longTag   : return lpop();
 191       case floatTag  : return fpop();
 192       case doubleTag : return dpop();
 193       case objectTag : return apop();
 194       case addressTag: return rpop();
 195       default        : ShouldNotReachHere(); return NULL;
 196     }
 197   }
 198 
 199   Values* pop_arguments(int argument_size);
 200 
 201   // locks access
 202   int lock  (Value obj);
 203   int unlock();
 204   Value lock_at(int i) const                     { return _locks.at(i); }
 205 
 206   // SSA form IR support
 207   void setup_phi_for_stack(BlockBegin* b, int index);
 208   void setup_phi_for_local(BlockBegin* b, int index);


 209 
 210   // debugging
 211   void print()  PRODUCT_RETURN;
 212   void verify() PRODUCT_RETURN;
 213 };
 214 
 215 
 216 
 217 // Macro definitions for simple iteration of stack and local values of a ValueStack
 218 // The macros can be used like a for-loop. All variables (state, index and value)
 219 // must be defined before the loop.
 220 // When states are nested because of inlining, the stack of the innermost state
 221 // cumulates also the stack of the nested states. In contrast, the locals of all
 222 // states must be iterated each.
 223 // Use the following code pattern to iterate all stack values and all nested local values:
 224 //
 225 // ValueStack* state = ...   // state that is iterated
 226 // int index;                // current loop index (overwritten in loop)
 227 // Value value;              // value at current loop index (overwritten in loop)
 228 //




 187   Value pop(ValueType* type) {
 188     switch (type->tag()) {
 189       case intTag    : return ipop();
 190       case longTag   : return lpop();
 191       case floatTag  : return fpop();
 192       case doubleTag : return dpop();
 193       case objectTag : return apop();
 194       case addressTag: return rpop();
 195       default        : ShouldNotReachHere(); return NULL;
 196     }
 197   }
 198 
 199   Values* pop_arguments(int argument_size);
 200 
 201   // locks access
 202   int lock  (Value obj);
 203   int unlock();
 204   Value lock_at(int i) const                     { return _locks.at(i); }
 205 
 206   // SSA form IR support
 207   void setup_phi_for_stack(BlockBegin* b, int index, Value existing_value, Value new_value);
 208   void setup_phi_for_local(BlockBegin* b, int index, Value existing_value, Value new_value);
 209 
 210   ciType* merge_if_flattened_array_types(Value existing_value, Value new_value);
 211 
 212   // debugging
 213   void print()  PRODUCT_RETURN;
 214   void verify() PRODUCT_RETURN;
 215 };
 216 
 217 
 218 
 219 // Macro definitions for simple iteration of stack and local values of a ValueStack
 220 // The macros can be used like a for-loop. All variables (state, index and value)
 221 // must be defined before the loop.
 222 // When states are nested because of inlining, the stack of the innermost state
 223 // cumulates also the stack of the nested states. In contrast, the locals of all
 224 // states must be iterated each.
 225 // Use the following code pattern to iterate all stack values and all nested local values:
 226 //
 227 // ValueStack* state = ...   // state that is iterated
 228 // int index;                // current loop index (overwritten in loop)
 229 // Value value;              // value at current loop index (overwritten in loop)
 230 //


< prev index next >