6930772: JSR 292 needs to support SPARC C1

C1 for SPARC needs to support JSR 292.

Reviewed-by: never, jrose
This commit is contained in:
Christian Thalinger 2010-05-21 02:59:24 -07:00
parent c9f2ba541b
commit 2e24ba80e9
28 changed files with 164 additions and 137 deletions

View file

@ -690,20 +690,32 @@ int ciMethod::scale_count(int count, float prof_factor) {
// ------------------------------------------------------------------
// invokedynamic support
// ------------------------------------------------------------------
// ciMethod::is_method_handle_invoke
//
// Return true if the method is a MethodHandle target.
bool ciMethod::is_method_handle_invoke() const {
check_is_loaded();
bool flag = ((flags().as_int() & JVM_MH_INVOKE_BITS) == JVM_MH_INVOKE_BITS);
bool flag = (holder()->name() == ciSymbol::java_dyn_MethodHandle() &&
methodOopDesc::is_method_handle_invoke_name(name()->sid()));
#ifdef ASSERT
{
VM_ENTRY_MARK;
bool flag2 = get_methodOop()->is_method_handle_invoke();
assert(flag == flag2, "consistent");
if (is_loaded()) {
bool flag2 = ((flags().as_int() & JVM_MH_INVOKE_BITS) == JVM_MH_INVOKE_BITS);
{
VM_ENTRY_MARK;
bool flag3 = get_methodOop()->is_method_handle_invoke();
assert(flag2 == flag3, "consistent");
assert(flag == flag3, "consistent");
}
}
#endif //ASSERT
return flag;
}
// ------------------------------------------------------------------
// ciMethod::is_method_handle_adapter
//
// Return true if the method is a generated MethodHandle adapter.
bool ciMethod::is_method_handle_adapter() const {
check_is_loaded();
VM_ENTRY_MARK;