Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.api/src/com/oracle/truffle/api/SourceSection.java @ 16064:03eda0a202e9
Better fix for prefix byte for AMD64 byte instructions
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Fri, 06 Jun 2014 11:06:42 -0700 |
parents | 2d63ce48d222 |
children |
rev | line source |
---|---|
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
13564
35f637594acc
Truffle: refinements in the management of source information: a new marker interface for empty SourceSections and fix a bug that kept modified source files from being reloaded.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
13455
diff
changeset
|
2 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
11279
494b818b527c
Adding "Classpath" exception to the classes in the com.oracle.truffle.api and the com.oracle.truffle.api.dsl package.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9989
diff
changeset
|
7 * published by the Free Software Foundation. Oracle designates this |
494b818b527c
Adding "Classpath" exception to the classes in the com.oracle.truffle.api and the com.oracle.truffle.api.dsl package.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9989
diff
changeset
|
8 * particular file as subject to the "Classpath" exception as provided |
494b818b527c
Adding "Classpath" exception to the classes in the com.oracle.truffle.api and the com.oracle.truffle.api.dsl package.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9989
diff
changeset
|
9 * by Oracle in the LICENSE file that accompanied this code. |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * This code is distributed in the hope that it will be useful, but WITHOUT |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * version 2 for more details (a copy is included in the LICENSE file that |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * accompanied this code). |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * You should have received a copy of the GNU General Public License version |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * 2 along with this work; if not, write to the Free Software Foundation, |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 * or visit www.oracle.com if you need additional information or have any |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 * questions. |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 */ |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 package com.oracle.truffle.api; |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
26 |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 /** |
15630
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
28 * Description of contiguous section of text within a {@link Source} of program code. |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
29 * |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
30 * The starting location of the section can be described using two different coordinates: |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
31 * <ul> |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
32 * <li>{@code (startLine, startColumn)}: rows and columns are 1-based, so the first character in a |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
33 * source file is at position {@code (1,1)}. {@code Tab} characters are counted as occupying one |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
34 * column.</li> |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
35 * <li><b>character index</b>: 0-based offset of the character from the beginning of the source, so |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
36 * the first character in a file is at index {@code 0}.</li> |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
37 * </ul> |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
38 * The {@code Newline} that terminates each line counts as a single character for the purpose of a |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
39 * character index and when counting the length of text. The {@code (line,column)} coordinates of a |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
40 * {@code Newline} should never appear in a text section. |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
41 * <p> |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
42 * If the final character of source is not a {@code Newline}, the final characters of the text are |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
43 * still considered to be a line ("unterminated"). |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
44 * <p> |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
45 * |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
46 * @see Source#createSection(String, int, int, int, int) |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
47 * @see Source#createSection(String, int, int, int) |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
48 * @see Source#createSection(String, int, int) |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
49 */ |
11610
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
50 public interface SourceSection { |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
51 |
15630
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
52 // TODO support alternate text representations/encodings |
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
53 |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
54 /** |
15630
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
55 * Representation of the source program that contains this section. |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
56 * |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
57 * @return the source object |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 */ |
11610
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
59 Source getSource(); |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
60 |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 /** |
15630
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
62 * Returns 1-based line number of the first character in this section (inclusive). |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
63 * |
9989
b9b8af46c2b7
Upgrade the documentation for SourceSection, especially with respect to the specification of text locations.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
9822
diff
changeset
|
64 * @return the starting line number |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 */ |
11610
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
66 int getStartLine(); |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
67 |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 /** |
15630
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
69 * Returns the 1-based column number of the first character in this section (inclusive). |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
70 * |
9989
b9b8af46c2b7
Upgrade the documentation for SourceSection, especially with respect to the specification of text locations.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
9822
diff
changeset
|
71 * @return the starting column number |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
72 */ |
11610
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
73 int getStartColumn(); |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
74 |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
75 /** |
15630
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
76 * Returns the 0-based index of the first character in this section. |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
77 * |
9989
b9b8af46c2b7
Upgrade the documentation for SourceSection, especially with respect to the specification of text locations.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
9822
diff
changeset
|
78 * @return the starting character index |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
79 */ |
11610
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
80 int getCharIndex(); |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
81 |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
82 /** |
15630
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
83 * Returns the length of this section in characters. |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
84 * |
9989
b9b8af46c2b7
Upgrade the documentation for SourceSection, especially with respect to the specification of text locations.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
9822
diff
changeset
|
85 * @return the number of characters in the section |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
86 */ |
11610
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
87 int getCharLength(); |
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
88 |
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
89 /** |
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
90 * Returns the index of the text position immediately following the last character in the |
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
91 * section. |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
92 * |
11610
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
93 * @return the end position of the section |
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
94 */ |
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
95 int getCharEndIndex(); |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
96 |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
97 /** |
15630
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
98 * Returns terse text describing this source section, typically used for printing the section. |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
99 * |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
100 * @return the identifier of the section |
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
101 */ |
11610
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
102 String getIdentifier(); |
9284
5054a206fcf0
Remove endLine and endIndex from SourceSection class and add charIndex and charLength instead. Also add getCode() method.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9254
diff
changeset
|
103 |
5054a206fcf0
Remove endLine and endIndex from SourceSection class and add charIndex and charLength instead. Also add getCode() method.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9254
diff
changeset
|
104 /** |
15630
2d63ce48d222
Truffle/Source Attribution: Replace direct creation of SourceSection objects with factory methods on Source; two of these greatly simplify source attribution by automatically computing either the row/column start location from a character offset or vice versa, depending on what?s made available from the parser. Minor API change on Visualizer.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15371
diff
changeset
|
105 * Returns text described by this section. |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
106 * |
9284
5054a206fcf0
Remove endLine and endIndex from SourceSection class and add charIndex and charLength instead. Also add getCode() method.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9254
diff
changeset
|
107 * @return the code as a String object |
5054a206fcf0
Remove endLine and endIndex from SourceSection class and add charIndex and charLength instead. Also add getCode() method.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
9254
diff
changeset
|
108 */ |
11610
5f532ea846fb
applied changes to basic-graal that were made in a downstream repo
Doug Simon <doug.simon@oracle.com>
parents:
11279
diff
changeset
|
109 String getCode(); |
9822
e210293dca77
Generated hashCode and equals for SourceSection. Source is abstract, so just uses identity methods for that.
Chris Seaton <chris.seaton@oracle.com>
parents:
9775
diff
changeset
|
110 |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
111 /** |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
112 * Returns a short description of the source section, using just the file name, rather than its |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
113 * full path. |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
114 * |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
115 * @return a short description of the source section |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
116 */ |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
117 String getShortDescription(); |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
118 |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
119 /** |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
120 * Singleton instance with no content. |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
121 */ |
13564
35f637594acc
Truffle: refinements in the management of source information: a new marker interface for empty SourceSections and fix a bug that kept modified source files from being reloaded.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
13455
diff
changeset
|
122 SourceSection NULL = new NullSourceSection() { |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
123 |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
124 @Override |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
125 public Source getSource() { |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
126 return null; |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
127 } |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
128 |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
129 @Override |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
130 public int getStartLine() { |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
131 return 0; |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
132 } |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
133 |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
134 @Override |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
135 public int getStartColumn() { |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
136 return 0; |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
137 } |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
138 |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
139 @Override |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
140 public int getCharIndex() { |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
141 return 0; |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
142 } |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
143 |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
144 @Override |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
145 public int getCharLength() { |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
146 return 0; |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
147 } |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
148 |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
149 @Override |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
150 public int getCharEndIndex() { |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
151 return 0; |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
152 } |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
153 |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
154 @Override |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
155 public String getIdentifier() { |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
156 return null; |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
157 } |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
158 |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
159 @Override |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
160 public String getCode() { |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
161 return null; |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
162 } |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
163 |
15371
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
164 @Override |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
165 public String getShortDescription() { |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
166 return "short"; |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
167 } |
c54f5fa05fd5
Truffle: add getShortName and getShortDescription to Source and SourceSection for when we don't need full paths.
Chris Seaton <chris.seaton@oracle.com>
parents:
13564
diff
changeset
|
168 |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
169 }; |
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.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
11610
diff
changeset
|
170 |
9254
4497235516df
New API for representing Source objects and SourceSection objects. SourceSection objects can be associated with Truffle interpreter nodes.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
171 } |