changeset 5450:e1f45fcddb49

Elimination of unused methods in the CRI.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 25 May 2012 20:23:24 +0200
parents 56f4afcf71f7
children 071f24ba116e 3d2ad5c8db10 044502e7b5a4
files graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotTargetMethod.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java src/share/vm/graal/graalCompilerToVM.cpp
diffstat 6 files changed, 0 insertions(+), 89 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotTargetMethod.java	Fri May 25 13:22:45 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotTargetMethod.java	Fri May 25 20:23:24 2012 +0200
@@ -96,9 +96,4 @@
         }
         return result;
     }
-
-    public static Object installStub(Compiler compiler, CiTargetMethod targetMethod, String name, HotSpotCodeInfo info) {
-        return compiler.getCompilerToVM().installStub(new HotSpotTargetMethod(compiler, targetMethod, name), info);
-    }
-
 }
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java	Fri May 25 13:22:45 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVM.java	Fri May 25 20:23:24 2012 +0200
@@ -65,8 +65,6 @@
 
     HotSpotCompiledMethod installMethod(HotSpotTargetMethod targetMethod, boolean makeDefault, HotSpotCodeInfo info);
 
-    long installStub(HotSpotTargetMethod targetMethod, HotSpotCodeInfo info);
-
     HotSpotVMConfig getConfiguration();
 
     RiMethod RiType_resolveMethodImpl(HotSpotTypeResolved klass, String name, String signature);
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java	Fri May 25 13:22:45 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/CompilerToVMImpl.java	Fri May 25 20:23:24 2012 +0200
@@ -81,9 +81,6 @@
     public native HotSpotCompiledMethod installMethod(HotSpotTargetMethod targetMethod, boolean makeDefault, HotSpotCodeInfo info);
 
     @Override
-    public native long installStub(HotSpotTargetMethod targetMethod, HotSpotCodeInfo info);
-
-    @Override
     public native HotSpotVMConfig getConfiguration();
 
     @Override
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java	Fri May 25 13:22:45 2012 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/ri/HotSpotRuntime.java	Fri May 25 20:23:24 2012 +0200
@@ -83,12 +83,6 @@
     }
 
 
-    @Override
-    public int codeOffset() {
-        return 0;
-    }
-
-
     public Compiler getCompiler() {
         return compiler;
     }
@@ -208,28 +202,12 @@
     }
 
     @Override
-    public Object registerCompilerStub(CiTargetMethod targetMethod, String name, RiCodeInfo info) {
-        return HotSpotTargetMethod.installStub(compiler, targetMethod, name, (HotSpotCodeInfo) info);
-    }
-
-    @Override
     public int sizeOfLockData() {
         // TODO shouldn't be hard coded
         return 8;
     }
 
     @Override
-    public int sizeOfBasicObjectLock() {
-        // TODO shouldn't be hard coded
-        return 2 * 8;
-    }
-
-    @Override
-    public int basicObjectLockOffsetInBytes() {
-        return 8;
-    }
-
-    @Override
     public boolean areConstantObjectsEqual(CiConstant x, CiConstant y) {
         return compiler.getCompilerToVM().compareConstantObjects(x, y);
     }
--- a/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java	Fri May 25 13:22:45 2012 +0200
+++ b/graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java	Fri May 25 20:23:24 2012 +0200
@@ -33,34 +33,11 @@
 public interface RiRuntime {
 
     /**
-     * Offset of the lock within the lock object on the stack.
-
-     * Note: superseded by sizeOfLockData() in Graal.
-     *
-     * @return the offset in bytes
-     */
-    int basicObjectLockOffsetInBytes();
-
-    /**
-     * Get the size in bytes of a lock object on the stack.
-     *
-     * Note: superseded by sizeOfLockData() in Graal.
-     */
-    int sizeOfBasicObjectLock();
-
-    /**
      * Get the size in bytes for locking information on the stack.
      */
     int sizeOfLockData();
 
     /**
-     * The offset of the normal entry to the code. The compiler inserts NOP instructions to satisfy this constraint.
-     *
-     * @return the code offset in bytes
-     */
-    int codeOffset();
-
-    /**
      * Returns a disassembly of the given installed code.
      *
      * @param code the code that should be disassembled
@@ -77,17 +54,6 @@
     String disassemble(RiResolvedMethod method);
 
     /**
-     * Registers the given compiler stub and returns an object that can be used to identify it in the relocation
-     * information.
-     *
-     * @param targetMethod the target method representing the code of the compiler stub
-     * @param name the name of the stub, used for debugging purposes only
-     * @param info the object into which details of the installed code will be written (ignored if null)
-     * @return the identification object
-     */
-    Object registerCompilerStub(CiTargetMethod targetMethod, String name, RiCodeInfo info);
-
-    /**
      * Returns the RiType object representing the base type for the given kind.
      */
     RiResolvedType asRiType(CiKind kind);
--- a/src/share/vm/graal/graalCompilerToVM.cpp	Fri May 25 13:22:45 2012 +0200
+++ b/src/share/vm/graal/graalCompilerToVM.cpp	Fri May 25 20:23:24 2012 +0200
@@ -909,28 +909,6 @@
   }
 }
 
-// public long installStub(HotSpotTargetMethod targetMethod, String name);
-JNIEXPORT jlong JNICALL Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_installStub(JNIEnv *jniEnv, jobject, jobject targetMethod, jobject info) {
-  VM_ENTRY_MARK;
-  ResourceMark rm;
-  HandleMark hm;
-  Handle targetMethodHandle = JNIHandles::resolve(targetMethod);
-  jlong id;
-  Arena arena;
-  ciEnv env(&arena);
-  BufferBlob* blob;
-  CodeInstaller installer(targetMethodHandle, blob, id);
-
-  if (info != NULL) {
-    arrayOop codeCopy = oopFactory::new_byteArray(blob->code_size(), CHECK_0);
-    memcpy(codeCopy->base(T_BYTE), blob->code_begin(), blob->code_size());
-    HotSpotCodeInfo::set_code(info, codeCopy);
-    HotSpotCodeInfo::set_start(info, (jlong) blob->code_begin());
-  }
-
-  return id;
-}
-
 // public String disassembleNative(byte[] code, long address);
 JNIEXPORT jobject JNICALL Java_com_oracle_graal_hotspot_bridge_CompilerToVMImpl_disassembleNative(JNIEnv *jniEnv, jobject, jbyteArray code, jlong start_address) {
   TRACE_graal_3("CompilerToVM::disassembleNative");
@@ -1195,7 +1173,6 @@
   {CC"getType",                           CC"("CLASS")"TYPE,                                    FN_PTR(getType)},
   {CC"getConfiguration",                  CC"()"CONFIG,                                         FN_PTR(getConfiguration)},
   {CC"installMethod",                     CC"("TARGET_METHOD"Z"HS_CODE_INFO")"HS_COMP_METHOD,   FN_PTR(installMethod)},
-  {CC"installStub",                       CC"("TARGET_METHOD HS_CODE_INFO")"PROXY,              FN_PTR(installStub)},
   {CC"disassembleNative",                 CC"([BJ)"STRING,                                      FN_PTR(disassembleNative)},
   {CC"disassembleJava",                   CC"("RESOLVED_METHOD")"STRING,                        FN_PTR(disassembleJava)},
   {CC"RiMethod_toStackTraceElement",      CC"("RESOLVED_METHOD"I)"STACK_TRACE_ELEMENT,          FN_PTR(RiMethod_1toStackTraceElement)},