Mercurial > hg > graal-jvmci-8
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/SourceSection.java @ 13455:69d2e4baa215
Truffle: new infrastructure related to instrumentation, and in particular debugging: support for managing Source objects; framework for generalized "instrumentation proxy nodes" (to be inserted into ASTs with no runtime cost when inactive), and "probes" (which can be attached to proxy nodes to receive event notification); a rudimentary interface and abstract implementation for a "debug manager" (mostly a placeholder at this point); and the beginning of a language-agnostic ExecutionContext interface.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Tue, 17 Dec 2013 20:22:45 -0800 |
parents | 5f532ea846fb |
children | 35f637594acc |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/SourceSection.java Thu Dec 12 14:56:52 2013 -0800 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/SourceSection.java Tue Dec 17 20:22:45 2013 -0800 @@ -92,4 +92,44 @@ */ String getCode(); + /** + * Singleton instance with no content. + */ + SourceSection NULL = new SourceSection() { + + public Source getSource() { + return null; + } + + public int getStartLine() { + return 0; + } + + public int getStartColumn() { + return 0; + } + + public int getCharIndex() { + return 0; + } + + @Override + public int getCharLength() { + return 0; + } + + public int getCharEndIndex() { + return 0; + } + + public String getIdentifier() { + return null; + } + + public String getCode() { + return null; + } + + }; + }