< prev index next >

src/share/vm/opto/castnode.hpp

Print this page
rev 12700 : 8176506: C2: loop unswitching and unsafe accesses cause crash
Reviewed-by:


  99     : ConstraintCastNode(n, t, carry_dependency) {
 100   }
 101   virtual int Opcode() const;
 102   virtual uint ideal_reg() const { return Op_RegP; }
 103 };
 104 
 105 //------------------------------CheckCastPPNode--------------------------------
 106 // for _checkcast, cast pointer to pointer (different type), without JOIN,
 107 class CheckCastPPNode: public ConstraintCastNode {
 108   public:
 109   CheckCastPPNode(Node *c, Node *n, const Type *t, bool carry_dependency = false)
 110     : ConstraintCastNode(n, t, carry_dependency) {
 111     init_class_id(Class_CheckCastPP);
 112     init_req(0, c);
 113   }
 114 
 115   virtual Node* Identity(PhaseGVN* phase);
 116   virtual const Type* Value(PhaseGVN* phase) const;
 117   virtual int   Opcode() const;
 118   virtual uint  ideal_reg() const { return Op_RegP; }
 119 };

 120 
 121 
 122 //------------------------------CastX2PNode-------------------------------------
 123 // convert a machine-pointer-sized integer to a raw pointer
 124 class CastX2PNode : public Node {
 125   public:
 126   CastX2PNode( Node *n ) : Node(NULL, n) {}
 127   virtual int Opcode() const;
 128   virtual const Type* Value(PhaseGVN* phase) const;
 129   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 130   virtual Node* Identity(PhaseGVN* phase);
 131   virtual uint ideal_reg() const { return Op_RegP; }
 132   virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
 133 };
 134 
 135 //------------------------------CastP2XNode-------------------------------------
 136 // Used in both 32-bit and 64-bit land.
 137 // Used for card-marks and unsafe pointer math.
 138 class CastP2XNode : public Node {
 139   public:


  99     : ConstraintCastNode(n, t, carry_dependency) {
 100   }
 101   virtual int Opcode() const;
 102   virtual uint ideal_reg() const { return Op_RegP; }
 103 };
 104 
 105 //------------------------------CheckCastPPNode--------------------------------
 106 // for _checkcast, cast pointer to pointer (different type), without JOIN,
 107 class CheckCastPPNode: public ConstraintCastNode {
 108   public:
 109   CheckCastPPNode(Node *c, Node *n, const Type *t, bool carry_dependency = false)
 110     : ConstraintCastNode(n, t, carry_dependency) {
 111     init_class_id(Class_CheckCastPP);
 112     init_req(0, c);
 113   }
 114 
 115   virtual Node* Identity(PhaseGVN* phase);
 116   virtual const Type* Value(PhaseGVN* phase) const;
 117   virtual int   Opcode() const;
 118   virtual uint  ideal_reg() const { return Op_RegP; }
 119   bool depends_only_on_test() const { return !type()->isa_rawptr() && ConstraintCastNode::depends_only_on_test(); }
 120  };
 121 
 122 
 123 //------------------------------CastX2PNode-------------------------------------
 124 // convert a machine-pointer-sized integer to a raw pointer
 125 class CastX2PNode : public Node {
 126   public:
 127   CastX2PNode( Node *n ) : Node(NULL, n) {}
 128   virtual int Opcode() const;
 129   virtual const Type* Value(PhaseGVN* phase) const;
 130   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 131   virtual Node* Identity(PhaseGVN* phase);
 132   virtual uint ideal_reg() const { return Op_RegP; }
 133   virtual const Type *bottom_type() const { return TypeRawPtr::BOTTOM; }
 134 };
 135 
 136 //------------------------------CastP2XNode-------------------------------------
 137 // Used in both 32-bit and 64-bit land.
 138 // Used for card-marks and unsafe pointer math.
 139 class CastP2XNode : public Node {
 140   public:
< prev index next >