< prev index next >

src/share/vm/opto/machnode.cpp

Print this page

        

@@ -191,14 +191,14 @@
 //-----------------------------in_RegMask--------------------------------------
 const RegMask &MachNode::in_RegMask( uint idx ) const {
   uint numopnds = num_opnds();        // Virtual call for number of operands
   uint skipped   = oper_input_base(); // Sum of leaves skipped so far
   if( idx < skipped ) {
-    assert( ideal_Opcode() == Op_AddP, "expected base ptr here" );
+    assert( ideal_Opcode() == Opcodes::Op_AddP, "expected base ptr here" );
     assert( idx == 1, "expected base ptr here" );
     // debug info can be anywhere
-    return *Compile::current()->matcher()->idealreg2spillmask[Op_RegP];
+    return *Compile::current()->matcher()->idealreg2spillmask[static_cast<uint>(Opcodes::Op_RegP)];
   }
   uint opcnt     = 1;                 // First operand
   uint num_edges = _opnds[1]->num_edges(); // leaves for first operand
   while( idx >= skipped+num_edges ) {
     skipped += num_edges;

@@ -442,27 +442,27 @@
   // live range. Remateralizing does not make progress on the that live range.
   if (two_adr()) return false;
 
   // Check for rematerializing float constants, or not
   if (!Matcher::rematerialize_float_constants) {
-    int op = ideal_Opcode();
-    if (op == Op_ConF || op == Op_ConD) {
+    Opcodes op = ideal_Opcode();
+    if (op == Opcodes::Op_ConF || op == Opcodes::Op_ConD) {
       return false;
     }
   }
 
   // Defining flags - can't spill these! Must remateralize.
-  if (ideal_reg() == Op_RegFlags) {
+  if (ideal_reg() == Opcodes::Op_RegFlags) {
     return true;
   }
 
   // Stretching lots of inputs - don't do it.
   if (req() > 2) {
     return false;
   }
 
-  if (req() == 2 && in(1) && in(1)->ideal_reg() == Op_RegFlags) {
+  if (req() == 2 && in(1) && in(1)->ideal_reg() == Opcodes::Op_RegFlags) {
     // In(1) will be rematerialized, too.
     // Stretching lots of inputs - don't do it.
     if (in(1)->req() > 2) {
       return false;
     }

@@ -565,21 +565,21 @@
   else return in(1)->as_Mach()->out_RegMask();
 }
 
 //=============================================================================
 const Type *MachProjNode::bottom_type() const {
-  if( _ideal_reg == fat_proj ) return Type::BOTTOM;
+  if( _ideal_reg == static_cast<Opcodes>(MachProjNode::projType::fat_proj) ) return Type::BOTTOM;
   // Try the normal mechanism first
   const Type *t = in(0)->bottom_type();
   if( t->base() == Type::Tuple ) {
     const TypeTuple *tt = t->is_tuple();
     if (_con < tt->cnt())
       return tt->field_at(_con);
   }
   // Else use generic type from ideal register set
-  assert((uint)_ideal_reg < (uint)_last_machine_leaf && Type::mreg2type[_ideal_reg], "in bounds");
-  return Type::mreg2type[_ideal_reg];
+  assert(_ideal_reg < Opcodes::_last_machine_leaf && Type::mreg2type[static_cast<uint>(_ideal_reg)], "in bounds");
+  return Type::mreg2type[static_cast<uint>(_ideal_reg)];
 }
 
 const TypePtr *MachProjNode::adr_type() const {
   if (bottom_type() == Type::MEMORY) {
     // in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM

@@ -597,13 +597,17 @@
 }
 
 #ifndef PRODUCT
 void MachProjNode::dump_spec(outputStream *st) const {
   ProjNode::dump_spec(st);
-  switch (_ideal_reg) {
-  case unmatched_proj:  st->print("/unmatched");                           break;
-  case fat_proj:        st->print("/fat"); if (WizardMode) _rout.dump(st); break;
+  switch (static_cast<MachProjNode::projType>(_ideal_reg)) {
+  case MachProjNode::projType::unmatched_proj:
+    st->print("/unmatched");
+    break;
+  case MachProjNode::projType::fat_proj:
+    st->print("/fat"); if (WizardMode) _rout.dump(st);
+    break;
   }
 }
 #endif
 
 //=============================================================================

@@ -636,16 +640,16 @@
   // _in_rms array of RegMasks.
   if( idx < TypeFunc::Parms ) return _in_rms[idx];
 
   if (SafePointNode::needs_polling_address_input() &&
       idx == TypeFunc::Parms &&
-      ideal_Opcode() == Op_SafePoint) {
+      ideal_Opcode() == Opcodes::Op_SafePoint) {
     return MachNode::in_RegMask(idx);
   }
 
   // Values outside the domain represent debug info
-  return *Compile::current()->matcher()->idealreg2spillmask[in(idx)->ideal_reg()];
+  return *Compile::current()->matcher()->idealreg2spillmask[static_cast<uint>(in(idx)->ideal_reg())];
 }
 
 
 //=============================================================================
 

@@ -698,11 +702,11 @@
   }
   if (idx == mach_constant_base_node_input()) {
     return MachConstantBaseNode::static_out_RegMask();
   }
   // Values outside the domain represent debug info
-  return *Compile::current()->matcher()->idealreg2debugmask[in(idx)->ideal_reg()];
+  return *Compile::current()->matcher()->idealreg2debugmask[static_cast<uint>(in(idx)->ideal_reg())];
 }
 
 //=============================================================================
 uint MachCallJavaNode::size_of() const { return sizeof(*this); }
 uint MachCallJavaNode::cmp( const Node &n ) const {

@@ -736,11 +740,11 @@
   Matcher* m = Compile::current()->matcher();
   // If this call is a MethodHandle invoke we have to use a different
   // debugmask which does not include the register we use to save the
   // SP over MH invokes.
   RegMask** debugmask = _method_handle_invoke ? m->idealreg2mhdebugmask : m->idealreg2debugmask;
-  return *debugmask[in(idx)->ideal_reg()];
+  return *debugmask[static_cast<uint>(in(idx)->ideal_reg())];
 }
 
 //=============================================================================
 uint MachCallStaticJavaNode::size_of() const { return sizeof(*this); }
 uint MachCallStaticJavaNode::cmp( const Node &n ) const {
< prev index next >