changeset 21089:bb63a1b5487c

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Wed, 22 Apr 2015 16:22:53 +0200
parents 355ebfa2ba95 (current diff) 5454085a08a7 (diff)
children c5365790bf49
files
diffstat 2 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/InvocationPlugin.java	Wed Apr 22 15:48:18 2015 +0200
+++ b/graal/com.oracle.graal.graphbuilderconf/src/com/oracle/graal/graphbuilderconf/InvocationPlugin.java	Wed Apr 22 16:22:53 2015 +0200
@@ -45,6 +45,7 @@
 
     /**
      * Determines if this plugin can only be used when inlining the method is it associated with.
+     * That is, this plugin cannot be used when the associated method is the compilation root.
      */
     default boolean inlineOnly() {
         return isSignaturePolymorphic();
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSnippetReflectionProvider.java	Wed Apr 22 15:48:18 2015 +0200
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotSnippetReflectionProvider.java	Wed Apr 22 16:22:53 2015 +0200
@@ -78,7 +78,9 @@
     private ResolvedJavaType configType;
 
     public Object getInjectedNodeIntrinsicParameter(ResolvedJavaType type) {
-        if (wordTypesType == null) {
+        // Need to test all fields since there no guarantee under the JMM
+        // about the order in which these fields are written.
+        if (configType == null || wordTypesType == null || configType == null) {
             MetaAccessProvider metaAccess = runtime.getHostProviders().getMetaAccess();
             wordTypesType = metaAccess.lookupJavaType(runtime.getHostProviders().getWordTypes().getClass());
             runtimeType = metaAccess.lookupJavaType(runtime.getClass());