diff truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java @ 22003:5bc7f7b867ab

Making debugger always on for each TruffleVM execution. Introducing EventConsumer to process such debugger events. Requesting each RootNode to be associated with a TruffleLanguage, so debugger can find out proper context for each Node where executions gets suspended.
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Sat, 18 Jul 2015 18:03:36 +0200
parents 9c8c0937da41
children dc83cc1f94f2
line wrap: on
line diff
--- a/truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java	Thu Jul 16 19:11:31 2015 +0200
+++ b/truffle/com.oracle.truffle.api.dsl/src/com/oracle/truffle/api/dsl/Specialization.java	Sat Jul 18 18:03:36 2015 +0200
@@ -244,12 +244,9 @@
      * <b>Example usage:</b>
      *
      * <pre>
-     * static boolean acceptOperand(int operand) {
-     *     assert operand <= 42;
-     *     return operand & 1 == 1;
-     * }
-     * &#064;Specialization(guards = {"operand <= 42", "acceptOperand(operand)"})
-     * void doSpecialization(int operand) {...}
+     * static boolean acceptOperand(int operand) { assert operand <= 42; return operand & 1 ==
+     * 1; } &#064;Specialization(guards = {"operand <= 42", "acceptOperand(operand)"}) void
+     * doSpecialization(int operand) {...}
      * </pre>
      *
      * </p>
@@ -287,16 +284,11 @@
      * <b>Example usage:</b>
      *
      * <pre>
-     * static abstract class DynamicObject() {
-     *      abstract Shape getShape();
-     *      ...
-     * }
-     * static abstract class Shape() {
-     *      abstract Assumption getUnmodifiedAssuption();
-     *      ...
-     * }
-     * &#064;Specialization(guards = "operand.getShape() == cachedShape", assumptions = "cachedShape.getUnmodifiedAssumption()")
-     * void doAssumeUnmodifiedShape(DynamicObject operand, @Cached("operand.getShape()") Shape cachedShape) {...}
+     * static abstract class DynamicObject() { abstract Shape getShape(); ... } static
+     * abstract class Shape() { abstract Assumption getUnmodifiedAssuption(); ... }
+     * &#064;Specialization(guards = "operand.getShape() == cachedShape", assumptions =
+     * "cachedShape.getUnmodifiedAssumption()") void doAssumeUnmodifiedShape(DynamicObject
+     * operand, @Cached("operand.getShape()") Shape cachedShape) {...}
      * </pre>
      *
      * </p>
@@ -335,11 +327,10 @@
      * <b>Example usage:</b>
      *
      * <pre>
-     * static int getCacheLimit() {
-     *     return Integer.parseInt(System.getProperty("language.cacheLimit"));
-     * }
-     * &#064;Specialization(guards = "operand == cachedOperand", limit = "getCacheLimit()")
-     * void doCached(Object operand, @Cached("operand") Object cachedOperand) {...}
+     * static int getCacheLimit() { return
+     * Integer.parseInt(System.getProperty("language.cacheLimit")); } &#064;Specialization(guards =
+     * "operand == cachedOperand", limit = "getCacheLimit()") void doCached(Object
+     * operand, @Cached("operand") Object cachedOperand) {...}
      * </pre>
      *
      * </p>