22 *
23 */
24
25 #ifndef SHARE_VM_OPTO_NARROWPTRNODE_HPP
26 #define SHARE_VM_OPTO_NARROWPTRNODE_HPP
27
28 #include "opto/node.hpp"
29 #include "opto/opcodes.hpp"
30
31 //------------------------------EncodeNarrowPtr--------------------------------
32 class EncodeNarrowPtrNode : public TypeNode {
33 protected:
34 EncodeNarrowPtrNode(Node* value, const Type* type):
35 TypeNode(type, 2) {
36 init_class_id(Class_EncodeNarrowPtr);
37 init_req(0, NULL);
38 init_req(1, value);
39 }
40 public:
41 virtual uint ideal_reg() const { return Op_RegN; }
42 virtual Node *Ideal_DU_postCCP( PhaseCCP *ccp );
43 };
44
45 //------------------------------EncodeP--------------------------------
46 // Encodes an oop pointers into its compressed form
47 // Takes an extra argument which is the real heap base as a long which
48 // may be useful for code generation in the backend.
49 class EncodePNode : public EncodeNarrowPtrNode {
50 public:
51 EncodePNode(Node* value, const Type* type):
52 EncodeNarrowPtrNode(value, type) {
53 init_class_id(Class_EncodeP);
54 }
55 virtual int Opcode() const;
56 virtual Node *Identity( PhaseTransform *phase );
57 virtual const Type *Value( PhaseTransform *phase ) const;
58 };
59
60 //------------------------------EncodePKlass--------------------------------
61 // Encodes a klass pointer into its compressed form
62 // Takes an extra argument which is the real heap base as a long which
|
22 *
23 */
24
25 #ifndef SHARE_VM_OPTO_NARROWPTRNODE_HPP
26 #define SHARE_VM_OPTO_NARROWPTRNODE_HPP
27
28 #include "opto/node.hpp"
29 #include "opto/opcodes.hpp"
30
31 //------------------------------EncodeNarrowPtr--------------------------------
32 class EncodeNarrowPtrNode : public TypeNode {
33 protected:
34 EncodeNarrowPtrNode(Node* value, const Type* type):
35 TypeNode(type, 2) {
36 init_class_id(Class_EncodeNarrowPtr);
37 init_req(0, NULL);
38 init_req(1, value);
39 }
40 public:
41 virtual uint ideal_reg() const { return Op_RegN; }
42 };
43
44 //------------------------------EncodeP--------------------------------
45 // Encodes an oop pointers into its compressed form
46 // Takes an extra argument which is the real heap base as a long which
47 // may be useful for code generation in the backend.
48 class EncodePNode : public EncodeNarrowPtrNode {
49 public:
50 EncodePNode(Node* value, const Type* type):
51 EncodeNarrowPtrNode(value, type) {
52 init_class_id(Class_EncodeP);
53 }
54 virtual int Opcode() const;
55 virtual Node *Identity( PhaseTransform *phase );
56 virtual const Type *Value( PhaseTransform *phase ) const;
57 };
58
59 //------------------------------EncodePKlass--------------------------------
60 // Encodes a klass pointer into its compressed form
61 // Takes an extra argument which is the real heap base as a long which
|