Mercurial > hg > graal-compiler
changeset 6589:341f34427e09
Merge.
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 29 Oct 2012 17:22:25 +0100 |
parents | b89b5038ad7e (diff) 795df1687282 (current diff) |
children | dc5eec61daba |
files | graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CheckCastEliminationPhase.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/IterativeCheckCastEliminationPhase.java |
diffstat | 9 files changed, 168 insertions(+), 195 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ConstantPool.java Mon Oct 29 17:05:44 2012 +0100 +++ b/graal/com.oracle.graal.api.meta/src/com/oracle/graal/api/meta/ConstantPool.java Mon Oct 29 17:22:25 2012 +0100 @@ -29,9 +29,9 @@ public interface ConstantPool { /** - * Makes sure that the type referenced by the specified constant pool entry is loaded and initialized. This can be + * Ensures that the type referenced by the specified constant pool entry is loaded and initialized. This can be * used to compile time resolve a type. It works for field, method, or type constant pool entries. - * + * * @param cpi the index of the constant pool entry that references the type * @param opcode the opcode of the instruction that references the type */ @@ -41,7 +41,7 @@ * Looks up a reference to a field. If {@code opcode} is non-negative, then resolution checks specific to the * bytecode it denotes are performed if the field is already resolved. Should any of these checks fail, an * unresolved field reference is returned. - * + * * @param cpi the constant pool index * @param opcode the opcode of the instruction for which the lookup is being performed or {@code -1} * @return a reference to the field at {@code cpi} in this pool @@ -53,7 +53,7 @@ * Looks up a reference to a method. If {@code opcode} is non-negative, then resolution checks specific to the * bytecode it denotes are performed if the method is already resolved. Should any of these checks fail, an * unresolved method reference is returned. - * + * * @param cpi the constant pool index * @param opcode the opcode of the instruction for which the lookup is being performed or {@code -1} * @return a reference to the method at {@code cpi} in this pool @@ -65,7 +65,7 @@ * Looks up a reference to a type. If {@code opcode} is non-negative, then resolution checks specific to the * bytecode it denotes are performed if the type is already resolved. Should any of these checks fail, an unresolved * type reference is returned. - * + * * @param cpi the constant pool index * @param opcode the opcode of the instruction for which the lookup is being performed or {@code -1} * @return a reference to the compiler interface type @@ -74,7 +74,7 @@ /** * Looks up a method signature. - * + * * @param cpi the constant pool index * @return the method signature at index {@code cpi} in this constant pool */ @@ -82,7 +82,7 @@ /** * Looks up a constant at the specified index. - * + * * @param cpi the constant pool index * @return the {@code Constant} or {@code JavaType} instance representing the constant pool entry */
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Mon Oct 29 17:05:44 2012 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotGraalRuntime.java Mon Oct 29 17:22:25 2012 +0100 @@ -159,10 +159,10 @@ return vmToCompiler; } - public JavaType lookupType(String returnType, HotSpotResolvedJavaType accessingClass, boolean eagerResolve) { - if (returnType.length() == 1 && vmToCompiler instanceof VMToCompilerImpl) { + public JavaType lookupType(String name, HotSpotResolvedJavaType accessingClass, boolean eagerResolve) { + if (name.length() == 1 && vmToCompiler instanceof VMToCompilerImpl) { VMToCompilerImpl exitsNative = (VMToCompilerImpl) vmToCompiler; - Kind kind = Kind.fromPrimitiveOrVoidTypeChar(returnType.charAt(0)); + Kind kind = Kind.fromPrimitiveOrVoidTypeChar(name.charAt(0)); switch(kind) { case Boolean: return exitsNative.typeBoolean; @@ -190,7 +190,7 @@ return exitsNative.typeVoid; } } - return compilerToVm.Signature_lookupType(returnType, accessingClass, eagerResolve); + return compilerToVm.lookupType(name, accessingClass, eagerResolve); } public HotSpotRuntimeInterpreterInterface getRuntimeInterpreterInterface() {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java Mon Oct 29 17:05:44 2012 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java Mon Oct 29 17:22:25 2012 +0100 @@ -34,59 +34,57 @@ */ public interface CompilerToVM { - // Checkstyle: stop + byte[] getBytecode(HotSpotResolvedJavaMethod method); - byte[] JavaMethod_code(HotSpotResolvedJavaMethod method); + String getSignature(HotSpotResolvedJavaMethod method); - String JavaMethod_signature(HotSpotResolvedJavaMethod method); + ExceptionHandler[] getExceptionHandlers(HotSpotResolvedJavaMethod method); - ExceptionHandler[] JavaMethod_exceptionHandlers(HotSpotResolvedJavaMethod method); - - boolean JavaMethod_hasBalancedMonitors(HotSpotResolvedJavaMethod method); + boolean hasBalancedMonitors(HotSpotResolvedJavaMethod method); - JavaMethod JavaMethod_uniqueConcreteMethod(HotSpotResolvedJavaMethod method); + JavaMethod getUniqueConcreteMethod(HotSpotResolvedJavaMethod method); - int JavaMethod_invocationCount(HotSpotResolvedJavaMethod method); + int getInvocationCount(HotSpotResolvedJavaMethod method); - HotSpotMethodData JavaMethod_methodData(HotSpotResolvedJavaMethod method); + HotSpotMethodData getMethodData(HotSpotResolvedJavaMethod method); - JavaType Signature_lookupType(String returnType, HotSpotResolvedJavaType accessingClass, boolean eagerResolve); + JavaType lookupType(String name, HotSpotResolvedJavaType accessingClass, boolean eagerResolve); - Object ConstantPool_lookupConstant(HotSpotResolvedJavaType pool, int cpi); + Object lookupConstantInPool(HotSpotResolvedJavaType pool, int cpi); - JavaMethod ConstantPool_lookupMethod(HotSpotResolvedJavaType pool, int cpi, byte byteCode); + JavaMethod lookupMethodInPool(HotSpotResolvedJavaType pool, int cpi, byte opcode); - JavaType ConstantPool_lookupType(HotSpotResolvedJavaType pool, int cpi); + JavaType lookupTypeInPool(HotSpotResolvedJavaType pool, int cpi); - JavaField ConstantPool_lookupField(HotSpotResolvedJavaType pool, int cpi, byte byteCode); + JavaField lookupFieldInPool(HotSpotResolvedJavaType pool, int cpi, byte opcode); - void ConstantPool_loadReferencedType(HotSpotResolvedJavaType pool, int cpi, byte byteCode); + void lookupReferencedTypeInPool(HotSpotResolvedJavaType pool, int cpi, byte opcode); HotSpotCompiledMethod installMethod(HotSpotCompilationResult compResult, boolean makeDefault, HotSpotCodeInfo info); void initializeConfiguration(HotSpotVMConfig config); - JavaMethod JavaType_resolveMethodImpl(HotSpotResolvedJavaType klass, String name, String signature); + JavaMethod resolveMethod(HotSpotResolvedJavaType klass, String name, String signature); - boolean JavaType_isSubtypeOf(HotSpotResolvedJavaType klass, JavaType other); + boolean isSubtypeOf(HotSpotResolvedJavaType klass, JavaType other); - JavaType JavaType_leastCommonAncestor(HotSpotResolvedJavaType thisType, HotSpotResolvedJavaType otherType); + JavaType getLeastCommonAncestor(HotSpotResolvedJavaType thisType, HotSpotResolvedJavaType otherType); JavaType getPrimitiveArrayType(Kind kind); - JavaType JavaType_arrayOf(HotSpotResolvedJavaType klass); + JavaType getArrayOf(HotSpotResolvedJavaType klass); - JavaType JavaType_componentType(HotSpotResolvedJavaType klass); + JavaType getComponentType(HotSpotResolvedJavaType klass); - boolean JavaType_isInitialized(HotSpotResolvedJavaType klass); + boolean isTypeInitialized(HotSpotResolvedJavaType klass); - void JavaType_initialize(HotSpotResolvedJavaType klass); + void initializeType(HotSpotResolvedJavaType klass); JavaType getType(Class<?> javaClass); - JavaType JavaType_uniqueConcreteSubtype(HotSpotResolvedJavaType klass); + JavaType getUniqueConcreteSubtype(HotSpotResolvedJavaType klass); - JavaType JavaType_superType(HotSpotResolvedJavaType klass); + JavaType getSuperType(HotSpotResolvedJavaType klass); int getArrayLength(Constant array); @@ -94,11 +92,9 @@ JavaType getJavaType(Constant constant); - ResolvedJavaField[] JavaType_fields(HotSpotResolvedJavaType klass); + ResolvedJavaField[] getFields(HotSpotResolvedJavaType klass); - boolean JavaMethod_hasCompiledCode(HotSpotResolvedJavaMethod method); - - int JavaMethod_getCompiledCodeSize(HotSpotResolvedJavaMethod method); + int getCompiledCodeSize(HotSpotResolvedJavaMethod method); JavaMethod getJavaMethod(Method reflectionMethod); @@ -108,19 +104,17 @@ String disassembleNative(byte[] code, long address); - StackTraceElement JavaMethod_toStackTraceElement(HotSpotResolvedJavaMethod method, int bci); + StackTraceElement getStackTraceElement(HotSpotResolvedJavaMethod method, int bci); Object executeCompiledMethod(HotSpotCompiledMethod method, Object arg1, Object arg2, Object arg3); Object executeCompiledMethodVarargs(HotSpotCompiledMethod method, Object... args); - int JavaMethod_vtableEntryOffset(HotSpotResolvedJavaMethod method); + int getVtableEntryOffset(HotSpotResolvedJavaMethod method); long[] getDeoptedLeafGraphIds(); String decodePC(long pc); - long JavaType_prototypeMarkWord(HotSpotResolvedJavaType hotSpotResolvedJavaType); - - // Checkstyle: resume + long getPrototypeMarkWord(HotSpotResolvedJavaType hotSpotResolvedJavaType); }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java Mon Oct 29 17:05:44 2012 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java Mon Oct 29 17:22:25 2012 +0100 @@ -34,8 +34,6 @@ */ public class CompilerToVMImpl implements CompilerToVM { - // Checkstyle: stop - @Override public native JavaMethod getJavaMethod(Method reflectionMethod); @@ -43,40 +41,40 @@ public native ResolvedJavaField getJavaField(Field reflectionMethod); @Override - public native byte[] JavaMethod_code(HotSpotResolvedJavaMethod method); + public native byte[] getBytecode(HotSpotResolvedJavaMethod method); @Override - public native String JavaMethod_signature(HotSpotResolvedJavaMethod method); + public native String getSignature(HotSpotResolvedJavaMethod method); @Override - public native ExceptionHandler[] JavaMethod_exceptionHandlers(HotSpotResolvedJavaMethod method); + public native ExceptionHandler[] getExceptionHandlers(HotSpotResolvedJavaMethod method); @Override - public native boolean JavaMethod_hasBalancedMonitors(HotSpotResolvedJavaMethod method); + public native boolean hasBalancedMonitors(HotSpotResolvedJavaMethod method); @Override - public native JavaMethod JavaMethod_uniqueConcreteMethod(HotSpotResolvedJavaMethod method); + public native JavaMethod getUniqueConcreteMethod(HotSpotResolvedJavaMethod method); @Override - public native int JavaMethod_invocationCount(HotSpotResolvedJavaMethod method); + public native int getInvocationCount(HotSpotResolvedJavaMethod method); @Override - public native JavaType Signature_lookupType(String returnType, HotSpotResolvedJavaType accessingClass, boolean eagerResolve); + public native JavaType lookupType(String name, HotSpotResolvedJavaType accessingClass, boolean eagerResolve); @Override - public native Object ConstantPool_lookupConstant(HotSpotResolvedJavaType pool, int cpi); + public native Object lookupConstantInPool(HotSpotResolvedJavaType pool, int cpi); @Override - public native JavaMethod ConstantPool_lookupMethod(HotSpotResolvedJavaType pool, int cpi, byte byteCode); + public native JavaMethod lookupMethodInPool(HotSpotResolvedJavaType pool, int cpi, byte opcode); @Override - public native JavaType ConstantPool_lookupType(HotSpotResolvedJavaType pool, int cpi); + public native JavaType lookupTypeInPool(HotSpotResolvedJavaType pool, int cpi); @Override - public native void ConstantPool_loadReferencedType(HotSpotResolvedJavaType pool, int cpi, byte byteCode); + public native void lookupReferencedTypeInPool(HotSpotResolvedJavaType pool, int cpi, byte opcode); @Override - public native JavaField ConstantPool_lookupField(HotSpotResolvedJavaType pool, int cpi, byte byteCode); + public native JavaField lookupFieldInPool(HotSpotResolvedJavaType pool, int cpi, byte opcode); @Override public native HotSpotCompiledMethod installMethod(HotSpotCompilationResult comp, boolean makeDefault, HotSpotCodeInfo info); @@ -85,37 +83,37 @@ public native void initializeConfiguration(HotSpotVMConfig config); @Override - public native JavaMethod JavaType_resolveMethodImpl(HotSpotResolvedJavaType klass, String name, String signature); + public native JavaMethod resolveMethod(HotSpotResolvedJavaType klass, String name, String signature); @Override - public native boolean JavaType_isSubtypeOf(HotSpotResolvedJavaType klass, JavaType other); + public native boolean isSubtypeOf(HotSpotResolvedJavaType klass, JavaType other); @Override - public native JavaType JavaType_leastCommonAncestor(HotSpotResolvedJavaType thisType, HotSpotResolvedJavaType otherType); + public native JavaType getLeastCommonAncestor(HotSpotResolvedJavaType thisType, HotSpotResolvedJavaType otherType); @Override public native JavaType getPrimitiveArrayType(Kind kind); @Override - public native JavaType JavaType_arrayOf(HotSpotResolvedJavaType klass); + public native JavaType getArrayOf(HotSpotResolvedJavaType klass); @Override - public native JavaType JavaType_componentType(HotSpotResolvedJavaType klass); + public native JavaType getComponentType(HotSpotResolvedJavaType klass); @Override - public native JavaType JavaType_uniqueConcreteSubtype(HotSpotResolvedJavaType klass); + public native JavaType getUniqueConcreteSubtype(HotSpotResolvedJavaType klass); @Override - public native JavaType JavaType_superType(HotSpotResolvedJavaType klass); + public native JavaType getSuperType(HotSpotResolvedJavaType klass); @Override - public native boolean JavaType_isInitialized(HotSpotResolvedJavaType klass); + public native boolean isTypeInitialized(HotSpotResolvedJavaType klass); @Override - public native void JavaType_initialize(HotSpotResolvedJavaType klass); + public native void initializeType(HotSpotResolvedJavaType klass); @Override - public native HotSpotMethodData JavaMethod_methodData(HotSpotResolvedJavaMethod method); + public native HotSpotMethodData getMethodData(HotSpotResolvedJavaMethod method); @Override public native JavaType getType(Class<?> javaClass); @@ -140,13 +138,10 @@ } @Override - public native ResolvedJavaField[] JavaType_fields(HotSpotResolvedJavaType klass); + public native ResolvedJavaField[] getFields(HotSpotResolvedJavaType klass); @Override - public native boolean JavaMethod_hasCompiledCode(HotSpotResolvedJavaMethod method); - - @Override - public native int JavaMethod_getCompiledCodeSize(HotSpotResolvedJavaMethod method); + public native int getCompiledCodeSize(HotSpotResolvedJavaMethod method); @Override public native long getMaxCallTargetOffset(long stub); @@ -155,7 +150,7 @@ public native String disassembleNative(byte[] code, long address); @Override - public native StackTraceElement JavaMethod_toStackTraceElement(HotSpotResolvedJavaMethod method, int bci); + public native StackTraceElement getStackTraceElement(HotSpotResolvedJavaMethod method, int bci); @Override public native Object executeCompiledMethod(HotSpotCompiledMethod method, Object arg1, Object arg2, Object arg3); @@ -164,7 +159,7 @@ public native Object executeCompiledMethodVarargs(HotSpotCompiledMethod method, Object... args); @Override - public native int JavaMethod_vtableEntryOffset(HotSpotResolvedJavaMethod method); + public native int getVtableEntryOffset(HotSpotResolvedJavaMethod method); @Override public native long[] getDeoptedLeafGraphIds(); @@ -173,7 +168,5 @@ public native String decodePC(long pc); @Override - public native long JavaType_prototypeMarkWord(HotSpotResolvedJavaType type); - - // Checkstyle: resume + public native long getPrototypeMarkWord(HotSpotResolvedJavaType type); }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantPool.java Mon Oct 29 17:05:44 2012 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotConstantPool.java Mon Oct 29 17:22:25 2012 +0100 @@ -40,7 +40,7 @@ @Override public Object lookupConstant(int cpi) { - Object constant = HotSpotGraalRuntime.getInstance().getCompilerToVM().ConstantPool_lookupConstant(type, cpi); + Object constant = HotSpotGraalRuntime.getInstance().getCompilerToVM().lookupConstantInPool(type, cpi); return constant; } @@ -50,22 +50,22 @@ } @Override - public JavaMethod lookupMethod(int cpi, int byteCode) { - return HotSpotGraalRuntime.getInstance().getCompilerToVM().ConstantPool_lookupMethod(type, cpi, (byte) byteCode); + public JavaMethod lookupMethod(int cpi, int opcode) { + return HotSpotGraalRuntime.getInstance().getCompilerToVM().lookupMethodInPool(type, cpi, (byte) opcode); } @Override public JavaType lookupType(int cpi, int opcode) { - return HotSpotGraalRuntime.getInstance().getCompilerToVM().ConstantPool_lookupType(type, cpi); + return HotSpotGraalRuntime.getInstance().getCompilerToVM().lookupTypeInPool(type, cpi); } @Override public JavaField lookupField(int cpi, int opcode) { - return HotSpotGraalRuntime.getInstance().getCompilerToVM().ConstantPool_lookupField(type, cpi, (byte) opcode); + return HotSpotGraalRuntime.getInstance().getCompilerToVM().lookupFieldInPool(type, cpi, (byte) opcode); } @Override - public void loadReferencedType(int cpi, int bytecode) { - HotSpotGraalRuntime.getInstance().getCompilerToVM().ConstantPool_loadReferencedType(type, cpi, (byte) bytecode); + public void loadReferencedType(int cpi, int opcode) { + HotSpotGraalRuntime.getInstance().getCompilerToVM().lookupReferencedTypeInPool(type, cpi, (byte) opcode); } }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethod.java Mon Oct 29 17:05:44 2012 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaMethod.java Mon Oct 29 17:22:25 2012 +0100 @@ -83,7 +83,7 @@ @Override public byte[] getCode() { if (code == null) { - code = HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_code(this); + code = HotSpotGraalRuntime.getInstance().getCompilerToVM().getBytecode(this); assert code.length == codeSize : "expected: " + codeSize + ", actual: " + code.length; } return code; @@ -96,12 +96,12 @@ @Override public ExceptionHandler[] getExceptionHandlers() { - return HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_exceptionHandlers(this); + return HotSpotGraalRuntime.getInstance().getCompilerToVM().getExceptionHandlers(this); } public boolean hasBalancedMonitors() { if (hasBalancedMonitors == null) { - hasBalancedMonitors = HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_hasBalancedMonitors(this); + hasBalancedMonitors = HotSpotGraalRuntime.getInstance().getCompilerToVM().hasBalancedMonitors(this); } return hasBalancedMonitors; } @@ -130,20 +130,20 @@ public StackTraceElement asStackTraceElement(int bci) { if (bci < 0 || bci >= codeSize) { // HotSpot code can only construct stack trace elements for valid bcis - StackTraceElement ste = HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_toStackTraceElement(this, 0); + StackTraceElement ste = HotSpotGraalRuntime.getInstance().getCompilerToVM().getStackTraceElement(this, 0); return new StackTraceElement(ste.getClassName(), ste.getMethodName(), ste.getFileName(), -1); } - return HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_toStackTraceElement(this, bci); + return HotSpotGraalRuntime.getInstance().getCompilerToVM().getStackTraceElement(this, bci); } public ResolvedJavaMethod uniqueConcreteMethod() { - return (ResolvedJavaMethod) HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_uniqueConcreteMethod(this); + return (ResolvedJavaMethod) HotSpotGraalRuntime.getInstance().getCompilerToVM().getUniqueConcreteMethod(this); } @Override public Signature getSignature() { if (signature == null) { - signature = new HotSpotSignature(HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_signature(this)); + signature = new HotSpotSignature(HotSpotGraalRuntime.getInstance().getCompilerToVM().getSignature(this)); } return signature; } @@ -153,16 +153,12 @@ return "HotSpotMethod<" + MetaUtil.format("%h.%n", this) + ">"; } - public boolean hasCompiledCode() { - return HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_hasCompiledCode(this); - } - public int getCompiledCodeSize() { - return HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_getCompiledCodeSize(this); + return HotSpotGraalRuntime.getInstance().getCompilerToVM().getCompiledCodeSize(this); } public int invocationCount() { - return HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_invocationCount(this); + return HotSpotGraalRuntime.getInstance().getCompilerToVM().getInvocationCount(this); } @Override @@ -186,7 +182,7 @@ ProfilingInfo info; if (GraalOptions.UseProfilingInformation && methodData == null) { - methodData = HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_methodData(this); + methodData = HotSpotGraalRuntime.getInstance().getCompilerToVM().getMethodData(this); } if (methodData == null || (!methodData.hasNormalData() && !methodData.hasExtraData())) { @@ -271,7 +267,7 @@ if (!holder.isInitialized()) { return -1; } - return HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaMethod_vtableEntryOffset(this); + return HotSpotGraalRuntime.getInstance().getCompilerToVM().getVtableEntryOffset(this); } public void setCurrentTask(CompilationTask task) {
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaType.java Mon Oct 29 17:05:44 2012 +0100 +++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedJavaType.java Mon Oct 29 17:22:25 2012 +0100 @@ -67,7 +67,7 @@ @Override public ResolvedJavaType getArrayClass() { if (arrayOfType == null) { - arrayOfType = (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_arrayOf(this); + arrayOfType = (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().getArrayOf(this); } return arrayOfType; } @@ -75,7 +75,7 @@ @Override public ResolvedJavaType getComponentType() { if (isArrayClass) { - return (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_componentType(this); + return (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().getComponentType(this); } return null; } @@ -85,7 +85,7 @@ if (isArrayClass()) { return Modifier.isFinal(getComponentType().getModifiers()) ? this : null; } else { - ResolvedJavaType subtype = (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_uniqueConcreteSubtype(this); + ResolvedJavaType subtype = (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().getUniqueConcreteSubtype(this); assert subtype == null || !subtype.isInterface(); return subtype; } @@ -94,7 +94,7 @@ @Override public ResolvedJavaType getSuperclass() { if (!superTypeSet) { - superType = (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_superType(this); + superType = (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().getSuperType(this); superTypeSet = true; } return superType; @@ -105,7 +105,7 @@ if (otherType instanceof HotSpotTypePrimitive) { return null; } else { - return (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_leastCommonAncestor(this, (HotSpotResolvedJavaType) otherType); + return (ResolvedJavaType) HotSpotGraalRuntime.getInstance().getCompilerToVM().getLeastCommonAncestor(this, (HotSpotResolvedJavaType) otherType); } } @@ -151,15 +151,15 @@ @Override public boolean isInitialized() { if (!isInitialized) { - isInitialized = HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_isInitialized(this); + isInitialized = HotSpotGraalRuntime.getInstance().getCompilerToVM().isTypeInitialized(this); } return isInitialized; } @Override public void initialize() { - if (!HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_isInitialized(this)) { - HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_initialize(this); + if (!isInitialized) { + HotSpotGraalRuntime.getInstance().getCompilerToVM().initializeType(this); } isInitialized = true; } @@ -182,7 +182,7 @@ @Override public boolean isSubtypeOf(ResolvedJavaType other) { if (other instanceof HotSpotResolvedJavaType) { - return HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_isSubtypeOf(this, other); + return HotSpotGraalRuntime.getInstance().getCompilerToVM().isSubtypeOf(this, other); } // No resolved type is a subtype of an unresolved type. return false; @@ -196,7 +196,7 @@ @Override public ResolvedJavaMethod resolveMethod(ResolvedJavaMethod method) { assert method instanceof HotSpotMethod; - return (ResolvedJavaMethod) HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_resolveMethodImpl(this, method.getName(), ((HotSpotSignature) method.getSignature()).asString()); + return (ResolvedJavaMethod) HotSpotGraalRuntime.getInstance().getCompilerToVM().resolveMethod(this, method.getName(), ((HotSpotSignature) method.getSignature()).asString()); } @Override @@ -254,7 +254,7 @@ if (isArrayClass) { fields = new ResolvedJavaField[0]; } else { - fields = HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_fields(this); + fields = HotSpotGraalRuntime.getInstance().getCompilerToVM().getFields(this); } } return fields; @@ -295,6 +295,6 @@ } public long prototypeMarkWord() { - return HotSpotGraalRuntime.getInstance().getCompilerToVM().JavaType_prototypeMarkWord(this); + return HotSpotGraalRuntime.getInstance().getCompilerToVM().getPrototypeMarkWord(this); } }
--- a/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java Mon Oct 29 17:05:44 2012 +0100 +++ b/graal/com.oracle.graal.snippets/src/com/oracle/graal/snippets/SnippetTemplate.java Mon Oct 29 17:22:25 2012 +0100 @@ -563,7 +563,7 @@ // Remove the replacee from its graph replacee.clearInputs(); replacee.replaceAtUsages(null); - GraphUtil.killCFG(replacee); + GraphUtil.killCFG(replacee); Debug.dump(replaceeGraph, "After lowering %s with %s", replacee, this); return duplicates;
--- a/src/share/vm/graal/graalCompilerToVM.cpp Mon Oct 29 17:05:44 2012 +0100 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Mon Oct 29 17:22:25 2012 +0100 @@ -52,19 +52,19 @@ // Entry to native method implementation that transitions current thread to '_thread_in_vm'. #define C2V_VMENTRY(result_type, name, signature) \ - JNIEXPORT result_type JNICALL name signature { \ + JNIEXPORT result_type JNICALL c2v_ ## name signature { \ TRACE_graal_3("CompilerToVM::" #name); \ VM_ENTRY_MARK; \ // Entry to native method implementation that calls a JNI function // and hence cannot transition current thread to '_thread_in_vm'. #define C2V_ENTRY(result_type, name, signature) \ - JNIEXPORT result_type JNICALL name signature { \ + JNIEXPORT result_type JNICALL c2v_ ## name signature { \ TRACE_graal_3("CompilerToVM::" #name); \ #define C2V_END } -C2V_ENTRY(jbyteArray, JavaMethod_code, (JNIEnv *env, jobject, jobject hotspot_method)) +C2V_ENTRY(jbyteArray, getBytecode, (JNIEnv *env, jobject, jobject hotspot_method)) methodHandle method = getMethodFromHotSpotMethod(hotspot_method); // copy all bytecodes @@ -99,13 +99,13 @@ return result; C2V_END -C2V_VMENTRY(jstring, JavaMethod_signature, (JNIEnv *env, jobject, jobject hotspot_method)) +C2V_VMENTRY(jstring, getSignature, (JNIEnv *env, jobject, jobject hotspot_method)) methodOop method = getMethodFromHotSpotMethod(hotspot_method); assert(method != NULL && method->signature() != NULL, "signature required"); return VmIds::toString<jstring>(method->signature(), THREAD); C2V_END -C2V_VMENTRY(jobjectArray, JavaMethod_exceptionHandlers, (JNIEnv *, jobject, jobject hotspot_method)) +C2V_VMENTRY(jobjectArray, getExceptionHandlers, (JNIEnv *, jobject, jobject hotspot_method)) ResourceMark rm; methodHandle method = getMethodFromHotSpotMethod(hotspot_method); int handler_count = method->exception_table_length(); @@ -142,7 +142,7 @@ return (jobjectArray) JNIHandles::make_local(array()); C2V_END -C2V_VMENTRY(jint, JavaMethod_hasBalancedMonitors, (JNIEnv *, jobject, jobject hotspot_method)) +C2V_VMENTRY(jint, hasBalancedMonitors, (JNIEnv *, jobject, jobject hotspot_method)) // Analyze the method to see if monitors are used properly. methodHandle method(THREAD, getMethodFromHotSpotMethod(hotspot_method)); @@ -192,7 +192,7 @@ return JNIHandles::make_local(THREAD, ret()); } -C2V_VMENTRY(jobject, JavaMethod_uniqueConcreteMethod, (JNIEnv *, jobject, jobject hotspot_method)) +C2V_VMENTRY(jobject, getUniqueConcreteMethod, (JNIEnv *, jobject, jobject hotspot_method)) methodHandle method = getMethodFromHotSpotMethod(hotspot_method); KlassHandle holder = method->method_holder(); if (holder->is_interface()) { @@ -219,11 +219,11 @@ } C2V_END -C2V_ENTRY(jint, JavaMethod_invocationCount, (JNIEnv *, jobject, jobject hotspot_method)) +C2V_ENTRY(jint, getInvocationCount, (JNIEnv *, jobject, jobject hotspot_method)) return getMethodFromHotSpotMethod(hotspot_method)->invocation_count(); C2V_END -C2V_VMENTRY(jobject, JavaMethod_methodData,(JNIEnv *, jobject, jobject hotspot_method)) +C2V_VMENTRY(jobject, getMethodData,(JNIEnv *, jobject, jobject hotspot_method)) methodDataHandle method_data = getMethodFromHotSpotMethod(hotspot_method)->method_data(); if(method_data.is_null()) { @@ -260,16 +260,12 @@ return count; } -C2V_ENTRY(jboolean, JavaMethod_hasCompiledCode, (JNIEnv *, jobject, jobject hotspot_method)) - return getMethodFromHotSpotMethod(hotspot_method)->has_compiled_code(); -C2V_END - -C2V_ENTRY(jint, JavaMethod_getCompiledCodeSize, (JNIEnv *env, jobject, jobject hotspot_method)) +C2V_ENTRY(jint, getCompiledCodeSize, (JNIEnv *env, jobject, jobject hotspot_method)) nmethod* code = getMethodFromHotSpotMethod(hotspot_method)->code(); return code == NULL ? 0 : code->insts_size(); C2V_END -C2V_VMENTRY(jobject, Signature_lookupType, (JNIEnv *env, jobject, jstring jname, jobject accessingClass, jboolean eagerResolve)) +C2V_VMENTRY(jobject, lookupType, (JNIEnv *env, jobject, jstring jname, jobject accessingClass, jboolean eagerResolve)) ResourceMark rm; Symbol* nameSymbol = VmIds::toSymbol(jname); @@ -334,7 +330,7 @@ return JNIHandles::make_local(THREAD, result); C2V_END -C2V_VMENTRY(jobject, ConstantPool_lookupConstant, (JNIEnv *env, jobject, jobject type, jint index)) +C2V_VMENTRY(jobject, lookupConstantInPool, (JNIEnv *env, jobject, jobject type, jint index)) constantPoolOop cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(type)))->constants(); @@ -376,7 +372,7 @@ return JNIHandles::make_local(THREAD, result); C2V_END -C2V_VMENTRY(jobject, ConstantPool_lookupMethod, (JNIEnv *env, jobject, jobject type, jint index, jbyte byteCode)) +C2V_VMENTRY(jobject, lookupMethodInPool, (JNIEnv *env, jobject, jobject type, jint index, jbyte byteCode)) index = GraalCompiler::to_cp_index_u2(index); constantPoolHandle cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(type)))->constants(); instanceKlassHandle pool_holder(cp->pool_holder()); @@ -396,18 +392,18 @@ } C2V_END -C2V_VMENTRY(jobject, ConstantPool_lookupType, (JNIEnv *env, jobject, jobject type, jint index)) +C2V_VMENTRY(jobject, lookupTypeInPool, (JNIEnv *env, jobject, jobject type, jint index)) constantPoolOop cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(type)))->constants(); Handle result = GraalCompiler::get_JavaType(cp, index, cp->pool_holder(), CHECK_NULL); return JNIHandles::make_local(THREAD, result()); C2V_END -C2V_VMENTRY(void, ConstantPool_loadReferencedType, (JNIEnv *env, jobject, jobject type, jint index, jbyte op)) +C2V_VMENTRY(void, lookupReferencedTypeInPool, (JNIEnv *env, jobject, jobject type, jint index, jbyte op)) constantPoolOop cp = instanceKlass::cast(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(type)))->constants(); - int byteCode = (op & 0xFF); - if (byteCode != Bytecodes::_checkcast && byteCode != Bytecodes::_instanceof && byteCode != Bytecodes::_new && byteCode != Bytecodes::_anewarray - && byteCode != Bytecodes::_multianewarray && byteCode != Bytecodes::_ldc && byteCode != Bytecodes::_ldc_w && byteCode != Bytecodes::_ldc2_w) + int opcode = (op & 0xFF); + if (opcode != Bytecodes::_checkcast && opcode != Bytecodes::_instanceof && opcode != Bytecodes::_new && opcode != Bytecodes::_anewarray + && opcode != Bytecodes::_multianewarray && opcode != Bytecodes::_ldc && opcode != Bytecodes::_ldc_w && opcode != Bytecodes::_ldc2_w) { index = cp->remap_instruction_operand_from_cache(GraalCompiler::to_cp_index_u2(index)); } @@ -425,7 +421,7 @@ } C2V_END -C2V_VMENTRY(jobject, ConstantPool_lookupField, (JNIEnv *env, jobject, jobject constantPoolHolder, jint index, jbyte byteCode)) +C2V_VMENTRY(jobject, lookupFieldInPool, (JNIEnv *env, jobject, jobject constantPoolHolder, jint index, jbyte byteCode)) ResourceMark rm; index = GraalCompiler::to_cp_index_u2(index); @@ -466,7 +462,7 @@ return JNIHandles::make_local(THREAD, field_handle()); C2V_END -C2V_VMENTRY(jobject, JavaType_resolveMethodImpl, (JNIEnv *, jobject, jobject resolved_type, jstring name, jstring signature)) +C2V_VMENTRY(jobject, resolveMethod, (JNIEnv *, jobject, jobject resolved_type, jstring name, jstring signature)) assert(JNIHandles::resolve(resolved_type) != NULL, ""); klassOop klass = java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(resolved_type)); @@ -484,7 +480,7 @@ return JNIHandles::make_local(THREAD, ret()); C2V_END -C2V_VMENTRY(jboolean, JavaType_isSubtypeOf, (JNIEnv *, jobject, jobject klass, jobject jother)) +C2V_VMENTRY(jboolean, isSubtypeOf, (JNIEnv *, jobject, jobject klass, jobject jother)) oop other = JNIHandles::resolve(jother); assert(other->is_a(HotSpotResolvedJavaType::klass()), "resolved hotspot type expected"); assert(JNIHandles::resolve(klass) != NULL, ""); @@ -500,7 +496,7 @@ } C2V_END -C2V_VMENTRY(jobject, JavaType_leastCommonAncestor, (JNIEnv *, jobject, jobject this_type, jobject other_type)) +C2V_VMENTRY(jobject, getLeastCommonAncestor, (JNIEnv *, jobject, jobject this_type, jobject other_type)) Klass* this_klass = java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(this_type))->klass_part(); Klass* other_klass = java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(other_type))->klass_part(); @@ -509,7 +505,7 @@ return JNIHandles::make_local(GraalCompiler::get_JavaType(lca, THREAD)()); C2V_END -C2V_VMENTRY(jobject, JavaType_componentType, (JNIEnv *, jobject, jobject klass)) +C2V_VMENTRY(jobject, getComponentType, (JNIEnv *, jobject, jobject klass)) KlassHandle array_klass = java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(klass)); if(array_klass->oop_is_typeArray()) { BasicType t = typeArrayKlass::cast(array_klass())->element_type(); @@ -522,7 +518,7 @@ return JNIHandles::make_local(GraalCompiler::get_JavaType(element_type, THREAD)()); C2V_END -C2V_VMENTRY(jlong, JavaType_prototypeMarkWord, (JNIEnv *, jobject, jobject klass)) +C2V_VMENTRY(jlong, getPrototypeMarkWord, (JNIEnv *, jobject, jobject klass)) KlassHandle klass_handle(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(klass))); if (klass_handle->oop_is_array()) { return (int32_t)(intptr_t) markOopDesc::prototype(); @@ -531,7 +527,7 @@ } C2V_END -C2V_VMENTRY(jobject, JavaType_superType, (JNIEnv *, jobject, jobject klass)) +C2V_VMENTRY(jobject, getSuperType, (JNIEnv *, jobject, jobject klass)) KlassHandle klass_handle(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(klass))); klassOop k; @@ -549,7 +545,7 @@ } C2V_END -C2V_VMENTRY(jobject, JavaType_uniqueConcreteSubtype, (JNIEnv *, jobject, jobject klass)) +C2V_VMENTRY(jobject, getUniqueConcreteSubtype, (JNIEnv *, jobject, jobject klass)) KlassHandle klass_handle(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(klass))); Klass *up_cast = klass_handle->up_cast_abstract(); if (!up_cast->is_interface() && up_cast->subklass() == NULL) { @@ -558,20 +554,19 @@ return NULL; C2V_END -C2V_VMENTRY(jboolean, JavaType_isInitialized,(JNIEnv *, jobject, jobject hotspot_klass)) +C2V_VMENTRY(jboolean, isTypeInitialized,(JNIEnv *, jobject, jobject hotspot_klass)) klassOop klass = java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(hotspot_klass)); assert(klass != NULL, "method must not be called for primitive types"); return instanceKlass::cast(klass)->is_initialized(); C2V_END -// public bool JavaType_isInitialized(HotSpotResolvedType klass); -C2V_VMENTRY(void, JavaType_initialize, (JNIEnv *, jobject, jobject hotspot_klass)) +C2V_VMENTRY(void, initializeType, (JNIEnv *, jobject, jobject hotspot_klass)) klassOop klass = java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(hotspot_klass)); assert(klass != NULL, "method must not be called for primitive types"); instanceKlass::cast(klass)->initialize(JavaThread::current()); C2V_END -C2V_VMENTRY(jobject, JavaType_arrayOf, (JNIEnv *, jobject, jobject klass)) +C2V_VMENTRY(jobject, getArrayOf, (JNIEnv *, jobject, jobject klass)) KlassHandle klass_handle(java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(klass))); KlassHandle arr = klass_handle->array_klass(THREAD); Handle name = VmIds::toString<Handle>(arr->name(), CHECK_NULL); @@ -579,7 +574,7 @@ return JNIHandles::make_local(THREAD, GraalCompiler::createHotSpotResolvedJavaType(arr, name, THREAD)()); C2V_END -C2V_VMENTRY(jobject, JavaType_fields, (JNIEnv *, jobject, jobject klass)) +C2V_VMENTRY(jobject, getFields, (JNIEnv *, jobject, jobject klass)) ResourceMark rm; instanceKlassHandle k = java_lang_Class::as_klassOop(HotSpotResolvedJavaType::javaMirror(klass)); @@ -833,7 +828,7 @@ return JNIHandles::make_local(result()); C2V_END -C2V_VMENTRY(jobject, JavaMethod_toStackTraceElement, (JNIEnv *env, jobject, jobject hotspot_method, int bci)) +C2V_VMENTRY(jobject, getStackTraceElement, (JNIEnv *env, jobject, jobject hotspot_method, int bci)) ResourceMark rm; HandleMark hm; @@ -893,7 +888,7 @@ return JNIHandles::make_local((oop) result.get_jobject()); C2V_END -C2V_VMENTRY(jint, JavaMethod_vtableEntryOffset, (JNIEnv *, jobject, jobject hotspot_method)) +C2V_VMENTRY(jint, getVtableEntryOffset, (JNIEnv *, jobject, jobject hotspot_method)) methodOop method = getMethodFromHotSpotMethod(hotspot_method); assert(!instanceKlass::cast(method->method_holder())->is_interface(), "vtableEntryOffset cannot be called for interface methods"); @@ -939,7 +934,7 @@ #define CC (char*) /*cast a literal from (const char*)*/ -#define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(f)) +#define FN_PTR(f) CAST_FROM_FN_PTR(void*, &(c2v_ ## f)) #define PROXY "J" #define TYPE "Lcom/oracle/graal/api/meta/JavaType;" @@ -968,50 +963,45 @@ #define STACK_TRACE_ELEMENT "Ljava/lang/StackTraceElement;" JNINativeMethod CompilerToVM_methods[] = { - {CC"JavaMethod_code", CC"("RESOLVED_METHOD")[B", FN_PTR(JavaMethod_code)}, - {CC"JavaMethod_signature", CC"("RESOLVED_METHOD")"STRING, FN_PTR(JavaMethod_signature)}, - {CC"JavaMethod_exceptionHandlers", CC"("RESOLVED_METHOD")"EXCEPTION_HANDLERS, FN_PTR(JavaMethod_exceptionHandlers)}, - {CC"JavaMethod_hasBalancedMonitors", CC"("RESOLVED_METHOD")Z", FN_PTR(JavaMethod_hasBalancedMonitors)}, - {CC"JavaMethod_uniqueConcreteMethod", CC"("RESOLVED_METHOD")"METHOD, FN_PTR(JavaMethod_uniqueConcreteMethod)}, - {CC"JavaMethod_toStackTraceElement", CC"("RESOLVED_METHOD"I)"STACK_TRACE_ELEMENT, FN_PTR(JavaMethod_toStackTraceElement)}, - {CC"JavaMethod_methodData", CC"("RESOLVED_METHOD")"METHOD_DATA, FN_PTR(JavaMethod_methodData)}, - {CC"JavaMethod_invocationCount", CC"("RESOLVED_METHOD")I", FN_PTR(JavaMethod_invocationCount)}, - {CC"JavaMethod_hasCompiledCode", CC"("RESOLVED_METHOD")Z", FN_PTR(JavaMethod_hasCompiledCode)}, - {CC"JavaMethod_getCompiledCodeSize", CC"("RESOLVED_METHOD")I", FN_PTR(JavaMethod_getCompiledCodeSize)}, - {CC"JavaMethod_vtableEntryOffset", CC"("RESOLVED_METHOD")I", FN_PTR(JavaMethod_vtableEntryOffset)}, - - {CC"Signature_lookupType", CC"("STRING RESOLVED_TYPE"Z)"TYPE, FN_PTR(Signature_lookupType)}, - - {CC"ConstantPool_lookupConstant", CC"("RESOLVED_TYPE"I)"OBJECT, FN_PTR(ConstantPool_lookupConstant)}, - {CC"ConstantPool_lookupMethod", CC"("RESOLVED_TYPE"IB)"METHOD, FN_PTR(ConstantPool_lookupMethod)}, - {CC"ConstantPool_lookupType", CC"("RESOLVED_TYPE"I)"TYPE, FN_PTR(ConstantPool_lookupType)}, - {CC"ConstantPool_loadReferencedType", CC"("RESOLVED_TYPE"IB)V", FN_PTR(ConstantPool_loadReferencedType)}, - {CC"ConstantPool_lookupField", CC"("RESOLVED_TYPE"IB)"FIELD, FN_PTR(ConstantPool_lookupField)}, - - {CC"JavaType_resolveMethodImpl", CC"("RESOLVED_TYPE STRING STRING")"METHOD, FN_PTR(JavaType_resolveMethodImpl)}, - {CC"JavaType_isSubtypeOf", CC"("RESOLVED_TYPE TYPE")Z", FN_PTR(JavaType_isSubtypeOf)}, - {CC"JavaType_leastCommonAncestor", CC"("RESOLVED_TYPE RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_leastCommonAncestor)}, - {CC"JavaType_componentType", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_componentType)}, - {CC"JavaType_uniqueConcreteSubtype", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_uniqueConcreteSubtype)}, - {CC"JavaType_superType", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_superType)}, - {CC"JavaType_prototypeMarkWord", CC"("RESOLVED_TYPE")J", FN_PTR(JavaType_prototypeMarkWord)}, - {CC"JavaType_arrayOf", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(JavaType_arrayOf)}, - {CC"JavaType_fields", CC"("RESOLVED_TYPE")["RESOLVED_FIELD, FN_PTR(JavaType_fields)}, - {CC"JavaType_isInitialized", CC"("RESOLVED_TYPE")Z", FN_PTR(JavaType_isInitialized)}, - {CC"JavaType_initialize", CC"("RESOLVED_TYPE")V", FN_PTR(JavaType_initialize)}, - - {CC"getPrimitiveArrayType", CC"("KIND")"TYPE, FN_PTR(getPrimitiveArrayType)}, - {CC"getMaxCallTargetOffset", CC"(J)J", FN_PTR(getMaxCallTargetOffset)}, - {CC"getType", CC"("CLASS")"TYPE, FN_PTR(getType)}, - {CC"getJavaMethod", CC"("REFLECT_METHOD")"METHOD , FN_PTR(getJavaMethod)}, - {CC"getJavaField", CC"("REFLECT_FIELD")"RESOLVED_FIELD, FN_PTR(getJavaField)}, - {CC"initializeConfiguration", CC"("CONFIG")V", FN_PTR(initializeConfiguration)}, - {CC"installMethod", CC"("HS_COMP_RESULT"Z"HS_CODE_INFO")"HS_COMP_METHOD, FN_PTR(installMethod)}, - {CC"disassembleNative", CC"([BJ)"STRING, FN_PTR(disassembleNative)}, - {CC"executeCompiledMethod", CC"("HS_COMP_METHOD OBJECT OBJECT OBJECT")"OBJECT, FN_PTR(executeCompiledMethod)}, - {CC"executeCompiledMethodVarargs", CC"("HS_COMP_METHOD "["OBJECT")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, - {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)}, - {CC"decodePC", CC"(J)"STRING, FN_PTR(decodePC)}, + {CC"getBytecode", CC"("RESOLVED_METHOD")[B", FN_PTR(getBytecode)}, + {CC"getSignature", CC"("RESOLVED_METHOD")"STRING, FN_PTR(getSignature)}, + {CC"getExceptionHandlers", CC"("RESOLVED_METHOD")"EXCEPTION_HANDLERS, FN_PTR(getExceptionHandlers)}, + {CC"hasBalancedMonitors", CC"("RESOLVED_METHOD")Z", FN_PTR(hasBalancedMonitors)}, + {CC"getUniqueConcreteMethod", CC"("RESOLVED_METHOD")"METHOD, FN_PTR(getUniqueConcreteMethod)}, + {CC"getStackTraceElement", CC"("RESOLVED_METHOD"I)"STACK_TRACE_ELEMENT, FN_PTR(getStackTraceElement)}, + {CC"getMethodData", CC"("RESOLVED_METHOD")"METHOD_DATA, FN_PTR(getMethodData)}, + {CC"getInvocationCount", CC"("RESOLVED_METHOD")I", FN_PTR(getInvocationCount)}, + {CC"getCompiledCodeSize", CC"("RESOLVED_METHOD")I", FN_PTR(getCompiledCodeSize)}, + {CC"getVtableEntryOffset", CC"("RESOLVED_METHOD")I", FN_PTR(getVtableEntryOffset)}, + {CC"lookupType", CC"("STRING RESOLVED_TYPE"Z)"TYPE, FN_PTR(lookupType)}, + {CC"lookupConstantInPool", CC"("RESOLVED_TYPE"I)"OBJECT, FN_PTR(lookupConstantInPool)}, + {CC"lookupMethodInPool", CC"("RESOLVED_TYPE"IB)"METHOD, FN_PTR(lookupMethodInPool)}, + {CC"lookupTypeInPool", CC"("RESOLVED_TYPE"I)"TYPE, FN_PTR(lookupTypeInPool)}, + {CC"lookupReferencedTypeInPool", CC"("RESOLVED_TYPE"IB)V", FN_PTR(lookupReferencedTypeInPool)}, + {CC"lookupFieldInPool", CC"("RESOLVED_TYPE"IB)"FIELD, FN_PTR(lookupFieldInPool)}, + {CC"resolveMethod", CC"("RESOLVED_TYPE STRING STRING")"METHOD, FN_PTR(resolveMethod)}, + {CC"isSubtypeOf", CC"("RESOLVED_TYPE TYPE")Z", FN_PTR(isSubtypeOf)}, + {CC"getLeastCommonAncestor", CC"("RESOLVED_TYPE RESOLVED_TYPE")"TYPE, FN_PTR(getLeastCommonAncestor)}, + {CC"getComponentType", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(getComponentType)}, + {CC"getUniqueConcreteSubtype", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(getUniqueConcreteSubtype)}, + {CC"getSuperType", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(getSuperType)}, + {CC"getPrototypeMarkWord", CC"("RESOLVED_TYPE")J", FN_PTR(getPrototypeMarkWord)}, + {CC"getArrayOf", CC"("RESOLVED_TYPE")"TYPE, FN_PTR(getArrayOf)}, + {CC"getFields", CC"("RESOLVED_TYPE")["RESOLVED_FIELD, FN_PTR(getFields)}, + {CC"isTypeInitialized", CC"("RESOLVED_TYPE")Z", FN_PTR(isTypeInitialized)}, + {CC"initializeType", CC"("RESOLVED_TYPE")V", FN_PTR(initializeType)}, + {CC"getPrimitiveArrayType", CC"("KIND")"TYPE, FN_PTR(getPrimitiveArrayType)}, + {CC"getMaxCallTargetOffset", CC"(J)J", FN_PTR(getMaxCallTargetOffset)}, + {CC"getType", CC"("CLASS")"TYPE, FN_PTR(getType)}, + {CC"getJavaMethod", CC"("REFLECT_METHOD")"METHOD , FN_PTR(getJavaMethod)}, + {CC"getJavaField", CC"("REFLECT_FIELD")"RESOLVED_FIELD, FN_PTR(getJavaField)}, + {CC"initializeConfiguration", CC"("CONFIG")V", FN_PTR(initializeConfiguration)}, + {CC"installMethod", CC"("HS_COMP_RESULT"Z"HS_CODE_INFO")"HS_COMP_METHOD, FN_PTR(installMethod)}, + {CC"disassembleNative", CC"([BJ)"STRING, FN_PTR(disassembleNative)}, + {CC"executeCompiledMethod", CC"("HS_COMP_METHOD OBJECT OBJECT OBJECT")"OBJECT, FN_PTR(executeCompiledMethod)}, + {CC"executeCompiledMethodVarargs", CC"("HS_COMP_METHOD "["OBJECT")"OBJECT, FN_PTR(executeCompiledMethodVarargs)}, + {CC"getDeoptedLeafGraphIds", CC"()[J", FN_PTR(getDeoptedLeafGraphIds)}, + {CC"decodePC", CC"(J)"STRING, FN_PTR(decodePC)}, }; int CompilerToVM_methods_count() {