Skip to content

Commit

Permalink
Resolve lint/compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
DSouzaM committed Sep 6, 2024
1 parent 978e380 commit e3611c3
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public void testBooleanOr() {
int.class}))
})
@OperationProxy(value = BooleanConverterOperationProxy.class, javadoc = "Converts a value to its boolean truthy value.")
/**
/*
* Note how different boolean converters are used. The converter need not be declared as
* an @Operation or @OperationProxy, but if so, it should validate like an implicit @Operation.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,16 +183,16 @@ static final class InlineBuiltin {
@SuppressWarnings("unused")
public static Object doDefault(JavaBuiltin builtin,

/**
/*
* The variadic annotation allows us to pass any number of arguments to
* the builtin. The concrete number of arguments is contained in
* {@link AbstractBuiltin#args}. We do not statically know them for the
* the builtin. The concrete number of arguments is contained in {@link
* AbstractBuiltin#args}. We do not statically know them for the
* builtin. In order to avoid the Object[] allocation one could create
* individual operations for a specific number of arguments.
*/
@Variadic Object[] args,

/**
/*
* This instructs the DSL to create a new node for any cached usage of
* the builtin. For the uncached initializer builtin.getUncached() is
* used. An uncached version of a node is useful to avoid repeated
Expand All @@ -201,7 +201,7 @@ public static Object doDefault(JavaBuiltin builtin,
@Cached(value = "builtin.createNode()", uncached = "builtin.getUncached()", neverDefault = true)//
BuiltinNode node) {

/**
/*
* The specialization does not do anything special, it just executes the node. This
* can either be the cached or the uncached node here.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public class GettingStarted {
* {@link BytecodeRootNode}.
*/
@GenerateBytecode(languageClass = BytecodeDSLTestLanguage.class)
/**
/*
* Defines a new {@code ScOr} operation. It uses {@code OR} semantics, converts values to
* boolean using {@link ToBool}, and produces the converted boolean values.
*/
Expand Down Expand Up @@ -592,10 +592,10 @@ public void testLoopWithBreak() {
assertEquals(55, sumToN.getCallTarget().call(10));
}

/**
/*
* In addition to the condition and looping contructs, Bytecode DSL has other control flow
* mechanisms for exception handling ({@code TryCatch}, {@code FinallyTry}, and
* {@code FinallyTryCatch}) and continuations ({@code Yield}). We will not cover those here.
* mechanisms for exception handling ({@code TryCatch}, {@code FinallyTry}, and {@code
* FinallyTryCatch}) and continuations ({@code Yield}). We will not cover those here.
*/

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public void testRoundTrip() throws IOException {
doTest(rootNode);
}

/**
/*
* The above example should give you enough information to implement basic serialization in your
* language. The rest of this tutorial covers some of the more advanced features of
* serialization.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
/**
* Implementation of BytecodeDSLAccess that uses Unsafe.
*/
@SuppressWarnings("deprecation")
final class BytecodeDSLUncheckedAccess extends BytecodeDSLAccess {

static final Unsafe UNSAFE = initUnsafe();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
*/
@Retention(RetentionPolicy.SOURCE)
@Target({ElementType.TYPE})
@SuppressWarnings("dangling-doc-comments")
public @interface GenerateBytecode {
/**
* The {@link TruffleLanguage} class associated with this node.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,7 @@ public enum Kind {
*
* @since 24.2
*/
@SuppressWarnings("dangling-doc-comments")
public record BranchProfile(
/**
* The index of the profile for the branch profile table.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6437,7 +6437,8 @@ private void buildEmitInstruction(CodeTreeBuilder b, InstructionModel instr, Str
int stackEffect = switch (instr.kind) {
case BRANCH, BRANCH_BACKWARD, //
TAG_ENTER, TAG_LEAVE, TAG_LEAVE_VOID, TAG_RESUME, TAG_YIELD, //
LOAD_LOCAL_MATERIALIZED, CLEAR_LOCAL, YIELD -> 0;
LOAD_LOCAL_MATERIALIZED, CLEAR_LOCAL, YIELD ->
0;
case STORE_NULL, LOAD_VARIADIC, MERGE_VARIADIC -> {
/*
* NB: These instructions *do* have stack effects. However, they are only used
Expand Down Expand Up @@ -11660,7 +11661,7 @@ private List<CodeExecutableElement> createStoreAndRestoreParentFrameMethods() {
}

final class InterpreterStateElement extends CodeTypeElement {
public InterpreterStateElement() {
InterpreterStateElement() {
super(Set.of(PRIVATE, STATIC, FINAL), ElementKind.CLASS, null, "InterpreterState");
if (!model.enableYield) {
// Without continuations, this state class is unnecessary. Just pass the sp.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
languageClass = SLLanguage.class, //
boxingEliminationTypes = {long.class, boolean.class}, //
enableUncachedInterpreter = true,
/**
/*
* Simple language needs to run code before the root body tag to set local
* variables, so we disable implicit root-body tagging and do this manually in
* {@link SLBytecodeParser#visitFunction}.
Expand Down

0 comments on commit e3611c3

Please sign in to comment.