Mercurial > hg > truffle
diff 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 |
line wrap: on
line diff
--- a/src/share/vm/opto/parse3.cpp Fri Sep 02 00:36:18 2011 -0700 +++ b/src/share/vm/opto/parse3.cpp Fri Sep 02 04:28:59 2011 -0700 @@ -147,19 +147,21 @@ void Parse::do_get_xxx(Node* obj, ciField* field, bool is_field) { // Does this field have a constant value? If so, just push the value. if (field->is_constant()) { + // final field if (field->is_static()) { // final static field if (push_constant(field->constant_value())) return; } else { - // final non-static field of a trusted class (classes in - // java.lang.invoke and sun.invoke packages and subpackages). + // final non-static field + // Treat final non-static fields of trusted classes (classes in + // java.lang.invoke and sun.invoke packages and subpackages) as + // compile time constants. if (obj->is_Con()) { const TypeOopPtr* oop_ptr = obj->bottom_type()->isa_oopptr(); ciObject* constant_oop = oop_ptr->const_oop(); ciConstant constant = field->constant_value_of(constant_oop); - if (push_constant(constant, true)) return; }