mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8148481: Devirtualize Klass::vtable
Move remainder of vtable related methods to Klass Reviewed-by: cjplummer, coleenp
This commit is contained in:
parent
211dc93a85
commit
3cda485fe5
12 changed files with 44 additions and 73 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -939,10 +939,7 @@ static oop invoke(instanceKlassHandle klass,
|
|||
int index = reflected_method->vtable_index();
|
||||
method = reflected_method;
|
||||
if (index != Method::nonvirtual_vtable_index) {
|
||||
// target_klass might be an arrayKlassOop but all vtables start at
|
||||
// the same place. The cast is to avoid virtual call and assertion.
|
||||
InstanceKlass* inst = (InstanceKlass*)target_klass();
|
||||
method = methodHandle(THREAD, inst->method_at_vtable(index));
|
||||
method = methodHandle(THREAD, target_klass->method_at_vtable(index));
|
||||
}
|
||||
if (!method.is_null()) {
|
||||
// Check for abstract methods as well
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue