Skip to content

Commit 954bfcf

Browse files
committed
[GR-18411] Fix linter warnings
PullRequest: truffleruby/4304
2 parents 229973e + 9a56418 commit 954bfcf

File tree

7 files changed

+13
-15
lines changed

7 files changed

+13
-15
lines changed

mx.truffleruby/suite.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
{
2121
"name": "regex",
2222
"subdir": True,
23-
"version": "ee0e5b66ae9bc3ac9f2fddab7484a0dea5ae514e",
23+
"version": "01f3be02bb8e99e910959c1f266a69f651b5dc08",
2424
"urls": [
2525
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
2626
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},
@@ -29,7 +29,7 @@
2929
{
3030
"name": "sulong",
3131
"subdir": True,
32-
"version": "ee0e5b66ae9bc3ac9f2fddab7484a0dea5ae514e",
32+
"version": "01f3be02bb8e99e910959c1f266a69f651b5dc08",
3333
"urls": [
3434
{"url": "https://github.com/oracle/graal.git", "kind": "git"},
3535
{"url": "https://curio.ssw.jku.at/nexus/content/repositories/snapshots", "kind": "binary"},

src/main/java/org/truffleruby/cext/CExtNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1050,7 +1050,6 @@ Object rbConstSet(RubyModule module, Object name, Object value,
10501050
}
10511051

10521052
@Primitive(name = "rb_gv_get")
1053-
@ReportPolymorphism
10541053
public abstract static class RbGvGetNode extends PrimitiveArrayArgumentsNode {
10551054
@Specialization
10561055
Object rbGvGet(VirtualFrame frame, String name,
@@ -1075,6 +1074,7 @@ Object rbGvGet(VirtualFrame frame, String name,
10751074
}
10761075

10771076

1077+
@ReportPolymorphism
10781078
@GenerateInline
10791079
@GenerateCached(false)
10801080
public abstract static class RbGvGetInnerNode extends RubyBaseNode {

src/main/java/org/truffleruby/core/array/ArrayNodes.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ RubyArray initializeSizeTooBig(RubyArray array, long size, NotProvided fillingVa
11561156
@Specialization(guards = "size >= 0")
11571157
RubyArray initializeWithSizeNoValue(RubyArray array, int size, NotProvided fillingValue, Nil block,
11581158
@Cached @Shared IsSharedNode isSharedNode,
1159-
@CachedLibrary(limit = "2") @Exclusive ArrayStoreLibrary stores) {
1159+
@CachedLibrary(limit = "storageStrategyLimit()") @Exclusive ArrayStoreLibrary stores) {
11601160
final Object store;
11611161
if (isSharedNode.execute(this, array)) {
11621162
store = new SharedArrayStorage(new Object[size]);
@@ -1206,7 +1206,7 @@ RubyArray initializeSizeOther(RubyArray array, Object size, Object fillingValue,
12061206
@Specialization(guards = "size >= 0")
12071207
static Object initializeBlock(RubyArray array, int size, Object unusedFillingValue, RubyProc block,
12081208
@Cached ArrayBuilderNode arrayBuilder,
1209-
@CachedLibrary(limit = "2") @Exclusive ArrayStoreLibrary stores,
1209+
@CachedLibrary(limit = "storageStrategyLimit()") @Exclusive ArrayStoreLibrary stores,
12101210
// @Exclusive to fix truffle-interpreted-performance warning
12111211
@Cached @Exclusive IsSharedNode isSharedNode,
12121212
@Cached @Exclusive LoopConditionProfile loopProfile,
@@ -1806,7 +1806,6 @@ public void accept(Node node, CallBlockNode yieldNode, RubyArray array, Object s
18061806
@NodeChild(value = "array", type = RubyNode.class)
18071807
@NodeChild(value = "other", type = RubyBaseNodeWithExecute.class)
18081808
@ImportStatic(ArrayGuards.class)
1809-
@ReportPolymorphism
18101809
public abstract static class ReplaceNode extends CoreMethodNode {
18111810

18121811
@NeverDefault
@@ -1821,7 +1820,7 @@ RubyArray replace(RubyArray array, Object otherObject,
18211820
@Cached ToAryNode toAryNode,
18221821
@Cached ArrayCopyOnWriteNode cowNode,
18231822
@Cached IsSharedNode isSharedNode,
1824-
@CachedLibrary(limit = "2") ArrayStoreLibrary stores) {
1823+
@CachedLibrary(limit = "storageStrategyLimit()") ArrayStoreLibrary stores) {
18251824
final var other = toAryNode.execute(this, otherObject);
18261825
final int size = other.size;
18271826
Object store = cowNode.execute(other, 0, size);
@@ -2222,7 +2221,7 @@ RubyArray stealStorageNoOp(RubyArray array, RubyArray other) {
22222221

22232222
@Specialization(guards = "array != other")
22242223
static RubyArray stealStorage(RubyArray array, RubyArray other,
2225-
@CachedLibrary(limit = "2") ArrayStoreLibrary stores,
2224+
@CachedLibrary(limit = "storageStrategyLimit()") ArrayStoreLibrary stores,
22262225
@Cached PropagateSharingNode propagateSharingNode,
22272226
@Bind("this") Node node) {
22282227
propagateSharingNode.execute(node, array, other);

src/main/java/org/truffleruby/core/binding/BindingNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,6 @@ static Object localVariableGetLastLine(Node node, RubyBinding binding, String na
299299
}
300300
}
301301

302-
@ReportPolymorphism
303302
@CoreMethod(names = "local_variable_set", required = 2)
304303
public abstract static class BindingLocalVariableSetNode extends CoreMethodArrayArgumentsNode {
305304

@@ -313,6 +312,7 @@ Object localVariableSet(RubyBinding binding, Object nameObject, Object value,
313312
}
314313

315314

315+
@ReportPolymorphism
316316
@GenerateUncached
317317
@ImportStatic({ BindingNodes.class, FindDeclarationVariableNodes.class })
318318
@GenerateCached(false)

src/main/java/org/truffleruby/language/RubyBaseRootNode.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import com.oracle.truffle.api.TruffleLanguage;
1313
import com.oracle.truffle.api.frame.FrameDescriptor;
14-
import com.oracle.truffle.api.nodes.Node;
1514
import com.oracle.truffle.api.nodes.RootNode;
1615
import com.oracle.truffle.api.source.SourceSection;
1716
import org.truffleruby.RubyContext;
@@ -42,7 +41,7 @@ public boolean isInternal() {
4241
}
4342

4443
@Override
45-
public boolean isCaptureFramesForTrace(Node currentNode) {
44+
public boolean isCaptureFramesForTrace(boolean compiledFrame) {
4645
return false;
4746
}
4847

src/yarp/java/org/prism/AbstractNodeVisitor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/******************************************************************************/
1+
/* ****************************************************************************/
22
/* This file is generated by the templates/template.rb script and should not */
33
/* be modified manually. See */
44
/* templates/java/org/prism/AbstractNodeVisitor.java.erb */
55
/* if you are looking to modify the */
66
/* template */
7-
/******************************************************************************/
7+
/* ****************************************************************************/
88

99
package org.prism;
1010

src/yarp/java/org/prism/Nodes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
/******************************************************************************/
1+
/* ****************************************************************************/
22
/* This file is generated by the templates/template.rb script and should not */
33
/* be modified manually. See */
44
/* templates/java/org/prism/Nodes.java.erb */
55
/* if you are looking to modify the */
66
/* template */
7-
/******************************************************************************/
7+
/* ****************************************************************************/
88

99
package org.prism;
1010

0 commit comments

Comments
 (0)