equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
44 virtual uint hash() const; |
44 virtual uint hash() const; |
45 virtual const RegMask &out_RegMask() const { return RegMask::Empty; } |
45 virtual const RegMask &out_RegMask() const { return RegMask::Empty; } |
46 virtual const RegMask &in_RegMask(uint) const { return RegMask::Empty; } |
46 virtual const RegMask &in_RegMask(uint) const { return RegMask::Empty; } |
47 |
47 |
48 // Polymorphic factory method: |
48 // Polymorphic factory method: |
49 static ConNode* make( Compile* C, const Type *t ); |
49 static ConNode* make(const Type *t); |
50 }; |
50 }; |
51 |
51 |
52 //------------------------------ConINode--------------------------------------- |
52 //------------------------------ConINode--------------------------------------- |
53 // Simple integer constants |
53 // Simple integer constants |
54 class ConINode : public ConNode { |
54 class ConINode : public ConNode { |
55 public: |
55 public: |
56 ConINode( const TypeInt *t ) : ConNode(t) {} |
56 ConINode( const TypeInt *t ) : ConNode(t) {} |
57 virtual int Opcode() const; |
57 virtual int Opcode() const; |
58 |
58 |
59 // Factory method: |
59 // Factory method: |
60 static ConINode* make( Compile* C, int con ) { |
60 static ConINode* make(int con) { |
61 return new ConINode( TypeInt::make(con) ); |
61 return new ConINode( TypeInt::make(con) ); |
62 } |
62 } |
63 |
63 |
64 }; |
64 }; |
65 |
65 |
69 public: |
69 public: |
70 ConPNode( const TypePtr *t ) : ConNode(t) {} |
70 ConPNode( const TypePtr *t ) : ConNode(t) {} |
71 virtual int Opcode() const; |
71 virtual int Opcode() const; |
72 |
72 |
73 // Factory methods: |
73 // Factory methods: |
74 static ConPNode* make( Compile *C ,address con ) { |
74 static ConPNode* make(address con) { |
75 if (con == NULL) |
75 if (con == NULL) |
76 return new ConPNode( TypePtr::NULL_PTR ) ; |
76 return new ConPNode( TypePtr::NULL_PTR ) ; |
77 else |
77 else |
78 return new ConPNode( TypeRawPtr::make(con) ); |
78 return new ConPNode( TypeRawPtr::make(con) ); |
79 } |
79 } |
103 public: |
103 public: |
104 ConLNode( const TypeLong *t ) : ConNode(t) {} |
104 ConLNode( const TypeLong *t ) : ConNode(t) {} |
105 virtual int Opcode() const; |
105 virtual int Opcode() const; |
106 |
106 |
107 // Factory method: |
107 // Factory method: |
108 static ConLNode* make( Compile *C ,jlong con ) { |
108 static ConLNode* make(jlong con) { |
109 return new ConLNode( TypeLong::make(con) ); |
109 return new ConLNode( TypeLong::make(con) ); |
110 } |
110 } |
111 |
111 |
112 }; |
112 }; |
113 |
113 |
117 public: |
117 public: |
118 ConFNode( const TypeF *t ) : ConNode(t) {} |
118 ConFNode( const TypeF *t ) : ConNode(t) {} |
119 virtual int Opcode() const; |
119 virtual int Opcode() const; |
120 |
120 |
121 // Factory method: |
121 // Factory method: |
122 static ConFNode* make( Compile *C, float con ) { |
122 static ConFNode* make(float con) { |
123 return new ConFNode( TypeF::make(con) ); |
123 return new ConFNode( TypeF::make(con) ); |
124 } |
124 } |
125 |
125 |
126 }; |
126 }; |
127 |
127 |
131 public: |
131 public: |
132 ConDNode( const TypeD *t ) : ConNode(t) {} |
132 ConDNode( const TypeD *t ) : ConNode(t) {} |
133 virtual int Opcode() const; |
133 virtual int Opcode() const; |
134 |
134 |
135 // Factory method: |
135 // Factory method: |
136 static ConDNode* make( Compile *C, double con ) { |
136 static ConDNode* make(double con) { |
137 return new ConDNode( TypeD::make(con) ); |
137 return new ConDNode( TypeD::make(con) ); |
138 } |
138 } |
139 |
139 |
140 }; |
140 }; |
141 |
141 |