Skip to content

Commit 3fac53d

Browse files
committed
Adress reviewer comments.
1 parent a5c4631 commit 3fac53d

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

truffle/CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This changelog summarizes major changes between Truffle versions relevant to lan
2727
* GR-69649: Bytecode DSL now encodes primitive constant operands directly in the bytecode, reducing memory indirections in the interpreter. This optimization is enabled by default; you can configure it with `@GenerateBytecode(inlinePrimitiveConstants = true)`.
2828
* GR-68993: Added `HostCompilerDirectives.markThreadedSwitch(int)` to mark a switch statement within a loop as a candidate for threaded switch optimization.
2929
* GR-68993: Bytecode DSL: All bytecode interpreters are now using the threaded switch optimization by default. This new optimization can be configured using `@GenerateBytecode(enableThreadedSwitch=true|false)`.
30-
* GR-71030: Bytecode DSL now generates a new `MyBytecodeRootNodeGen.Bytecode` class that can be accessed via the `MyBytecodeRootNodeGen.BYTECODE` singleton. This class which extends the added `ByteccodeDescriptor` allows you to parse, serialize and deserialize bytecode nodes in addition to the already existing static methods in the generated code.
30+
* GR-71030: Bytecode DSL now generates a new `MyBytecodeRootNodeGen.Bytecode` class that can be accessed via the `MyBytecodeRootNodeGen.BYTECODE` singleton. This class which extends the added `BytecodeDescriptor` allows you to parse, serialize and deserialize bytecode nodes in addition to the already existing static methods in the generated code.
3131
* GR-71030: Bytecode DSL now provides an `InstructionDescriptor` generated implementation for the bytecode interpreter. The instructions can be accessed via the new BytecodeDescriptor like this: `MyBytecodeRootNodeGen.BYTECODE.getInstructionDescriptors()`. There is also `MyBytecodeRootNodeGen.BYTECODE.dump()` to produce a human-readable instruction format.
3232
* GR-71031: Added new method `BytecodeDescriptor.update(MyLanguage, BytecodeConfig)` to update the bytecode config for all current root nodes and root nodes created in the future of a language.
3333
* GR-51945: Bytecode DSL, added `InstructionTracer` with `onInstructionEnter(InstructionAccess, BytecodeNode, int, Frame)`. Tracers can be attached per root via `BytecodeRootNodes.addInstructionTracer(InstructionTracer)` and per descriptor via `BytecodeDescriptor.addInstructionTracer(TruffleLanguage, InstructionTracer)`. Attaching a tracer invalidates affected roots and may trigger reparse and comes at a significant cost.

truffle/src/com.oracle.truffle.api.bytecode.test/src/com/oracle/truffle/api/bytecode/test/basic_interpreter/BasicInterpreterTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@
4848
import static org.junit.Assert.assertThrows;
4949
import static org.junit.Assert.assertTrue;
5050
import static org.junit.Assert.fail;
51-
import static org.junit.Assume.assumeFalse;
5251
import static org.junit.Assume.assumeTrue;
5352

5453
import java.util.ArrayList;

truffle/src/com.oracle.truffle.api.bytecode/src/com/oracle/truffle/api/bytecode/BytecodeDescriptor.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
* default implementation throws {@link UnsupportedOperationException}.
8080
*
8181
* <li><strong>Describing the instruction set:</strong> {@link #getInstructionDescriptors()} and
82-
* {@link #getInstructionDescriptor(int)} expose all instruction kinds, including normal language
82+
* {@link #getInstructionDescriptor(int)} expose all instructions, including normal language
8383
* operations and injected instrumentation instructions. The descriptor can also produce a human
8484
* readable dump via {@link #dump()}.
8585
*
@@ -141,7 +141,7 @@
141141
* Object result = root.getCallTarget().call(42);
142142
* }</pre>
143143
*
144-
* @param <R> the {@link #getSpecificationClass() specificiation class}, which is both a
144+
* @param <R> the {@link #getSpecificationClass() specification class}, which is both a
145145
* {@link RootNode} and a {@link BytecodeRootNode}
146146
* @param <L> the Truffle language type
147147
* @param <B> the builder type used to emit bytecode for this interpreter
@@ -197,7 +197,7 @@ protected BytecodeDescriptor(Object token) {
197197
/**
198198
* Returns an immutable list of all instruction descriptors known to this interpreter. The list
199199
* describes every instruction kind that can be executed by nodes generated from this
200-
* descriptor.
200+
* interpreter.
201201
*
202202
* @since 25.1
203203
*/

truffle/src/com.oracle.truffle.api.bytecode/src/com/oracle/truffle/api/bytecode/Instruction.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ protected Instruction(Object token) {
103103
/**
104104
* Returns the descriptor object for this instruction.
105105
* <p>
106-
* The descriptor provides static metadata about the instruction kind executed at this bytecode
106+
* The descriptor provides static metadata about the instruction executed at this bytecode
107107
* index, such as its name, operation code, length in bytes, argument layout, and whether it is
108108
* considered instrumentation.
109109
*
@@ -360,9 +360,8 @@ protected Argument(Object token) {
360360
* Returns the descriptor object for this argument.
361361
* <p>
362362
* The descriptor provides static metadata about the argument position and interpretation
363-
* for this instruction kind, including its {@link Kind}, printable name, and encoded width
364-
* in bytes. This metadata is the same for all arguments in the same instruction slot for
365-
* the same instruction kind.
363+
* for this instruction, including its {@link Kind}, printable name, and encoded width in
364+
* bytes.
366365
*
367366
* @since 25.1
368367
*/

0 commit comments

Comments
 (0)