changeset 18975:88083bb2e0f8

Merge.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 27 Jan 2015 16:58:48 +0100
parents c597c72e163b (current diff) c1f8125b4207 (diff)
children 3faa4f98d5c8
files
diffstat 20 files changed, 161 insertions(+), 52 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/stubs/Stub.java	Tue Jan 27 16:58:48 2015 +0100
@@ -54,6 +54,8 @@
  */
 public abstract class Stub {
 
+    private static final List<Stub> stubs = new ArrayList<>();
+
     /**
      * The linkage information for a call to this stub from compiled code.
      */
@@ -107,6 +109,14 @@
     public Stub(HotSpotProviders providers, HotSpotForeignCallLinkage linkage) {
         this.linkage = linkage;
         this.providers = providers;
+        stubs.add(this);
+    }
+
+    /**
+     * Gets an immutable view of all stubs that have been created.
+     */
+    public static Collection<Stub> getStubs() {
+        return Collections.unmodifiableList(stubs);
     }
 
     /**
--- a/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/MathSubstitutionsX86.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/MathSubstitutionsX86.java	Tue Jan 27 16:58:48 2015 +0100
@@ -28,6 +28,7 @@
 import com.oracle.graal.graph.Node.NodeIntrinsic;
 import com.oracle.graal.nodes.calc.*;
 import com.oracle.graal.nodes.extended.*;
+import com.oracle.graal.nodes.spi.*;
 import com.oracle.graal.replacements.nodes.*;
 import com.oracle.graal.replacements.nodes.MathIntrinsicNode.Operation;
 
@@ -67,6 +68,7 @@
     /**
      * Special cases from {@link Math#pow} and __ieee754_pow (in sharedRuntimeTrans.cpp).
      */
+    @MacroSubstitution(macro = MathPowNode.class)
     @MethodSubstitution(guard = UnsafeSubstitutions.GetAndSetGuard.class)
     public static double pow(double x, double y) {
         // If the second argument is positive or negative zero, then the result is 1.0.
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/graal/com.oracle.graal.replacements/src/com/oracle/graal/replacements/nodes/MathPowNode.java	Tue Jan 27 16:58:48 2015 +0100
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 2015, 2015, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+package com.oracle.graal.replacements.nodes;
+
+import com.oracle.graal.graph.spi.*;
+import com.oracle.graal.nodeinfo.*;
+import com.oracle.graal.nodes.*;
+import com.oracle.graal.nodes.extended.*;
+
+/**
+ * This is an extension of {@link MacroNode} that is a {@link StateSplit} and a
+ * {@link MemoryCheckpoint}.
+ */
+@NodeInfo
+public class MathPowNode extends MacroStateSplitNode implements Canonicalizable.Binary<ValueNode> {
+
+    public MathPowNode(Invoke i) {
+        super(i);
+    }
+
+    public ValueNode canonical(CanonicalizerTool tool, ValueNode forX, ValueNode forY) {
+        if (forX.isConstant() && forY.isConstant()) {
+            double x = forX.asJavaConstant().asDouble();
+            double y = forY.asJavaConstant().asDouble();
+            return ConstantNode.forDouble(Math.pow(x, y));
+        } else {
+            return this;
+        }
+    }
+
+    public ValueNode getX() {
+        return arguments.get(0);
+    }
+
+    public ValueNode getY() {
+        return arguments.get(1);
+    }
+}
--- a/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.truffle.hotspot/src/com/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime.java	Tue Jan 27 16:58:48 2015 +0100
@@ -63,7 +63,10 @@
  */
 public final class HotSpotTruffleRuntime extends GraalTruffleRuntime {
 
-    public static HotSpotTruffleRuntime makeInstance() {
+    public static TruffleRuntime makeInstance() {
+        if (GraalTruffleRuntime.alternateRuntime != null) {
+            return GraalTruffleRuntime.alternateRuntime;
+        }
         return new HotSpotTruffleRuntime();
     }
 
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CompilationProfile.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/CompilationProfile.java	Tue Jan 27 16:58:48 2015 +0100
@@ -28,8 +28,6 @@
 
 public class CompilationProfile {
 
-    private static final int TIMESTAMP_THRESHOLD = Math.max(TruffleCompilationThreshold.getValue() / 2, 1);
-
     /**
      * Number of times an installed code for this tree was invalidated.
      */
@@ -112,7 +110,7 @@
         interpreterCallAndLoopCount++;
 
         int callsMissing = compilationCallAndLoopThreshold - interpreterCallAndLoopCount;
-        if (callsMissing == TIMESTAMP_THRESHOLD) {
+        if (callsMissing == getTimestampThreshold()) {
             timestamp = System.nanoTime();
         }
     }
@@ -130,7 +128,7 @@
     }
 
     public void deferCompilation() {
-        ensureProfiling(0, TIMESTAMP_THRESHOLD + 1);
+        ensureProfiling(0, getTimestampThreshold() + 1);
         timestamp = 0;
         deferedCount++;
     }
@@ -139,7 +137,7 @@
         interpreterCallAndLoopCount += count;
 
         int callsMissing = compilationCallAndLoopThreshold - interpreterCallAndLoopCount;
-        if (callsMissing <= TIMESTAMP_THRESHOLD && callsMissing + count > TIMESTAMP_THRESHOLD) {
+        if (callsMissing <= getTimestampThreshold() && callsMissing + count > getTimestampThreshold()) {
             timestamp = System.nanoTime();
         }
     }
@@ -153,4 +151,8 @@
     public long getTimestamp() {
         return timestamp;
     }
+
+    private static int getTimestampThreshold() {
+        return Math.max(TruffleCompilationThreshold.getValue() / 2, 1);
+    }
 }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/FrameWithoutBoxing.java	Tue Jan 27 16:58:48 2015 +0100
@@ -38,11 +38,6 @@
  * frame object would show up very late and would be hard to identify.
  */
 public final class FrameWithoutBoxing implements VirtualFrame, MaterializedFrame {
-    private static final long OBJECT_BASE_OFFSET = Unsafe.ARRAY_OBJECT_BASE_OFFSET;
-    private static final long OBJECT_INDEX_SCALE = Unsafe.ARRAY_OBJECT_INDEX_SCALE;
-    private static final long PRIMITIVE_BASE_OFFSET = Unsafe.ARRAY_LONG_BASE_OFFSET;
-    private static final long PRIMITIVE_INDEX_SCALE = Unsafe.ARRAY_LONG_INDEX_SCALE;
-
     private final FrameDescriptor descriptor;
     private final Object[] arguments;
     private Object[] locals;
@@ -89,7 +84,7 @@
 
     private Object getObjectUnsafe(FrameSlot slot) {
         int slotIndex = slot.getIndex();
-        return unsafeGetObject(getLocals(), OBJECT_BASE_OFFSET + slotIndex * OBJECT_INDEX_SCALE, this.getTags()[slotIndex] == FrameSlotKind.Object.ordinal(), slot);
+        return unsafeGetObject(getLocals(), Unsafe.ARRAY_OBJECT_BASE_OFFSET + slotIndex * (long) Unsafe.ARRAY_OBJECT_INDEX_SCALE, this.getTags()[slotIndex] == FrameSlotKind.Object.ordinal(), slot);
     }
 
     @Override
@@ -99,7 +94,7 @@
     }
 
     private void setObjectUnsafe(FrameSlot slot, Object value) {
-        unsafePutObject(getLocals(), OBJECT_BASE_OFFSET + slot.getIndex() * OBJECT_INDEX_SCALE, value, slot);
+        unsafePutObject(getLocals(), Unsafe.ARRAY_OBJECT_BASE_OFFSET + slot.getIndex() * (long) Unsafe.ARRAY_OBJECT_INDEX_SCALE, value, slot);
     }
 
     @Override
@@ -272,11 +267,11 @@
     }
 
     private static long alignPrimitive(FrameSlot slot, Kind forKind) {
-        long offset = PRIMITIVE_BASE_OFFSET + slot.getIndex() * PRIMITIVE_INDEX_SCALE;
+        long offset = Unsafe.ARRAY_LONG_BASE_OFFSET + slot.getIndex() * (long) Unsafe.ARRAY_LONG_INDEX_SCALE;
         if (ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN) {
             // On big endian, we use int in long type, which means, when byteCount() <=4, the value
             // is right aligned in the 4 byte half, which has the lower address.
-            offset += Kind.Long.getByteCount() - Math.min(PRIMITIVE_INDEX_SCALE, 4 + forKind.getByteCount());
+            offset += Kind.Long.getByteCount() - Math.min((long) Unsafe.ARRAY_LONG_INDEX_SCALE, 4 + forKind.getByteCount());
         }
         return offset;
     }
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/GraalTruffleRuntime.java	Tue Jan 27 16:58:48 2015 +0100
@@ -41,6 +41,8 @@
 
 public abstract class GraalTruffleRuntime implements TruffleRuntime {
 
+    public static TruffleRuntime alternateRuntime;
+
     private ArrayList<String> includes;
     private ArrayList<String> excludes;
 
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/PartialEvaluator.java	Tue Jan 27 16:58:48 2015 +0100
@@ -30,12 +30,11 @@
 import com.oracle.graal.api.code.*;
 import com.oracle.graal.api.meta.*;
 import com.oracle.graal.api.replacements.*;
-import com.oracle.graal.api.runtime.*;
 import com.oracle.graal.debug.*;
 import com.oracle.graal.debug.Debug.Scope;
 import com.oracle.graal.debug.internal.*;
+import com.oracle.graal.graph.Graph.Mark;
 import com.oracle.graal.graph.*;
-import com.oracle.graal.graph.Graph.Mark;
 import com.oracle.graal.graph.Node;
 import com.oracle.graal.loop.*;
 import com.oracle.graal.nodes.CallTargetNode.InvokeKind;
@@ -73,10 +72,10 @@
     private final ResolvedJavaMethod callDirectMethod;
     private final ResolvedJavaMethod callSiteProxyMethod;
 
-    public PartialEvaluator(Providers providers, TruffleCache truffleCache) {
+    public PartialEvaluator(Providers providers, TruffleCache truffleCache, SnippetReflectionProvider snippetReflection) {
         this.providers = providers;
         this.canonicalizer = new CanonicalizerPhase(!ImmutableCode.getValue());
-        this.snippetReflection = Graal.getRequiredCapability(SnippetReflectionProvider.class);
+        this.snippetReflection = snippetReflection;
         this.truffleCache = truffleCache;
         this.callDirectMethod = providers.getMetaAccess().lookupJavaMethod(OptimizedCallTarget.getCallDirectMethod());
         this.callSiteProxyMethod = providers.getMetaAccess().lookupJavaMethod(GraalFrameInstance.CallNodeFrame.METHOD);
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCacheImpl.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCacheImpl.java	Tue Jan 27 16:58:48 2015 +0100
@@ -68,8 +68,8 @@
     private final ResolvedJavaType errorClass;
     private final ResolvedJavaType controlFlowExceptionClass;
 
-    private final ResolvedJavaMethod callRootMethod;
-    private final ResolvedJavaMethod callInlinedMethod;
+    protected final ResolvedJavaMethod callRootMethod;
+    protected final ResolvedJavaMethod callInlinedMethod;
 
     private long counter;
 
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleCompilerImpl.java	Tue Jan 27 16:58:48 2015 +0100
@@ -31,6 +31,7 @@
 import com.oracle.graal.api.code.Assumptions.Assumption;
 import com.oracle.graal.api.code.CallingConvention.Type;
 import com.oracle.graal.api.meta.*;
+import com.oracle.graal.api.replacements.*;
 import com.oracle.graal.api.runtime.*;
 import com.oracle.graal.compiler.target.*;
 import com.oracle.graal.debug.*;
@@ -85,7 +86,7 @@
         this.config = GraphBuilderConfiguration.getDefault().withSkippedExceptionTypes(skippedExceptionTypes);
         this.truffleCache = new TruffleCacheImpl(providers, eagerConfig, config, TruffleCompilerImpl.Optimizations);
 
-        this.partialEvaluator = new PartialEvaluator(providers, truffleCache);
+        this.partialEvaluator = new PartialEvaluator(providers, truffleCache, Graal.getRequiredCapability(SnippetReflectionProvider.class));
 
         if (Debug.isEnabled()) {
             DebugEnvironment.initialize(System.out);
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleDebugJavaMethod.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/TruffleDebugJavaMethod.java	Tue Jan 27 16:58:48 2015 +0100
@@ -22,6 +22,8 @@
  */
 package com.oracle.graal.truffle;
 
+import java.util.concurrent.atomic.*;
+
 import com.oracle.graal.api.meta.*;
 import com.oracle.graal.debug.*;
 import com.oracle.truffle.api.*;
@@ -31,6 +33,8 @@
  * {@linkplain Debug#scope(Object) debug scopes}.
  */
 public class TruffleDebugJavaMethod implements JavaMethod {
+    private static final AtomicInteger nextId = new AtomicInteger();
+    private final int id;
     private final RootCallTarget compilable;
 
     private static final JavaType declaringClass = new JavaType() {
@@ -86,6 +90,7 @@
 
     public TruffleDebugJavaMethod(RootCallTarget compilable) {
         this.compilable = compilable;
+        this.id = nextId.incrementAndGet();
     }
 
     @Override
@@ -107,7 +112,7 @@
     }
 
     public String getName() {
-        return compilable.toString().replace('.', '_').replace(' ', '_');
+        return compilable.toString().replace('.', '_').replace(' ', '_') + "_" + id;
     }
 
     public JavaType getDeclaringClass() {
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/Truffle.java	Tue Jan 27 16:58:48 2015 +0100
@@ -49,6 +49,14 @@
     }
 
     private static TruffleRuntime initRuntime() {
+        if (TruffleOptions.ForceInterpreter) {
+            /*
+             * Force Truffle to run in interpreter mode even if we have a specialized implementation
+             * of TruffleRuntime available.
+             */
+            return new DefaultTruffleRuntime();
+        }
+
         try {
             return AccessController.doPrivileged(new PrivilegedAction<TruffleRuntime>() {
                 public TruffleRuntime run() {
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleOptions.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleOptions.java	Tue Jan 27 16:58:48 2015 +0100
@@ -34,6 +34,13 @@
 public class TruffleOptions {
 
     /**
+     * Force truffle to run in interpreter mode.
+     * <p>
+     * Can be set with {@code -Dtruffle.ForceInterpreter=true}.
+     */
+    public static boolean ForceInterpreter = Boolean.getBoolean("truffle.ForceInterpreter");
+
+    /**
      * Enables/disables the rewriting of traces in the Truffle runtime to stdout.
      * <p>
      * Can be set with {@code -Dtruffle.TraceRewrites=true}.
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/DefaultTruffleRuntime.java	Tue Jan 27 16:58:48 2015 +0100
@@ -44,9 +44,6 @@
     private final Map<RootCallTarget, Void> callTargets = Collections.synchronizedMap(new WeakHashMap<RootCallTarget, Void>());
 
     public DefaultTruffleRuntime() {
-        if (Truffle.getRuntime() != null) {
-            throw new IllegalArgumentException("Cannot instantiate DefaultTruffleRuntime. Use Truffle.getRuntime() instead.");
-        }
     }
 
     @Override
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLMain.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/SLMain.java	Tue Jan 27 16:58:48 2015 +0100
@@ -140,7 +140,7 @@
      * Parse and run the specified SL source. Factored out in a separate method so that it can also
      * be used by the unit test harness.
      */
-    public static void run(SLContext context, Source source, PrintStream logOutput, int repeats) {
+    public static long run(SLContext context, Source source, PrintStream logOutput, int repeats) {
         if (logOutput != null) {
             logOutput.println("== running on " + Truffle.getRuntime().getName());
             // logOutput.println("Source = " + source.getCode());
@@ -163,6 +163,7 @@
         boolean dumpASTToIGV = false;
 
         printScript("before execution", context, logOutput, printASTToLog, printSourceAttributionToLog, dumpASTToIGV);
+        long totalRuntime = 0;
         try {
             for (int i = 0; i < repeats; i++) {
                 long start = System.nanoTime();
@@ -176,6 +177,7 @@
                     context.getOutput().println(formatTypeError(ex));
                 }
                 long end = System.nanoTime();
+                totalRuntime += end - start;
 
                 if (logOutput != null && repeats > 1) {
                     logOutput.println("== iteration " + (i + 1) + ": " + ((end - start) / 1000000) + " ms");
@@ -185,7 +187,7 @@
         } finally {
             printScript("after execution", context, logOutput, printASTToLog, printSourceAttributionToLog, dumpASTToIGV);
         }
-        return;
+        return totalRuntime;
     }
 
     /**
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Parser.frame	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Parser.frame	Tue Jan 27 16:58:48 2015 +0100
@@ -39,8 +39,8 @@
 // @formatter:off
 public class Parser {
 -->constants
-    static final boolean T = true;
-    static final boolean x = false;
+    static final boolean _T = true;
+    static final boolean _x = false;
     static final int minErrDist = 2;
 
     public Token t; // last recognized token
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Parser.java	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/Parser.java	Tue Jan 27 16:58:48 2015 +0100
@@ -41,8 +41,8 @@
 	public static final int _numericLiteral = 3;
 	public static final int maxT = 31;
 
-    static final boolean T = true;
-    static final boolean x = false;
+    static final boolean _T = true;
+    static final boolean _x = false;
     static final int minErrDist = 2;
 
     public Token t; // last recognized token
@@ -345,10 +345,11 @@
 		result = null;
 		if (la.kind == 1) {
 			Get();
-			result = factory.createRead(t);
 			if (la.kind == 5 || la.kind == 29 || la.kind == 30) {
-				result = MemberExpression(result, null, t);
-			}
+				result = MemberExpression(null, null, t);
+			} else if (StartOf(4)) {
+				result = factory.createRead(t);
+			} else SynErr(33);
 		} else if (la.kind == 2) {
 			Get();
 			result = factory.createStringLiteral(t);
@@ -363,18 +364,22 @@
 			Expect(7);
 			int length = (t.charPos + t.val.length()) - start;
 			result = factory.createParenExpression(expr, start, length);
-		} else SynErr(33);
+		} else SynErr(34);
 		return result;
 	}
 
-	SLExpressionNode  MemberExpression(SLExpressionNode receiver, SLExpressionNode assignmentReceiver, Token assignmentName) {
+	SLExpressionNode  MemberExpression(SLExpressionNode r, SLExpressionNode assignmentReceiver, Token assignmentName) {
 		SLExpressionNode  result;
 		result = null;
+		SLExpressionNode receiver = r;
 		Token nestedAssignmentName = null;
 		if (la.kind == 5) {
 			Get();
 			List<SLExpressionNode> parameters = new ArrayList<>();
 			SLExpressionNode parameter;
+			if (receiver == null) {
+			   receiver = factory.createRead(assignmentName);
+			}
 			if (StartOf(2)) {
 				parameter = Expression();
 				parameters.add(parameter);
@@ -399,10 +404,13 @@
 			}
 		} else if (la.kind == 30) {
 			Get();
+			if (receiver == null) {
+			   receiver = factory.createRead(assignmentName);
+			}
 			Expect(1);
 			result = factory.createReadProperty(receiver, t);
 			nestedAssignmentName = t;
-		} else SynErr(34);
+		} else SynErr(35);
 		if (la.kind == 5 || la.kind == 29 || la.kind == 30) {
 			result = MemberExpression(result, receiver, nestedAssignmentName);
 		}
@@ -421,10 +429,11 @@
     }
 
     private static final boolean[][] set = {
-		{T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x},
-		{x,T,T,T, x,T,x,x, x,x,T,x, T,T,T,x, T,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x},
-		{x,T,T,T, x,T,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x},
-		{x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,x, x,x,x,T, T,T,T,T, T,x,x,x, x,x,x,x, x}
+		{_T,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x},
+		{_x,_T,_T,_T, _x,_T,_x,_x, _x,_x,_T,_x, _T,_T,_T,_x, _T,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x},
+		{_x,_T,_T,_T, _x,_T,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x},
+		{_x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_x, _x,_x,_x,_T, _T,_T,_T,_T, _T,_x,_x,_x, _x,_x,_x,_x, _x},
+		{_x,_x,_x,_x, _x,_T,_T,_T, _x,_x,_x,_T, _x,_x,_x,_x, _x,_T,_T,_T, _T,_T,_T,_T, _T,_T,_T,_T, _T,_T,_T,_x, _x}
 
     };
 
@@ -501,7 +510,8 @@
 			case 31: s = "??? expected"; break;
 			case 32: s = "invalid Statement"; break;
 			case 33: s = "invalid Factor"; break;
-			case 34: s = "invalid MemberExpression"; break;
+			case 34: s = "invalid Factor"; break;
+			case 35: s = "invalid MemberExpression"; break;
             default:
                 s = "error " + n;
                 break;
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/SimpleLanguage.atg	Tue Jan 27 16:56:10 2015 +0100
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/parser/SimpleLanguage.atg	Tue Jan 27 16:58:48 2015 +0100
@@ -202,10 +202,12 @@
 Factor<out SLExpressionNode result>
 =                                               (. result = null; .)
 (
-    identifier                                  (. result = factory.createRead(t); .)
-    [
-        MemberExpression<out result, result, null, t>
-    ]
+    identifier
+    (
+        MemberExpression<out result, null, null, t>
+    |
+                                                (. result = factory.createRead(t); .)
+    )
 |
     stringLiteral                               (. result = factory.createStringLiteral(t); .)
 |
@@ -219,12 +221,16 @@
 .
 
 
-MemberExpression<out SLExpressionNode result, SLExpressionNode receiver, SLExpressionNode assignmentReceiver, Token assignmentName>
+MemberExpression<out SLExpressionNode result, SLExpressionNode r, SLExpressionNode assignmentReceiver, Token assignmentName>
 =                                               (. result = null;
+                                                   SLExpressionNode receiver = r;
                                                    Token nestedAssignmentName = null; .)
 (
     "("                                         (. List<SLExpressionNode> parameters = new ArrayList<>();
-                                                   SLExpressionNode parameter; .)
+                                                   SLExpressionNode parameter;
+                                                   if (receiver == null) {
+                                                       receiver = factory.createRead(assignmentName); 
+                                                   } .)
     [
         Expression<out parameter>               (. parameters.add(parameter); .)
         {
@@ -244,7 +250,9 @@
                                                        result = factory.createWriteProperty(assignmentReceiver, assignmentName, value);
                                                    } .)
 |
-    "."
+    "."                                         (. if (receiver == null) {
+                                                       receiver = factory.createRead(assignmentName); 
+                                                   } .)
     identifier
                                                 (. result = factory.createReadProperty(receiver, t); .)
                                                 (. nestedAssignmentName = t; .)
--- a/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Tue Jan 27 16:56:10 2015 +0100
+++ b/src/cpu/x86/vm/sharedRuntime_x86_32.cpp	Tue Jan 27 16:58:48 2015 +0100
@@ -717,7 +717,7 @@
                                     const BasicType *sig_bt,
                                     const VMRegPair *regs
                                     int frame_extension_argument) {
-  assert(frame_extension_arguments == -1, "unsupported");
+  assert(frame_extension_argument == -1, "unsupported");
 
   // Note: rsi contains the senderSP on entry. We must preserve it since
   // we may do a i2c -> c2i transition if we lose a race where compiled
--- a/src/share/vm/graal/graalRuntime.cpp	Tue Jan 27 16:56:10 2015 +0100
+++ b/src/share/vm/graal/graalRuntime.cpp	Tue Jan 27 16:58:48 2015 +0100
@@ -684,7 +684,7 @@
   KlassHandle klass = GraalRuntime::resolve_or_fail(name, CHECK_NULL);
 
   TempNewSymbol makeInstance = SymbolTable::new_symbol("makeInstance", CHECK_NULL);
-  TempNewSymbol sig = SymbolTable::new_symbol("()Lcom/oracle/graal/truffle/hotspot/HotSpotTruffleRuntime;", CHECK_NULL);
+  TempNewSymbol sig = SymbolTable::new_symbol("()Lcom/oracle/truffle/api/TruffleRuntime;", CHECK_NULL);
   JavaValue result(T_OBJECT);
   JavaCalls::call_static(&result, klass, makeInstance, sig, CHECK_NULL);
   return JNIHandles::make_local((oop) result.get_jobject());