Skip to content

Commit

Permalink
Fix minor issues (lint, javadoc, CI failures)
Browse files Browse the repository at this point in the history
  • Loading branch information
DSouzaM committed Feb 5, 2024
1 parent 5aec0ea commit 29411bf
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions truffle/mx.truffle/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,7 @@
"annotationProcessors" : ["TRUFFLE_DSL_PROCESSOR"],
"javaCompliance" : "17+",
"workingSets" : "API,Truffle",
"graalCompilerSourceEdition": "ignore",
},

"com.oracle.truffle.api.bytecode.test" : {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ public static boolean doObject(Object o) {
@Operation
public static final class GetSourcePosition {
@Specialization
@TruffleBoundary
public static Object doOperation(VirtualFrame frame,
@Bind("$node") Node node,
@Bind("$bytecode") BytecodeNode bytecode) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public final Node getLocation() {
* Returns a source section associated with the exception. This method may return {@code null}
* to indicate that the source section is not available.
*
* @since 24.0
* @since 24.1
*/
public SourceSection getSourceSection() {
if (location == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ default void clearStatic(int slot) {
*
* @param srcSlot the slot of the source local variable
* @param destSlot the slot of the target local variable
* @since XXX
* @since 24.1
*/
default void copyObject(int srcSlot, int destSlot) {
CompilerDirectives.transferToInterpreterAndInvalidate();
Expand All @@ -925,7 +925,7 @@ default void copyObject(int srcSlot, int destSlot) {
*
* @param srcSlot the slot of the source local variable
* @param destSlot the slot of the target local variable
* @since XXX
* @since 24.1
*/
default void copyPrimitive(int srcSlot, int destSlot) {
CompilerDirectives.transferToInterpreterAndInvalidate();
Expand All @@ -940,7 +940,7 @@ default void copyPrimitive(int srcSlot, int destSlot) {
* @param dst the destination frame
* @param dstOffset the first slot to copy locals into
* @param length the number of slots to copy
* @since XXX
* @since 24.1
*/
@SuppressWarnings("unused")
default void copyTo(int srcOffset, Frame dst, int dstOffset, int length) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4779,12 +4779,12 @@ private CodeExecutableElement createReparseImpl() {

private CodeExecutableElement createPerformUpdate() {
CodeExecutableElement ex = new CodeExecutableElement(Set.of(PRIVATE, Modifier.SYNCHRONIZED), type(boolean.class), "performUpdate");
ex.addParameter(new CodeVariableElement(type(long.class), "encoding"));
ex.addParameter(new CodeVariableElement(type(long.class), "maskedEncoding"));
ex.getModifiers().add(Modifier.SYNCHRONIZED);
CodeTreeBuilder b = ex.createBuilder();

b.declaration(type(long.class), "oldEncoding", "this.encoding");
b.declaration(type(long.class), "newEncoding", "encoding | oldEncoding");
b.declaration(type(long.class), "newEncoding", "maskedEncoding | oldEncoding");
b.startIf().string("(oldEncoding | newEncoding) == oldEncoding").end().startBlock();
b.lineComment("double checked locking");
b.returnFalse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ public void addDefault() {
.setOperationArguments(new OperationArgument(types.BytecodeLocal, "local", "the local to store to")) //
.setInstruction(instruction(InstructionKind.STORE_LOCAL_MATERIALIZED, "store.local.mat",
signature(void.class, Object.class, Object.class)) //
.addImmediate(ImmediateKind.INTEGER, "index"));
.addImmediate(ImmediateKind.INTEGER, "index"));
operation(OperationKind.RETURN, "Return") //
.setNumChildren(1) //
.setChildrenMustBeValues(true) //
Expand Down

0 comments on commit 29411bf

Please sign in to comment.