Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeInfo.java @ 15775:4293efaaab76
Add description and language to the NodeInfo annotation
author | Christian Wirth <christian.wirth@oracle.com> |
---|---|
date | Mon, 19 May 2014 18:52:39 +0200 |
parents | 6681b9eb3f4c |
children |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeInfo.java Mon May 19 17:21:35 2014 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeInfo.java Mon May 19 18:52:39 2014 +0200 @@ -35,7 +35,7 @@ /** * Short name representing the node that can be used for debugging. - * + * * @return the short name */ String shortName() default ""; @@ -43,10 +43,26 @@ /** * Provides a rough estimate for the cost of the annotated {@link Node}. This estimate can be * used by runtime systems or guest languages to implement heuristics based on Truffle ASTs. - * + * * @see Node#getCost() * @see NodeCost */ NodeCost cost() default NodeCost.MONOMORPHIC; + /** + * A human readable explanation of the purpose of the annotated {@link Node}. Can be used e.g. + * for debugging or visualization purposes. + * + * @return the description + */ + String description() default ""; + + /** + * A description, providing a user-readable explanation of the source language of the annotated + * {@link Node}. Can be used e.g. for debugging or visualization purposes. Typically this + * information is set only in an abstract base node for the language implementation. + * + * @return the description + */ + String language() default ""; }