< prev index next >
test/compiler/jvmci/compilerToVM/GetSymbolTest.java
Print this page
*** 50,60 ****
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
! import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethodImpl;
import jdk.vm.ci.meta.ConstantPool;
import jdk.test.lib.Utils;
public class GetSymbolTest {
private static final int CONSTANT_POOL_UTF8_TAG = 1; // see jvms, section 4.4
--- 50,60 ----
import java.util.ArrayList;
import java.util.List;
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
! import jdk.vm.ci.hotspot.HotSpotResolvedJavaMethod;
import jdk.vm.ci.meta.ConstantPool;
import jdk.test.lib.Utils;
public class GetSymbolTest {
private static final int CONSTANT_POOL_UTF8_TAG = 1; // see jvms, section 4.4
*** 74,84 ****
try {
method = aClass.getDeclaredMethod("nonInterfaceMethod");
} catch (NoSuchMethodException e) {
throw new Error("TEST BUG: can't find test method", e);
}
! HotSpotResolvedJavaMethodImpl resolvedMethod
= CTVMUtilities.getResolvedMethod(aClass, method);
List<String> symbols;
try {
symbols = getSymbols(resolvedMethod);
} catch (ReflectiveOperationException e) {
--- 74,84 ----
try {
method = aClass.getDeclaredMethod("nonInterfaceMethod");
} catch (NoSuchMethodException e) {
throw new Error("TEST BUG: can't find test method", e);
}
! HotSpotResolvedJavaMethod resolvedMethod
= CTVMUtilities.getResolvedMethod(aClass, method);
List<String> symbols;
try {
symbols = getSymbols(resolvedMethod);
} catch (ReflectiveOperationException e) {
*** 99,109 ****
+ " using CompilerToVM.getSymbol");
}
}
}
! private List<String> getSymbols(HotSpotResolvedJavaMethodImpl
metaspaceMethod) throws ReflectiveOperationException {
List<String> symbols = new ArrayList<>();
ConstantPool pool = metaspaceMethod.getConstantPool();
long length = pool.length();
// jvms-4.1: The constant_pool table is indexed from 1 ...
--- 99,109 ----
+ " using CompilerToVM.getSymbol");
}
}
}
! private List<String> getSymbols(HotSpotResolvedJavaMethod
metaspaceMethod) throws ReflectiveOperationException {
List<String> symbols = new ArrayList<>();
ConstantPool pool = metaspaceMethod.getConstantPool();
long length = pool.length();
// jvms-4.1: The constant_pool table is indexed from 1 ...
< prev index next >