1.1 --- a/src/share/vm/opto/connode.hpp Fri Apr 11 09:56:35 2008 -0400 1.2 +++ b/src/share/vm/opto/connode.hpp Sun Apr 13 17:43:42 2008 -0400 1.3 @@ -78,6 +78,20 @@ 1.4 }; 1.5 1.6 1.7 +//------------------------------ConNNode-------------------------------------- 1.8 +// Simple narrow oop constants 1.9 +class ConNNode : public ConNode { 1.10 +public: 1.11 + ConNNode( const TypeNarrowOop *t ) : ConNode(t) {} 1.12 + virtual int Opcode() const; 1.13 + 1.14 + static ConNNode* make( Compile *C, ciObject* con ) { 1.15 + return new (C, 1) ConNNode( TypeNarrowOop::make_from_constant(con) ); 1.16 + } 1.17 + 1.18 +}; 1.19 + 1.20 + 1.21 //------------------------------ConLNode--------------------------------------- 1.22 // Simple long constants 1.23 class ConLNode : public ConNode { 1.24 @@ -254,6 +268,41 @@ 1.25 //virtual Node *Ideal_DU_postCCP( PhaseCCP * ); 1.26 }; 1.27 1.28 + 1.29 +//------------------------------EncodeP-------------------------------- 1.30 +// Encodes an oop pointers into its compressed form 1.31 +// Takes an extra argument which is the real heap base as a long which 1.32 +// may be useful for code generation in the backend. 1.33 +class EncodePNode : public TypeNode { 1.34 + public: 1.35 + EncodePNode(Node* value, const Type* type): 1.36 + TypeNode(type, 2) { 1.37 + init_req(0, NULL); 1.38 + init_req(1, value); 1.39 + } 1.40 + virtual int Opcode() const; 1.41 + virtual Node *Identity( PhaseTransform *phase ); 1.42 + virtual uint ideal_reg() const { return Op_RegN; } 1.43 + 1.44 + static Node* encode(PhaseGVN* phase, Node* value); 1.45 +}; 1.46 + 1.47 +//------------------------------DecodeN-------------------------------- 1.48 +// Converts a narrow oop into a real oop ptr. 1.49 +// Takes an extra argument which is the real heap base as a long which 1.50 +// may be useful for code generation in the backend. 1.51 +class DecodeNNode : public TypeNode { 1.52 + public: 1.53 + DecodeNNode(Node* value, const Type* type): 1.54 + TypeNode(type, 2) { 1.55 + init_req(0, NULL); 1.56 + init_req(1, value); 1.57 + } 1.58 + virtual int Opcode() const; 1.59 + virtual Node *Identity( PhaseTransform *phase ); 1.60 + virtual uint ideal_reg() const { return Op_RegP; } 1.61 +}; 1.62 + 1.63 //------------------------------Conv2BNode------------------------------------- 1.64 // Convert int/pointer to a Boolean. Map zero to zero, all else to 1. 1.65 class Conv2BNode : public Node {