mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
6893268: additional dynamic language related optimizations in C2
C2 needs some additional optimizations to be able to handle MethodHandle invokes and invokedynamic instructions at the best performance. Reviewed-by: kvn, never
This commit is contained in:
parent
375527d84e
commit
47f2433a58
52 changed files with 1781 additions and 342 deletions
|
@ -138,10 +138,18 @@ public:
|
|||
|
||||
// Get the constant value of this field.
|
||||
ciConstant constant_value() {
|
||||
assert(is_constant(), "illegal call to constant_value()");
|
||||
assert(is_static() && is_constant(), "illegal call to constant_value()");
|
||||
return _constant_value;
|
||||
}
|
||||
|
||||
// Get the constant value of non-static final field in the given
|
||||
// object.
|
||||
ciConstant constant_value_of(ciObject* object) {
|
||||
assert(!is_static() && is_constant(), "only if field is non-static constant");
|
||||
assert(object->is_instance(), "must be instance");
|
||||
return object->as_instance()->field_value(this);
|
||||
}
|
||||
|
||||
// Check for link time errors. Accessing a field from a
|
||||
// certain class via a certain bytecode may or may not be legal.
|
||||
// This call checks to see if an exception may be raised by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue