comparison src/share/vm/opto/parse3.cpp @ 3902:11a4af030e4b

7071709: JSR 292: switchpoint invalidation should be pushed not pulled Reviewed-by: never
author twisti
date Fri, 02 Sep 2011 04:28:59 -0700
parents aa67216400d3
children e626685e9f6c
comparison
equal deleted inserted replaced
3901:aa67216400d3 3902:11a4af030e4b
145 145
146 146
147 void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) { 147 void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) {
148 // Does this field have a constant value? If so, just push the value. 148 // Does this field have a constant value? If so, just push the value.
149 if (field->is_constant()) { 149 if (field->is_constant()) {
150 // final field
150 if (field->is_static()) { 151 if (field->is_static()) {
151 // final static field 152 // final static field
152 if (push_constant(field->constant_value())) 153 if (push_constant(field->constant_value()))
153 return; 154 return;
154 } 155 }
155 else { 156 else {
156 // final non-static field of a trusted class (classes in 157 // final non-static field
157 // java.lang.invoke and sun.invoke packages and subpackages). 158 // Treat final non-static fields of trusted classes (classes in
159 // java.lang.invoke and sun.invoke packages and subpackages) as
160 // compile time constants.
158 if (obj->is_Con()) { 161 if (obj->is_Con()) {
159 const TypeOopPtr* oop_ptr = obj->bottom_type()->isa_oopptr(); 162 const TypeOopPtr* oop_ptr = obj->bottom_type()->isa_oopptr();
160 ciObject* constant_oop = oop_ptr->const_oop(); 163 ciObject* constant_oop = oop_ptr->const_oop();
161 ciConstant constant = field->constant_value_of(constant_oop); 164 ciConstant constant = field->constant_value_of(constant_oop);
162
163 if (push_constant(constant, true)) 165 if (push_constant(constant, true))
164 return; 166 return;
165 } 167 }
166 } 168 }
167 } 169 }