Skip to content

Commit 583286f

Browse files
committed
Remove deprecated node costs
1 parent 624bd60 commit 583286f

21 files changed

+14
-270
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/WarningsModuleBuiltins.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@
139139
import com.oracle.truffle.api.frame.Frame;
140140
import com.oracle.truffle.api.frame.VirtualFrame;
141141
import com.oracle.truffle.api.nodes.Node;
142-
import com.oracle.truffle.api.nodes.NodeInfo;
143142
import com.oracle.truffle.api.profiles.BranchProfile;
144143
import com.oracle.truffle.api.strings.TruffleString;
145144

@@ -985,7 +984,6 @@ private static TruffleString getSourceLine(Node node, PDict globals, int lineno)
985984
}
986985

987986
@ReportPolymorphism
988-
@NodeInfo(shortName = "warnings_warn_impl", description = "implements warnings_warn_impl and the clinic wrapper")
989987
@Builtin(name = J_WARN, minNumOfPositionalArgs = 2, parameterNames = {"$mod", "message", "category", "stacklevel", "source"}, declaresExplicitSelf = true, alwaysNeedsCallerFrame = true)
990988
@ArgumentClinic(name = "category", defaultValue = "PNone.NONE")
991989
@ArgumentClinic(name = "stacklevel", conversion = ClinicConversion.Int, defaultValue = "1")
@@ -1016,7 +1014,6 @@ public static WarnBuiltinNode create() {
10161014
}
10171015

10181016
@ReportPolymorphism
1019-
@NodeInfo(shortName = "warnings_warn_explicit")
10201017
@Builtin(name = J_WARN_EXPLICIT, minNumOfPositionalArgs = 5, //
10211018
parameterNames = {"$mod", "message", "category", "filename", "lineno", "module", "registry", "module_globals", "source"}, declaresExplicitSelf = true)
10221019
@ArgumentClinic(name = "lineno", conversion = ClinicConversion.Int)

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/capi/ExternalFunctionNodes.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,6 @@
159159
import com.oracle.truffle.api.nodes.ExplodeLoop;
160160
import com.oracle.truffle.api.nodes.ExplodeLoop.LoopExplosionKind;
161161
import com.oracle.truffle.api.nodes.Node;
162-
import com.oracle.truffle.api.nodes.NodeCost;
163162
import com.oracle.truffle.api.nodes.RootNode;
164163
import com.oracle.truffle.api.nodes.UnexpectedResultException;
165164
import com.oracle.truffle.api.profiles.ConditionProfile;
@@ -1078,12 +1077,6 @@ public String getName() {
10781077
return name.toJavaStringUncached();
10791078
}
10801079

1081-
@Override
1082-
public NodeCost getCost() {
1083-
// this is just a thin argument shuffling wrapper
1084-
return NodeCost.NONE;
1085-
}
1086-
10871080
@Override
10881081
public String toString() {
10891082
return "<METH root " + name + ">";

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyArithmeticNode.java

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -56,7 +56,6 @@
5656
import com.oracle.truffle.api.RootCallTarget;
5757
import com.oracle.truffle.api.dsl.NeverDefault;
5858
import com.oracle.truffle.api.nodes.Node;
59-
import com.oracle.truffle.api.nodes.NodeCost;
6059

6160
public abstract class GraalHPyArithmeticNode {
6261

@@ -88,11 +87,6 @@ private HPyUnaryArithmeticCached(UnaryArithmetic operator) {
8887
public Object execute(Object object) {
8988
return opNode.executeCached(null, object);
9089
}
91-
92-
@Override
93-
public NodeCost getCost() {
94-
return NodeCost.NONE;
95-
}
9690
}
9791

9892
private static final class HPyUnaryArithmeticUncached extends HPyUnaryArithmeticNode {
@@ -111,11 +105,6 @@ public Object execute(Object object) {
111105
return GenericInvokeNode.invokeUncached(callTarget, pythonArguments);
112106
}
113107

114-
@Override
115-
public NodeCost getCost() {
116-
return NodeCost.MEGAMORPHIC;
117-
}
118-
119108
@Override
120109
public boolean isAdoptable() {
121110
return false;
@@ -156,11 +145,6 @@ private HPyBinaryArithmeticCached(BinaryArithmetic operator) {
156145
public Object execute(Object arg0, Object arg1) {
157146
return opNode.executeObject(null, arg0, arg1);
158147
}
159-
160-
@Override
161-
public NodeCost getCost() {
162-
return NodeCost.NONE;
163-
}
164148
}
165149

166150
private static final class HPyBinaryArithmeticUncached extends HPyBinaryArithmeticNode {
@@ -180,11 +164,6 @@ public Object execute(Object arg0, Object arg1) {
180164
return GenericInvokeNode.invokeUncached(callTarget, pythonArguments);
181165
}
182166

183-
@Override
184-
public NodeCost getCost() {
185-
return NodeCost.MEGAMORPHIC;
186-
}
187-
188167
@Override
189168
public boolean isAdoptable() {
190169
return false;
@@ -225,11 +204,6 @@ private HPyTernaryArithmeticCached(TernaryArithmetic operator) {
225204
public Object execute(Object arg0, Object arg1, Object arg2) {
226205
return opNode.execute(null, arg0, arg1, arg2);
227206
}
228-
229-
@Override
230-
public NodeCost getCost() {
231-
return NodeCost.NONE;
232-
}
233207
}
234208

235209
private static final class HPyTernaryArithmeticUncached extends HPyTernaryArithmeticNode {
@@ -250,11 +224,6 @@ public Object execute(Object arg0, Object arg1, Object arg2) {
250224
return GenericInvokeNode.invokeUncached(callTarget, pythonArguments);
251225
}
252226

253-
@Override
254-
public NodeCost getCost() {
255-
return NodeCost.MEGAMORPHIC;
256-
}
257-
258227
@Override
259228
public boolean isAdoptable() {
260229
return false;
@@ -306,11 +275,6 @@ public Object execute(Object arg0, Object arg1, Object arg2) {
306275
return opNode.execute(null, arg0, arg1);
307276
}
308277
}
309-
310-
@Override
311-
public NodeCost getCost() {
312-
return NodeCost.NONE;
313-
}
314278
}
315279

316280
private static final class HPyInplaceArithmeticUncached extends HPyInplaceArithmeticNode {
@@ -331,11 +295,6 @@ public Object execute(Object arg0, Object arg1, Object arg2) {
331295
return GenericInvokeNode.invokeUncached(callTarget, pythonArguments);
332296
}
333297

334-
@Override
335-
public NodeCost getCost() {
336-
return NodeCost.MEGAMORPHIC;
337-
}
338-
339298
@Override
340299
public boolean isAdoptable() {
341300
return false;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/GraalHPyNodes.java

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@
184184
import com.oracle.truffle.api.library.CachedLibrary;
185185
import com.oracle.truffle.api.nodes.ExplodeLoop;
186186
import com.oracle.truffle.api.nodes.Node;
187-
import com.oracle.truffle.api.nodes.NodeCost;
188187
import com.oracle.truffle.api.object.DynamicObjectLibrary;
189188
import com.oracle.truffle.api.profiles.InlinedBranchProfile;
190189
import com.oracle.truffle.api.profiles.InlinedConditionProfile;
@@ -1702,11 +1701,6 @@ public Object execute(Object object) {
17021701
return object;
17031702
}
17041703

1705-
@Override
1706-
public NodeCost getCost() {
1707-
return NodeCost.NONE;
1708-
}
1709-
17101704
@Override
17111705
public boolean isAdoptable() {
17121706
return this != UNCACHED;
@@ -2885,11 +2879,6 @@ public Object execute(GraalHPyContext hpyContext, Object pointerObject, LLVMType
28852879
return pointerObject;
28862880
}
28872881

2888-
@Override
2889-
public NodeCost getCost() {
2890-
return NodeCost.MONOMORPHIC;
2891-
}
2892-
28932882
@Override
28942883
public boolean isAdoptable() {
28952884
return false;

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/HPyExternalFunctionNodes.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,6 @@
120120
import com.oracle.truffle.api.interop.UnsupportedTypeException;
121121
import com.oracle.truffle.api.library.CachedLibrary;
122122
import com.oracle.truffle.api.nodes.Node;
123-
import com.oracle.truffle.api.nodes.NodeCost;
124123
import com.oracle.truffle.api.strings.TruffleString;
125124

126125
public abstract class HPyExternalFunctionNodes {
@@ -517,12 +516,6 @@ public TruffleString getTSName() {
517516
return name;
518517
}
519518

520-
@Override
521-
public NodeCost getCost() {
522-
// this is just a thin argument shuffling wrapper
523-
return NodeCost.NONE;
524-
}
525-
526519
@Override
527520
public String toString() {
528521
return "<METH root " + name.toJavaStringUncached() + ">";

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/cext/hpy/jni/GraalHPyJNICallHelperFunctionNode.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2023, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2023, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -45,7 +45,6 @@
4545
import com.oracle.graal.python.builtins.objects.cext.hpy.GraalHPyNodes.HPyCallHelperFunctionNode;
4646
import com.oracle.graal.python.builtins.objects.cext.hpy.jni.GraalHPyJNINodes.HPyJNIFromCharPointerNode;
4747
import com.oracle.truffle.api.CompilerDirectives;
48-
import com.oracle.truffle.api.nodes.NodeCost;
4948

5049
/**
5150
* This is the implementation of {@link HPyCallHelperFunctionNode} for the JNI backend. This node
@@ -70,11 +69,6 @@ protected Object execute(GraalHPyContext context, GraalHPyNativeSymbol name, Obj
7069
};
7170
}
7271

73-
@Override
74-
public NodeCost getCost() {
75-
return NodeCost.MONOMORPHIC;
76-
}
77-
7872
@Override
7973
public boolean isAdoptable() {
8074
return false;

0 commit comments

Comments
 (0)