# HG changeset patch # User Michael Van De Vanter # Date 1442895789 25200 # Node ID df222c4e9bd975b60288250d4dea62f2a45ccdb3 # Parent e110ab9f91fef5d15cb2cd356167b380c266fc8e Truffle/Instrumentaion: minor cleanup: Javadoc, an Instrumenter method is no longer public diff -r e110ab9f91fe -r df222c4e9bd9 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java Mon Sep 21 21:21:29 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/impl/Accessor.java Mon Sep 21 21:23:09 2015 -0700 @@ -215,6 +215,9 @@ throw new UnsupportedOperationException(); } + /** + * Provided by each {@linkplain TruffleLanguage language implementation}. + */ protected boolean isInstrumentable(Object vm, Node node) { final RootNode rootNode = node.getRootNode(); Class languageClazz = findLanguage(rootNode); @@ -226,6 +229,9 @@ return API.isInstrumentable(node, language); } + /** + * Provided by each {@linkplain TruffleLanguage language implementation}. + */ protected WrapperNode createWrapperNode(Object vm, Node node) { final RootNode rootNode = node.getRootNode(); Class languageClazz = findLanguage(rootNode); @@ -237,6 +243,9 @@ return API.createWrapperNode(node, language); } + /** + * Provided by each {@linkplain TruffleLanguage language implementation}. + */ protected ASTProber getDefaultASTProber(TruffleLanguage language) { return API.getDefaultASTProber(language); } diff -r e110ab9f91fe -r df222c4e9bd9 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrumenter.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrumenter.java Mon Sep 21 21:21:29 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrumenter.java Mon Sep 21 21:23:09 2015 -0700 @@ -84,15 +84,14 @@ } /** - * {@linkplain Instrument Instrumentation}-based tools that gather data during Guest Language + * {@linkplain Instrument Instrumentation}-based collectors of data during Guest Language * program execution. *

* Tools share a common life cycle: *

- * Note:
- * Tool installation is currently global to the Truffle Execution environment. When - * language-agnostic management of individual execution environments is added to the platform, - * installation will be (optionally) specific to a single execution environment. */ public abstract static class Tool> { // TODO (mlvdv) still thinking about the most appropriate name for this class of tools @@ -288,21 +283,6 @@ } /** - * For AST nodes that are {@linkplain #isInstrumentable() instrumentable}, returns a - * wrapper node that: - *
    - *
  1. implements {@link WrapperNode}
  2. - *
  3. has the node as its single child, and
  4. - *
  5. whose type is safe for replacement of the node in the parent.
  6. - *
- * - * @return an appropriately typed {@link WrapperNode} - */ - public WrapperNode createWrapperNode(Node node) { - return ACCESSOR.createWrapperNode(vm, node); - } - - /** * Prepares an AST node for {@linkplain Instrument instrumentation}, where the node is presumed * to be part of a well-formed Truffle AST that has not yet been executed. *

@@ -560,6 +540,10 @@ void executionEnded() { } + WrapperNode createWrapperNode(Node node) { + return ACCESSOR.createWrapperNode(vm, node); + } + void tagAdded(Probe probe, SyntaxTag tag, Object tagValue) { for (ProbeListener listener : probeListeners) { listener.probeTaggedAs(probe, tag, tagValue);