diff graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java @ 6950:41938af2b3d8

modifications to support non-perm-gen changes in HotSpot fixed issue when intrinsifying Class.getModifiers() for primitive classes
author Doug Simon <doug.simon@oracle.com>
date Wed, 14 Nov 2012 11:28:02 +0100
parents 3dddb311395f
children 2a1ec8b0bfe0
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java	Mon Nov 12 23:37:12 2012 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/bridge/VMToCompiler.java	Wed Nov 14 11:28:02 2012 +0100
@@ -33,7 +33,7 @@
  */
 public interface VMToCompiler {
 
-    boolean compileMethod(HotSpotResolvedJavaMethod method, int entryBCI, boolean blocking, int priority) throws Throwable;
+    boolean compileMethod(long metaspaceMethod, HotSpotResolvedJavaType holder, int entryBCI, boolean blocking, int priority) throws Throwable;
 
     void shutdownCompiler() throws Throwable;
 
@@ -43,15 +43,36 @@
 
     PrintStream log();
 
-    JavaMethod createJavaMethod(String name, String signature, JavaType holder);
+    JavaMethod createUnresolvedJavaMethod(String name, String signature, JavaType holder);
 
     Signature createSignature(String signature);
 
-    JavaField createJavaField(JavaType holder, String name, JavaType type, int offset, int flags);
+    JavaField createJavaField(JavaType holder, String name, JavaType type, int offset, int flags, boolean internal);
+
+    ResolvedJavaMethod createResolvedJavaMethod(JavaType holder, long metaspaceMethod);
 
     JavaType createPrimitiveJavaType(int basicType);
 
-    JavaType createJavaType(String name);
+    JavaType createUnresolvedJavaType(String name);
+
+    /**
+     * Creates a resolved Java type.
+     *
+     * @param metaspaceKlass the metaspace Klass object for the type
+     * @param name the {@linkplain JavaType#getName() name} of the type
+     * @param simpleName a simple, unqualified name for the type
+     * @param javaMirror the {@link Class} mirror
+     * @param hasFinalizableSubclass specifies if the type has a finalizable subtype
+     * @param sizeOrSpecies the size of an instance of the type, or {@link HotSpotResolvedJavaType#INTERFACE_SPECIES_VALUE} or {@link HotSpotResolvedJavaType#ARRAY_SPECIES_VALUE}
+     * @return the resolved type associated with {@code javaMirror} which may not be the type instantiated by this call
+     *         in the case of another thread racing to create the same type
+     */
+    ResolvedJavaType createResolvedJavaType(long metaspaceKlass,
+                    String name,
+                    String simpleName,
+                    Class javaMirror,
+                    boolean hasFinalizableSubclass,
+                    int sizeOrSpecies);
 
     Constant createConstant(Kind kind, long value);