changeset 10445:f158703c308c

Merge.
author Christian Humer <christian.humer@gmail.com>
date Tue, 18 Jun 2013 10:12:27 +0200
parents ad48251630cd (diff) 25de9c96a032 (current diff)
children 746fa60be266
files graal/com.oracle.graal.compiler.test/src/com/oracle/graal/compiler/test/ea/PEAReadEliminationTest.java graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64DeoptimizeOp.java graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64TailcallOp.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrierPost.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrierPostStubCall.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrierPre.java graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/nodes/WriteBarrierPreStubCall.java graal/com.oracle.graal.nodes/src/com/oracle/graal/nodes/InlineableElement.java graal/com.oracle.graal.options/src/com/oracle/graal/options/OptionProvider.java graal/com.oracle.graal.phases.common/src/com/oracle/graal/phases/common/CullFrameStatesPhase.java graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/BlockState.java graal/com.oracle.graal.virtual/src/com/oracle/graal/virtual/phases/ea/PartialEscapeAnalysisPhase.java
diffstat 15 files changed, 66 insertions(+), 401 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64DeoptimizeOp.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.graal.hotspot.amd64/src/com/oracle/graal/hotspot/amd64/AMD64DeoptimizeOp.java	Tue Jun 18 10:12:27 2013 +0200
@@ -24,6 +24,7 @@
 
 import static com.oracle.graal.hotspot.HotSpotBackend.*;
 import static com.oracle.graal.hotspot.HotSpotGraalRuntime.*;
+import static com.oracle.graal.lir.LIRInstruction.*;
 
 import com.oracle.graal.api.code.*;
 import com.oracle.graal.api.meta.*;
--- a/graal/com.oracle.graal.service.processor/src/com/oracle/graal/service/processor/ServiceProviderProcessor.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.graal.service.processor/src/com/oracle/graal/service/processor/ServiceProviderProcessor.java	Tue Jun 18 10:12:27 2013 +0200
@@ -88,10 +88,10 @@
             return true;
         }
 
-        for (Element element : roundEnv.getElementsAnnotatedWith(ServiceProvider.class)) {
-            assert element.getKind().isClass();
-            processElement((TypeElement) element);
-        }
+// for (Element element : roundEnv.getElementsAnnotatedWith(ServiceProvider.class)) {
+// assert element.getKind().isClass();
+// processElement((TypeElement) element);
+// }
 
         return true;
     }
--- a/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/ExecuteChildren.java	Tue Jun 18 09:00:33 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2012, 2012, 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.truffle.api.codegen;
-
-import java.lang.annotation.*;
-
-@Retention(RetentionPolicy.CLASS)
-@Target({ElementType.TYPE})
-public @interface ExecuteChildren {
-
-    String[] value();
-
-}
--- a/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/ExtensionAnnotation.java	Tue Jun 18 09:00:33 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-/*
- * Copyright (c) 2012, 2012, 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.truffle.api.codegen;
-
-import java.lang.annotation.*;
-
-@Retention(RetentionPolicy.CLASS)
-@Target({ElementType.ANNOTATION_TYPE})
-public @interface ExtensionAnnotation {
-
-    String processorClassName();
-
-}
--- a/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/NodeChild.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/NodeChild.java	Tue Jun 18 10:12:27 2013 +0200
@@ -26,6 +26,10 @@
 
 import com.oracle.truffle.api.nodes.*;
 
+/**
+ * A {@link NodeChild} element defines an executable child for the enclosing {@link Node}. A
+ * {@link Node} contains multiple {@link NodeChildren} specified in linear execution order.
+ */
 @Retention(RetentionPolicy.CLASS)
 @Target({ElementType.TYPE})
 public @interface NodeChild {
@@ -35,13 +39,13 @@
     Class<?> type() default NodeClass.InheritNode.class;
 
     /**
-     * Executes the {@link NodeChild} with values from other defined {@link NodeChild} elements.
-     * These referenced children must be defined before the current node in the execution order. The
-     * current node {@link #type()} attribute must be set to a {@link Node} which supports the
-     * evaluated execution with the number of {@link #executeWith()} arguments that are defined. For
-     * example if this child is executed with one argument, the {@link #type()} attribute must
-     * define a node which publicly declares a method with the signature
-     * <code>Object execute*(VirtualFrame, Object)</code>.
+     * The {@link #executeWith()} property allows a node to pass the result of one child's
+     * executable as an input to another child's executable. These referenced children must be
+     * defined before the current node in the execution order. The current node {@link #type()}
+     * attribute must be set to a {@link Node} which supports the evaluated execution with the
+     * number of {@link #executeWith()} arguments that are defined. For example if this child is
+     * executed with one argument, the {@link #type()} attribute must define a node which publicly
+     * declares a method with the signature <code>Object execute*(VirtualFrame, Object)</code>.
      */
     String[] executeWith() default {};
 }
--- a/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/TypeSystem.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/TypeSystem.java	Tue Jun 18 10:12:27 2013 +0200
@@ -24,42 +24,56 @@
 
 import java.lang.annotation.*;
 
+import com.oracle.truffle.api.nodes.*;
+
 /**
  * <p>
- * Annotates a type system class that represents type information for a node. Generates code for
- * converting and managing types. Methods contained in the type system may be annotated with
- * {@link TypeCast} or {@link TypeCheck}. These methods alter the default behavior of the type
- * system.
+ * Each {@link Node} has one {@link TypeSystem} at its root to define the types that can be used
+ * throughout the system. Multiple {@link TypeSystem}s are allowed, but they cannot be mixed inside
+ * a single {@link Node} hierarchy. A {@link TypeSystem} defines a list of types as its child
+ * elements, in which every type precedes its super types.The latter condition ensures that the most
+ * concrete type is found first when searching the list sequentially for the type of a given generic
+ * value.
  * </p>
  * 
- * 
- * <b>Example:</b>
  * <p>
- * Shows a <code>@TypeSystem</code> definition with three types. In this example BigIntegers can be
- * also treated as integers if their bit width is less than 32.
+ * Each {@link #value()} is represented as a java type. A type can specify two annotations:
+ * {@link TypeCheck} and {@link TypeCast}. The {@link TypeCheck} checks whether a given generic
+ * value matches to the current type. The {@link TypeCast} casts a generic type value to the current
+ * type. If the {@link TypeCheck} and {@link TypeCast} annotations are not declared in the
+ * {@link TypeSystem} the a default implementation is provided. The default implementation of
+ * {@link TypeCheck} returns <code>true</code> only on an exact type match and {@link TypeCast} is
+ * only a cast to this type. Specified methods with {@link TypeCheck} and {@link TypeCast} may be
+ * used to extend the definition of a type in the language. In our example, the
+ * <code>isInteger</code> and <code>asInteger</code> methods are defined in a way so that they
+ * accept also {@link Integer} values, implicitly converting them to {@link Double} . This example
+ * points out how we express implicit type conversions.
  * </p>
  * 
+ * <p>
+ * <b>Example:</b> The {@link TypeSystem} contains the types {@link Boolean}, {@link Integer}, and
+ * {@link Double}. The type {@link Object} is always used implicitly as the generic type represent
+ * all values.
+ * 
  * <pre>
  * 
- * {@literal @}TypeSystem(types = {int.class, BigInteger.class, String.class}, nodeBaseClass = TypedNode.class)
- * public abstract class Types {
+ * {@literal @}TypeSystem(types = {boolean.class, int.class, double.class})
+ * public abstract class ExampleTypeSystem {
  * 
  *     {@literal @}TypeCheck
  *     public boolean isInteger(Object value) {
- *         return value instanceof Integer || (value instanceof BigInteger &amp;&amp; ((BigInteger) value).bitLength() &lt; Integer.SIZE);
+ *         return value instanceof Integer || value instanceof Double;
  *     }
  * 
  *     {@literal @}TypeCast
- *     public int asInteger(Object value) {
- *         if (value instanceof Integer) {
- *             return (int) value;
- *         } else {
- *             return ((BigInteger) value).intValue();
- *         }
+ *     public double asInteger(Object value) {
+ *         return ((Number)value).doubleValue();
  *     }
  * }
  * </pre>
  * 
+ * </p>
+ * 
  * @see TypeCast
  * @see TypeCheck
  */
@@ -68,8 +82,7 @@
 public @interface TypeSystem {
 
     /**
-     * Sets the types contained by this type system. The order of types also determines the order of
-     * specialization.
+     * The list of types as child elements of the {@link TypeSystem}. Each precedes its super type.
      */
     Class[] value();
 
--- a/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/TypeSystemReference.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.truffle.api.codegen/src/com/oracle/truffle/api/codegen/TypeSystemReference.java	Tue Jun 18 10:12:27 2013 +0200
@@ -24,10 +24,20 @@
 
 import java.lang.annotation.*;
 
+import com.oracle.truffle.api.nodes.*;
+
+/**
+ * References a {@link TypeSystem} on a node. Must be applied on a {@link Node} class. At least one
+ * {@link TypeSystem} must be referenced in a {@link Node}'s type hierarchy.
+ * 
+ * @see TypeSystem
+ * @see Node
+ */
 @Retention(RetentionPolicy.CLASS)
 @Target({ElementType.TYPE})
 public @interface TypeSystemReference {
 
+    /** The {@link TypeSystem} java type. */
     Class<?> value();
 
 }
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ext/ExtensionCodeElementFactory.java	Tue Jun 18 09:00:33 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 2012, 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.truffle.codegen.processor.ext;
-
-import javax.lang.model.element.*;
-import javax.lang.model.type.*;
-
-import com.oracle.truffle.codegen.processor.*;
-import com.oracle.truffle.codegen.processor.api.element.*;
-import com.oracle.truffle.codegen.processor.ast.*;
-
-final class ExtensionCodeElementFactory implements WritableElementFactory {
-
-    private final ProcessorContext context;
-
-    Element generatorElement;
-    AnnotationMirror generatorAnnotationMirror;
-
-    public ExtensionCodeElementFactory(ProcessorContext context) {
-        this.context = context;
-    }
-
-    @Override
-    public WritableExecutableElement cloneExecutableElement(ExecutableElement method) {
-        return updateGenerators(CodeExecutableElement.clone(context.getEnvironment(), method));
-    }
-
-    @Override
-    public WritableVariableElement cloneVariableElement(VariableElement var) {
-        return updateGenerators(CodeVariableElement.clone(var));
-    }
-
-    @Override
-    public WritableAnnotationMirror cloneAnnotationMirror(AnnotationMirror mirror) {
-        return CodeAnnotationMirror.clone(mirror);
-    }
-
-    @Override
-    public WritableVariableElement createParameter(TypeMirror type, String simpleName) {
-        return updateGenerators(new CodeVariableElement(Utils.modifiers(), type, simpleName));
-    }
-
-    @Override
-    public WritableExecutableElement createExecutableElement(TypeMirror returnType, String methodName) {
-        return updateGenerators(new CodeExecutableElement(returnType, methodName));
-    }
-
-    @Override
-    public TypeMirror createTypeMirror(Class<?> javaClass) {
-        return context.getType(javaClass);
-    }
-
-    @Override
-    public WritableAnnotationMirror createAnnotationMirror(DeclaredType typeMirror) {
-        return new CodeAnnotationMirror(typeMirror);
-    }
-
-    @Override
-    public Name createName(String name) {
-        return CodeNames.of(name);
-    }
-
-    @Override
-    public AnnotationValue createAnnotationValue(Object value) {
-        return new CodeAnnotationValue(value);
-    }
-
-    private <E extends GeneratedElement> E updateGenerators(E element) {
-        element.setGeneratorElement(generatorElement);
-        element.setGeneratorAnnotationMirror(generatorAnnotationMirror);
-        return element;
-    }
-
-}
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ext/ExtensionContextImpl.java	Tue Jun 18 09:00:33 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2012, 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.truffle.codegen.processor.ext;
-
-import java.util.*;
-
-import javax.annotation.processing.*;
-
-import com.oracle.truffle.codegen.processor.api.*;
-import com.oracle.truffle.codegen.processor.api.element.*;
-
-public class ExtensionContextImpl implements ExtensionContext {
-
-    private final ProcessingEnvironment env;
-    private final RoundEnvironment round;
-    private final WritableElementFactory factory;
-
-    private final List<WritableElement> elements = new ArrayList<>();
-
-    public ExtensionContextImpl(ProcessingEnvironment env, RoundEnvironment round, WritableElementFactory factory) {
-        this.env = env;
-        this.round = round;
-        this.factory = factory;
-    }
-
-    List<WritableElement> returnElements() {
-        List<WritableElement> returnElements = new ArrayList<>(this.elements);
-        this.elements.clear();
-        return returnElements;
-    }
-
-    @Override
-    public ProcessingEnvironment getProcessingEnvironment() {
-        return env;
-    }
-
-    @Override
-    public RoundEnvironment getRoundEnvironment() {
-        return round;
-    }
-
-    @Override
-    public WritableElementFactory getElementFactory() {
-        return factory;
-    }
-
-    @Override
-    public void addGeneratedElement(WritableElement element) {
-        elements.add(element);
-    }
-
-    @Override
-    public void removeGeneratedElement(WritableElement element) {
-        elements.remove(element);
-    }
-
-}
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/ext/ExtensionParser.java	Tue Jun 18 09:00:33 2013 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,118 +0,0 @@
-/*
- * Copyright (c) 2012, 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.truffle.codegen.processor.ext;
-
-import java.util.*;
-
-import javax.lang.model.element.*;
-import javax.lang.model.util.*;
-
-import com.oracle.truffle.api.codegen.*;
-import com.oracle.truffle.codegen.processor.*;
-import com.oracle.truffle.codegen.processor.api.*;
-import com.oracle.truffle.codegen.processor.api.element.*;
-import com.oracle.truffle.codegen.processor.template.*;
-
-public class ExtensionParser {
-
-    private final Map<String, ExtensionProcessor> extensions = new HashMap<>();
-    private final ProcessorContext context;
-    private final ExtensionCodeElementFactory factory;
-    private final ExtensionContextImpl extensionContext;
-
-    public ExtensionParser(ProcessorContext context) {
-        this.context = context;
-        this.factory = new ExtensionCodeElementFactory(context);
-        this.extensionContext = new ExtensionContextImpl(context.getEnvironment(), null, factory);
-    }
-
-    public List<WritableElement> parseAll(Template template, List<? extends Element> elements) {
-        List<WritableElement> generatedMethods = new ArrayList<>();
-        parseElement(template, generatedMethods, template.getTemplateType());
-
-        List<? extends ExecutableElement> methods = ElementFilter.methodsIn(elements);
-        for (ExecutableElement method : methods) {
-            for (VariableElement var : method.getParameters()) {
-                parseElement(template, generatedMethods, var);
-            }
-            parseElement(template, generatedMethods, method);
-        }
-
-        return generatedMethods;
-    }
-
-    private void parseElement(Template template, List<WritableElement> elements, Element element) {
-        List<? extends AnnotationMirror> mirrors = element.getAnnotationMirrors();
-        for (AnnotationMirror mirror : mirrors) {
-            ExtensionProcessor processor = findProcessor(template, mirror);
-            if (processor != null) {
-                try {
-                    factory.generatorAnnotationMirror = mirror;
-                    factory.generatorElement = element;
-                    processor.process(extensionContext, mirror, element);
-                    elements.addAll(extensionContext.returnElements());
-                } catch (Throwable e) {
-                    template.addError("Processor for '%s' failed with exception: \n\n%s.", Utils.getQualifiedName(mirror.getAnnotationType()), Utils.printException(e));
-                } finally {
-                    factory.generatorAnnotationMirror = null;
-                    factory.generatorElement = null;
-                }
-            }
-        }
-    }
-
-    private ExtensionProcessor findProcessor(Template template, AnnotationMirror mirror) {
-        String processorName = Utils.getQualifiedName(mirror.getAnnotationType());
-        ExtensionProcessor processor = null;
-        if (extensions.containsKey(processorName)) {
-            processor = extensions.get(processorName);
-        } else {
-            AnnotationMirror foundExtension = Utils.findAnnotationMirror(context.getEnvironment(), mirror.getAnnotationType().asElement(), ExtensionAnnotation.class);
-            if (foundExtension != null) {
-                String className = Utils.getAnnotationValue(String.class, foundExtension, "processorClassName");
-                Class<?> processorClass;
-                try {
-                    processorClass = Class.forName(className);
-                } catch (ClassNotFoundException e) {
-                    template.addError("Could not find processor class '%s' configured in '@%s'.", className, processorName);
-                    return null;
-                }
-                try {
-                    processor = (ExtensionProcessor) processorClass.newInstance();
-                } catch (InstantiationException e) {
-                    template.addError("Could not instantiate processor class '%s' configured in '@%s'.", className, processorName);
-                    return null;
-                } catch (IllegalAccessException e) {
-                    template.addError("Could not access processor class '%s' configured in '@%s'.", className, processorName);
-                    return null;
-                } catch (ClassCastException e) {
-                    template.addError("Processor class '%s' configured in '@%s' does not implement '%s'.", className, processorName, ExtensionProcessor.class.getName());
-                    return null;
-                }
-            }
-            extensions.put(processorName, processor);
-        }
-        return processor;
-    }
-
-}
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeParser.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/node/NodeParser.java	Tue Jun 18 10:12:27 2013 +0200
@@ -42,7 +42,7 @@
 public class NodeParser extends TemplateParser<NodeData> {
 
     public static final List<Class<? extends Annotation>> ANNOTATIONS = Arrays.asList(Generic.class, TypeSystemReference.class, ShortCircuit.class, Specialization.class, SpecializationListener.class,
-                    ExecuteChildren.class, NodeClass.class, NodeChild.class, NodeChildren.class, NodeId.class);
+                    NodeClass.class, NodeChild.class, NodeChildren.class, NodeId.class);
 
     private Map<String, NodeData> parsedNodes;
 
@@ -754,8 +754,12 @@
             }
 
             List<AnnotationMirror> children = Utils.collectAnnotations(context, nodeChildrenMirror, "value", type, NodeChild.class);
+            int index = 0;
             for (AnnotationMirror childMirror : children) {
                 String name = Utils.getAnnotationValue(String.class, childMirror, "value");
+                if (name.equals("")) {
+                    name = "child" + index;
+                }
 
                 Cardinality cardinality = Cardinality.ONE;
 
@@ -785,7 +789,9 @@
                 if (fieldNodeData == null) {
                     nodeChild.addError("Node type '%s' is invalid or not a valid Node.", Utils.getQualifiedName(childType));
                 }
+
             }
+            index++;
         }
 
         List<NodeChildData> filteredChildren = new ArrayList<>();
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/TemplateParser.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/template/TemplateParser.java	Tue Jun 18 10:12:27 2013 +0200
@@ -28,19 +28,11 @@
 import javax.lang.model.util.*;
 
 import com.oracle.truffle.codegen.processor.*;
-import com.oracle.truffle.codegen.processor.ext.*;
 
 public abstract class TemplateParser<M extends Template> extends AbstractParser<M> {
 
-    private final ExtensionParser extensionParser;
-
     public TemplateParser(ProcessorContext c) {
         super(c);
-        extensionParser = new ExtensionParser(c);
-    }
-
-    public ExtensionParser getExtensionParser() {
-        return extensionParser;
     }
 
     protected void verifyExclusiveMethodAnnotation(Template template, Class<?>... annotationTypes) {
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/typesystem/TypeSystemCodeGenerator.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/typesystem/TypeSystemCodeGenerator.java	Tue Jun 18 10:12:27 2013 +0200
@@ -103,8 +103,6 @@
                 }
             }
 
-            clazz.getEnclosedElements().addAll(typeSystem.getExtensionElements());
-
             return clazz;
         }
 
--- a/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/typesystem/TypeSystemParser.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.truffle.codegen.processor/src/com/oracle/truffle/codegen/processor/typesystem/TypeSystemParser.java	Tue Jun 18 10:12:27 2013 +0200
@@ -84,10 +84,6 @@
         verifyExclusiveMethodAnnotation(typeSystem, TypeCast.class, TypeCheck.class);
 
         List<Element> elements = new ArrayList<>(context.getEnvironment().getElementUtils().getAllMembers(templateType));
-        typeSystem.setExtensionElements(getExtensionParser().parseAll(typeSystem, elements));
-        if (typeSystem.getExtensionElements() != null) {
-            elements.addAll(typeSystem.getExtensionElements());
-        }
 
         List<TypeCastData> casts = new TypeCastParser(context, typeSystem).parse(elements);
         List<TypeCheckData> checks = new TypeCheckParser(context, typeSystem).parse(elements);
--- a/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/PrintNode.java	Tue Jun 18 09:00:33 2013 +0200
+++ b/graal/com.oracle.truffle.sl/src/com/oracle/truffle/sl/nodes/PrintNode.java	Tue Jun 18 10:12:27 2013 +0200
@@ -26,7 +26,7 @@
 
 import com.oracle.truffle.api.codegen.*;
 
-@NodeChild(value = "expression", type = TypedNode.class)
+@NodeChild(type = TypedNode.class)
 public abstract class PrintNode extends StatementNode {
 
     private final PrintStream output;