changeset 17020:5c1bc769563e

Merge
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Fri, 29 Aug 2014 16:05:30 -0700
parents 1013a8444746 (current diff) 5d16da2ca0c8 (diff)
children c2437c80c253
files
diffstat 6 files changed, 38 insertions(+), 40 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java	Fri Aug 29 16:04:46 2014 -0700
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/HotSpotVMConfig.java	Fri Aug 29 16:05:30 2014 -0700
@@ -1594,21 +1594,21 @@
     }
 
     /**
-     * Returns the name of the C/C++ function that is associated (via HotSpotVMValue annotation)
-     * with the HotSpotVMConfig object's field containing {@code foreignCalltargetAddress}; returns
-     * null if no field holds the provided address.
+     * Returns the name of the C/C++ symbol that is associated (via HotSpotVMValue annotation) with
+     * the HotSpotVMConfig object's field containing {@code value}; returns null if no field holds
+     * the provided address.
      *
-     * @param foreignCallTargetAddress address of foreign call target
+     * @param value value of the field
      * @return C/C++ symbol name or null
      */
-    public String getCSymbol(long foreignCallTargetAddress) {
+    public String getVMValueCSymbol(long value) {
         for (Field f : HotSpotVMConfig.class.getDeclaredFields()) {
             if (f.isAnnotationPresent(HotSpotVMValue.class)) {
                 HotSpotVMValue annotation = f.getAnnotation(HotSpotVMValue.class);
 
                 if (annotation.get() == HotSpotVMValue.Type.ADDRESS) {
                     try {
-                        if (foreignCallTargetAddress == f.getLong(this)) {
+                        if (value == f.getLong(this)) {
                             return (annotation.expression() + annotation.signature());
                         }
                     } catch (IllegalArgumentException e1) {
@@ -1623,4 +1623,35 @@
         }
         return null;
     }
+
+    /**
+     * Returns the name of the C/C++ symbol that is associated (via HotSpotVMField annotation) with
+     * the HotSpotVMConfig object's field containing {@code value}; returns null if no field holds
+     * the provided address.
+     *
+     * @param value value of the field
+     * @return C/C++ symbol name or null
+     */
+    public String getVMFieldCSymbol(long value) {
+        for (Field f : HotSpotVMConfig.class.getDeclaredFields()) {
+            if (f.isAnnotationPresent(HotSpotVMField.class)) {
+                HotSpotVMField annotation = f.getAnnotation(HotSpotVMField.class);
+
+                if (annotation.get() == HotSpotVMField.Type.VALUE) {
+                    try {
+                        if (value == f.getLong(this)) {
+                            return (annotation.name());
+                        }
+                    } catch (IllegalArgumentException e1) {
+                        // TODO Auto-generated catch block
+                        e1.printStackTrace();
+                    } catch (IllegalAccessException e1) {
+                        // TODO Auto-generated catch block
+                        e1.printStackTrace();
+                    }
+                }
+            }
+        }
+        return null;
+    }
 }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java	Fri Aug 29 16:04:46 2014 -0700
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/OptimizedCallTarget.java	Fri Aug 29 16:05:30 2014 -0700
@@ -333,9 +333,6 @@
     public final Object callInlined(Object[] arguments) {
         if (CompilerDirectives.inInterpreter()) {
             compilationProfile.reportInlinedCall();
-            if (isValid()) {
-                return callDirect(arguments);
-            }
         }
         VirtualFrame frame = createFrame(getRootNode().getFrameDescriptor(), arguments);
         return callProxy(frame);
--- a/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/InstrumentationTest.java	Fri Aug 29 16:04:46 2014 -0700
+++ b/graal/com.oracle.truffle.api.test/src/com/oracle/truffle/api/test/InstrumentationTest.java	Fri Aug 29 16:05:30 2014 -0700
@@ -191,14 +191,6 @@
             this.probe = context.createProbe(child.getSourceSection());
         }
 
-        public boolean isTaggedAs(SyntaxTag tag) {
-            return false;
-        }
-
-        public Iterable<SyntaxTag> getSyntaxTags() {
-            return null;
-        }
-
         public Node getChild() {
             return child;
         }
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Wrapper.java	Fri Aug 29 16:04:46 2014 -0700
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Wrapper.java	Fri Aug 29 16:05:30 2014 -0700
@@ -62,7 +62,7 @@
  * @see Probe
  * @see ExecutionEvents
  */
-public interface Wrapper extends SyntaxTagged {
+public interface Wrapper {
 
     /**
      * Gets the AST node being instrumented, which should never be an instance of {@link Wrapper}.
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/instrument/SLExpressionWrapper.java	Fri Aug 29 16:04:46 2014 -0700
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/instrument/SLExpressionWrapper.java	Fri Aug 29 16:05:30 2014 -0700
@@ -73,18 +73,6 @@
         return probe;
     }
 
-    @Override
-    @SlowPath
-    public boolean isTaggedAs(SyntaxTag tag) {
-        return probe.isTaggedAs(tag);
-    }
-
-    @Override
-    @SlowPath
-    public Iterable<SyntaxTag> getSyntaxTags() {
-        return probe.getSyntaxTags();
-    }
-
     @SlowPath
     public void tagAs(SyntaxTag tag) {
         probe.tagAs(tag);
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/instrument/SLStatementWrapper.java	Fri Aug 29 16:04:46 2014 -0700
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/instrument/SLStatementWrapper.java	Fri Aug 29 16:05:30 2014 -0700
@@ -62,16 +62,6 @@
     }
 
     @SlowPath
-    public boolean isTaggedAs(SyntaxTag tag) {
-        return probe.isTaggedAs(tag);
-    }
-
-    @SlowPath
-    public Iterable<SyntaxTag> getSyntaxTags() {
-        return probe.getSyntaxTags();
-    }
-
-    @SlowPath
     public void tagAs(SyntaxTag tag) {
         probe.tagAs(tag);
     }