Skip to content

Commit

Permalink
[GR-17457] Re-enable ECJ compilation of org.truffleruby as linter
Browse files Browse the repository at this point in the history
PullRequest: truffleruby/4113
  • Loading branch information
eregon committed Jan 15, 2024
2 parents ce11ae4 + 53898f5 commit 65e954b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
1 change: 0 additions & 1 deletion mx.truffleruby/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,6 @@
"checkstyle": "org.truffleruby",
"workingSets": "TruffleRuby",
"findbugsIgnoresGenerated": True,
"forceJavac": True, # GR-51148 We need to force javac to silence a ECJ warning in generated code
"license": [
"EPL-2.0", # JRuby (we're choosing EPL out of EPL,GPL,LGPL)
"BSD-new", # Rubinius
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ Object delete(RubyHash hash, Object key,
Object deleteLast(RubyHash hash, Object key,
@Cached @Shared HashingNodes.ToHash hashFunction,
@Cached @Shared GetIndexPosFromKeyPosNode getIndexPosFromKeyPosNode,
@Cached @Exclusive InlinedLoopConditionProfile nonNullKeyNotYetFound,
@Cached @Shared InlinedLoopConditionProfile nonNullKeyNotYetFound,
@Bind("$node") Node node) {
assert hash.size > 0;
int keyPos = firstNonNullKeyPosFromEnd(nonNullKeyNotYetFound, node);
Expand All @@ -238,7 +238,7 @@ Object deleteLast(RubyHash hash, Object key,
RubyArray shift(RubyHash hash,
@Cached @Shared HashingNodes.ToHash hashFunction,
@Cached @Shared GetIndexPosFromKeyPosNode getIndexPosFromKeyPosNode,
@Cached @Exclusive InlinedLoopConditionProfile nonNullKeyNotYetFound,
@Cached @Shared InlinedLoopConditionProfile nonNullKeyNotYetFound,
@Bind("$node") Node node) {
assert hash.size > 0;
int keyPos = firstNonNullKeyPosFromBeginning(nonNullKeyNotYetFound, node);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public String getWarningMessage() {
return buffer.toString();
}

@Override
public String toString() {
return "WarningMessage(" +
"message = '" + message + "'" +
Expand Down Expand Up @@ -117,6 +118,7 @@ public void warning(String fileName, int lineNumber, String message) {
message));
}

@Override
public String toString() {
var strings = new ArrayList<String>();

Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/truffleruby/parser/YARPTranslator.java
Original file line number Diff line number Diff line change
Expand Up @@ -853,6 +853,7 @@ public RubyNode visitCallOrWriteNode(Nodes.CallOrWriteNode node) {
return assignPositionAndFlags(node, rubyNode);
}

@Override
public RubyNode visitCallTargetNode(Nodes.CallTargetNode node) {
// extra argument should be added before node translation
// to trigger correctly replacement with inlined nodes (e.g. InlinedIndexSetNodeGen)
Expand Down Expand Up @@ -1990,6 +1991,7 @@ public RubyNode visitIndexOrWriteNode(Nodes.IndexOrWriteNode node) {
return assignPositionAndFlags(node, rubyNode);
}

@Override
public RubyNode visitIndexTargetNode(Nodes.IndexTargetNode node) {
// extra argument should be added before node translation
// to trigger correctly replacement with inlined nodes (e.g. InlinedIndexSetNodeGen)
Expand Down

0 comments on commit 65e954b

Please sign in to comment.