Skip to content

Commit ece7af2

Browse files
committed
Merge pull request #19 in G/truffle from ~CHRISTIAN.HUMER_ORACLE.COM/truffle:pr/update-format-to-eclipse-45 to master
The Travis gate already uses already the new formatter and fails because of that. The new formatter changes comment formatting slightly, as well as whitespace handling in some corner cases. This patch is the result of running mx gate with ECLIPSE_EXE pointing to an Eclipse 4.5.2 Signed-off-by: Stefan Marr [email protected] * commit '3ae44b7d5fb30c7c7b7bd3668f335b982292a2b5': Use 4.5.2 instead of 4.5.1. Update hocon file to use 4.5.1 as Eclipse version. Update Truffle formatter to Eclipse 4.5.2
2 parents 3561239 + 3ae44b7 commit ece7af2

File tree

54 files changed

+290
-355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+290
-355
lines changed

ci.hocon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ java7 : {name : oraclejdk, version : "7", platformspecific: true}
22
java8 : {name : oraclejdk, version : "8u66", platformspecific: true}
33
#java9 : {name : oraclejdk, version : "9", platformspecific: true}
44
ecj : {name: ecj, version: "4.5.1", platformspecific: false}
5-
eclipse : {name: eclipse, version: "4.3.0", platformspecific: true}
5+
eclipse : {name: eclipse, version: "4.5.2", platformspecific: true}
66

77
common : {
88
packages : {

truffle/com.oracle.truffle.api.debug/src/com/oracle/truffle/api/debug/Debugger.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,8 @@ void prepareStepInto(int stepCount) {
288288
* <li>User breakpoints are enabled.</li>
289289
* <li>Execution will continue until either:
290290
* <ol>
291-
* <li>execution arrives at the nearest enclosing call site on the stack, <strong>or</strong></li>
291+
* <li>execution arrives at the nearest enclosing call site on the stack, <strong>or</strong>
292+
* </li>
292293
* <li>execution completes.</li>
293294
* </ol>
294295
* <li>StepOut mode persists only through one resumption, and reverts by default to Continue

truffle/com.oracle.truffle.api.debug/src/com/oracle/truffle/api/debug/SuspendedEvent.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ public void prepareContinue() {
143143
* <li>User breakpoints are disabled.</li>
144144
* <li>Execution will continue until either:
145145
* <ol>
146-
* <li>execution arrives at a node with the tag {@link Debugger#HALT_TAG}, <strong>or:</strong></li>
146+
* <li>execution arrives at a node with the tag {@link Debugger#HALT_TAG}, <strong>or:</strong>
147+
* </li>
147148
* <li>execution completes.</li>
148149
* </ol>
149150
* <li>StepInto mode persists only through one resumption (i.e. {@code stepIntoCount} steps),
@@ -165,7 +166,8 @@ public void prepareStepInto(int stepCount) {
165166
* <li>User breakpoints are enabled.</li>
166167
* <li>Execution will continue until either:
167168
* <ol>
168-
* <li>execution arrives at the nearest enclosing call site on the stack, <strong>or</strong></li>
169+
* <li>execution arrives at the nearest enclosing call site on the stack, <strong>or</strong>
170+
* </li>
169171
* <li>execution completes.</li>
170172
* </ol>
171173
* <li>StepOut mode persists only through one resumption, and reverts by default to Continue

truffle/com.oracle.truffle.api.debug/src/com/oracle/truffle/api/debug/package-info.java

Lines changed: 46 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,13 @@
3030
*/
3131

3232
/**
33-
* Control over {@link com.oracle.truffle.api.debug.Debugger debugging} of your {@link com.oracle.truffle.api.vm.PolyglotEngine}. Each {@link com.oracle.truffle.api.vm.PolyglotEngine}
34-
* is inherently capable to run in debugging mode - there is just one thing
35-
* to do - the {@link com.oracle.truffle.api.vm.PolyglotEngine.Builder creator of the virtual machine}
36-
* needs to turn debugging on when constructing its polyglot execution engine:
33+
* Control over {@link com.oracle.truffle.api.debug.Debugger debugging} of your
34+
* {@link com.oracle.truffle.api.vm.PolyglotEngine}. Each
35+
* {@link com.oracle.truffle.api.vm.PolyglotEngine} is inherently capable to run in debugging mode -
36+
* there is just one thing to do - the {@link com.oracle.truffle.api.vm.PolyglotEngine.Builder
37+
* creator of the virtual machine} needs to turn debugging on when constructing its polyglot
38+
* execution engine:
39+
*
3740
* <pre>
3841
* vm = {@link com.oracle.truffle.api.vm.PolyglotEngine#buildNew()}.
3942
* {@link com.oracle.truffle.api.vm.PolyglotEngine.Builder#onEvent(com.oracle.truffle.api.vm.EventConsumer) onEvent}(<b>new</b> {@link com.oracle.truffle.api.vm.EventConsumer EventConsumer}
@@ -49,59 +52,61 @@
4952
* }
5053
* }).{@link com.oracle.truffle.api.vm.PolyglotEngine.Builder#build() build()};
5154
* </pre>
52-
* The debugging is controlled by events emitted by the Truffle virtual machine
53-
* at important moments. The {@link com.oracle.truffle.api.debug.ExecutionEvent}
54-
* is sent when a call to {@link com.oracle.truffle.api.vm.PolyglotEngine#eval(com.oracle.truffle.api.source.Source)}
55-
* is made and allows one to configure {@link com.oracle.truffle.api.debug.Breakpoint breakpoints} and/or decide whether the
56-
* program should {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareStepInto() step-into} or
57-
* {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareContinue() just run}. Once the execution is suspended a
58-
* {@link com.oracle.truffle.api.debug.SuspendedEvent} is generated which
59-
* allows one to inspect the stack and choose the further execution mode
60-
* ({@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepInto(int) step-into}, {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepOver(int) step-over},
61-
* {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepOut() step-out}, {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareContinue() continue}).
55+
*
56+
* The debugging is controlled by events emitted by the Truffle virtual machine at important
57+
* moments. The {@link com.oracle.truffle.api.debug.ExecutionEvent} is sent when a call to
58+
* {@link com.oracle.truffle.api.vm.PolyglotEngine#eval(com.oracle.truffle.api.source.Source)} is
59+
* made and allows one to configure {@link com.oracle.truffle.api.debug.Breakpoint breakpoints}
60+
* and/or decide whether the program should
61+
* {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareStepInto() step-into} or
62+
* {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareContinue() just run}. Once the
63+
* execution is suspended a {@link com.oracle.truffle.api.debug.SuspendedEvent} is generated which
64+
* allows one to inspect the stack and choose the further execution mode (
65+
* {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepInto(int) step-into},
66+
* {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepOver(int) step-over},
67+
* {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareStepOut() step-out},
68+
* {@link com.oracle.truffle.api.debug.SuspendedEvent#prepareContinue() continue}).
6269
* <p>
63-
* The events methods are only available when the event is being delivered and
64-
* shouldn't be used anytime later. Both events however provide access to
65-
* {@link com.oracle.truffle.api.debug.Debugger} which can be kept and used
66-
* during whole existence of the {@link com.oracle.truffle.api.vm.PolyglotEngine}.
67-
* {@link com.oracle.truffle.api.debug.Debugger} is the central class that
68-
* keeps information about {@link com.oracle.truffle.api.debug.Debugger#getBreakpoints() registered breakpoints}
69-
* and allows one create new {@link com.oracle.truffle.api.debug.Breakpoint ones}.
70+
* The events methods are only available when the event is being delivered and shouldn't be used
71+
* anytime later. Both events however provide access to
72+
* {@link com.oracle.truffle.api.debug.Debugger} which can be kept and used during whole existence
73+
* of the {@link com.oracle.truffle.api.vm.PolyglotEngine}.
74+
* {@link com.oracle.truffle.api.debug.Debugger} is the central class that keeps information about
75+
* {@link com.oracle.truffle.api.debug.Debugger#getBreakpoints() registered breakpoints} and allows
76+
* one create new {@link com.oracle.truffle.api.debug.Breakpoint ones}.
7077
*
7178
* <h4>Turning on Stepping Mode</h4>
7279
*
7380
* In case you want your execution to pause on first statement, register for
74-
* {@link com.oracle.truffle.api.debug.ExecutionEvent} and once delivered
75-
* call {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareStepInto()}.
81+
* {@link com.oracle.truffle.api.debug.ExecutionEvent} and once delivered call
82+
* {@link com.oracle.truffle.api.debug.ExecutionEvent#prepareStepInto()}.
7683
*
7784
* <h4>Register a {@link com.oracle.truffle.api.debug.Breakpoint}</h4>
7885
*
7986
* Wait for execution to be started - which generates an
8087
* {@link com.oracle.truffle.api.debug.ExecutionEvent}. Use its
81-
* {@link com.oracle.truffle.api.debug.Debugger ev.getDebugger}()
82-
* methods to submit breakpoints.
88+
* {@link com.oracle.truffle.api.debug.Debugger ev.getDebugger}() methods to submit breakpoints.
8389
*
8490
* <h4>Enable Debugging for your Language</h4>
8591
*
86-
* The platform's core support for
87-
* {@link com.oracle.truffle.api.debug.Debugger debugging} is language-agnostic. A
88-
* {@link com.oracle.truffle.api.TruffleLanguage language implementation} enables debugging by supplying
89-
* extra information in every AST that configures debugger behavior for code written in that particular language.
92+
* The platform's core support for {@link com.oracle.truffle.api.debug.Debugger debugging} is
93+
* language-agnostic. A {@link com.oracle.truffle.api.TruffleLanguage language implementation}
94+
* enables debugging by supplying extra information in every AST that configures debugger behavior
95+
* for code written in that particular language.
9096
* <p>
9197
* This extra information is expressed as
92-
* {@linkplain com.oracle.truffle.api.source.SourceSection#withTags(java.lang.String...) tags}.
93-
* The language implementation applies tags to the
94-
* {@link com.oracle.truffle.api.source.SourceSection source information} associated with
95-
* {@link com.oracle.truffle.api.nodes.Node nodes} relevant to debugging.
96-
* At this time the debugger requries two tags for basic behavior; more tags may be required in the future
97-
* as the debugger acquires more functionality.
98+
* {@linkplain com.oracle.truffle.api.source.SourceSection#withTags(java.lang.String...) tags}. The
99+
* language implementation applies tags to the {@link com.oracle.truffle.api.source.SourceSection
100+
* source information} associated with {@link com.oracle.truffle.api.nodes.Node nodes} relevant to
101+
* debugging. At this time the debugger requries two tags for basic behavior; more tags may be
102+
* required in the future as the debugger acquires more functionality.
98103
* <ul>
99-
* <li>{@link com.oracle.truffle.api.debug.Debugger#HALT_TAG}: must be applied to every Node where the debugger
100-
* should halt during ordinary <em>stepping</em>. This typically corresponds to "statements" in each language.</li>
101-
* <li>{@link com.oracle.truffle.api.debug.Debugger#CALL_TAG}: must be applied to every Node where the debugger
102-
* should halt when either <em>returning</em> or <em>stepping out</em> from a call. This typically corresponds
103-
* to function/method calls in each language.</li>
104+
* <li>{@link com.oracle.truffle.api.debug.Debugger#HALT_TAG}: must be applied to every Node where
105+
* the debugger should halt during ordinary <em>stepping</em>. This typically corresponds to
106+
* "statements" in each language.</li>
107+
* <li>{@link com.oracle.truffle.api.debug.Debugger#CALL_TAG}: must be applied to every Node where
108+
* the debugger should halt when either <em>returning</em> or <em>stepping out</em> from a call.
109+
* This typically corresponds to function/method calls in each language.</li>
104110
* </ul>
105111
*/
106112
package com.oracle.truffle.api.debug;
107-

truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/CachedTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ public void testCachesOrder() {
366366
static class CachedError1 extends ValueNode {
367367
@Specialization
368368
static int do1(int value, @ExpectError("Incompatible return type int. The expression type must be equal to the parameter type double.")//
369-
@Cached("value") double cachedValue) {
369+
@Cached("value") double cachedValue) {
370370
return value;
371371
}
372372
}

truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/ExecuteMethodTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@
3535

3636
public class ExecuteMethodTest {
3737

38-
private static final String ERROR_NO_EXECUTE = "No accessible and overridable generic execute method found. Generic execute methods usually have the signature 'public abstract {Type} "
39-
+ "execute(VirtualFrame)' and must not throw any checked exceptions.";
38+
private static final String ERROR_NO_EXECUTE = "No accessible and overridable generic execute method found. Generic execute methods usually have the signature 'public abstract {Type} " +
39+
"execute(VirtualFrame)' and must not throw any checked exceptions.";
4040

4141
@TypeSystem({int.class})
4242
@DSLOptions

truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/NoTypeSystemTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,8 +261,8 @@ int s2(Object arg0) {
261261
}
262262
}
263263

264-
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. "
265-
+ "The following execute methods do not provide all evaluated values for the expected signature size 1: [execute()].")
264+
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. " +
265+
"The following execute methods do not provide all evaluated values for the expected signature size 1: [execute()].")
266266
abstract static class ErrorMissingNodeChild1 extends Node {
267267

268268
abstract int execute();
@@ -273,8 +273,8 @@ int s1(int arg0) {
273273
}
274274
}
275275

276-
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. "
277-
+ "The following execute methods do not provide all evaluated values for the expected signature size 2: [execute(int)].")
276+
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. " +
277+
"The following execute methods do not provide all evaluated values for the expected signature size 2: [execute(int)].")
278278
@NodeChild(type = DummyChild.class)
279279
abstract static class ErrorMissingNodeChild2 extends Node {
280280

@@ -286,8 +286,8 @@ int s1(int arg0, int arg1) {
286286
}
287287
}
288288

289-
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. "
290-
+ "The following execute methods do not provide all evaluated values for the expected signature size 1: [execute()].")
289+
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. " +
290+
"The following execute methods do not provide all evaluated values for the expected signature size 1: [execute()].")
291291
abstract static class ErrorMissingNodeChild3 extends Node {
292292

293293
abstract int execute();
@@ -314,8 +314,8 @@ int s1(int arg0) {
314314
}
315315

316316
@NodeChild(type = DummyChild.class)
317-
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. "
318-
+ "The following execute methods do not provide all evaluated values for the expected signature size 2: [execute(int)].")
317+
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. " +
318+
"The following execute methods do not provide all evaluated values for the expected signature size 2: [execute(int)].")
319319
abstract static class ErrorAdditionalNodeChild2 extends Node {
320320

321321
abstract int execute(int arg0);

truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/NodeChildTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ abstract static class Base2Node extends ValueNode {
7373

7474
}
7575

76-
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. "
77-
+ "The following execute methods do not provide all evaluated values for the expected signature size 3:%")
76+
@ExpectError("Not enough child node declarations found. Please annotate the node class with addtional @NodeChild annotations or remove all execute methods that do not provide all evaluated values. " +
77+
"The following execute methods do not provide all evaluated values for the expected signature size 3:%")
7878
@NodeChildren({@NodeChild(value = "child2", type = ValueNode.class)})
7979
abstract static class Child2Node extends Base1Node {
8080

truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/SpecializationFallthroughTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,8 @@ int do4(int a) {
366366
@NodeChildren({@NodeChild("a")})
367367
static class FallthroughExceptionType2 extends ValueNode {
368368

369-
@ExpectError("A checked exception 'java.lang.Throwable' is thrown but is not specified using the rewriteOn property. "
370-
+ "Checked exceptions that are not used for rewriting are not handled by the DSL. Use RuntimeExceptions for this purpose instead.")
369+
@ExpectError("A checked exception 'java.lang.Throwable' is thrown but is not specified using the rewriteOn property. " +
370+
"Checked exceptions that are not used for rewriting are not handled by the DSL. Use RuntimeExceptions for this purpose instead.")
371371
@Specialization
372372
int do4(int a) throws Throwable {
373373
return a;

truffle/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/examples/RubyCall.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public String toString() {
197197

198198
}
199199

200-
public static final class RubyClass /* this would extend RubyModule */{
200+
public static final class RubyClass /* this would extend RubyModule */ {
201201

202202
private final String name;
203203
private final RubyClass parent; // this would be a RubyModule

0 commit comments

Comments
 (0)