Skip to content

Commit 6c603ce

Browse files
chumerhorakivo
authored andcommitted
Use storeBytecodeIndex and @StoreBytecodeIndex
1 parent 7c4b601 commit 6c603ce

39 files changed

+227
-157
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1872,7 +1872,7 @@ static Object repr(VirtualFrame frame, Object obj,
18721872
// format(object, [format_spec])
18731873
@Builtin(name = J_FORMAT, minNumOfPositionalArgs = 1, parameterNames = {"object", "format_spec"})
18741874
@GenerateNodeFactory
1875-
@OperationProxy.Proxyable
1875+
@OperationProxy.Proxyable(storeBytecodeIndex = true)
18761876
@ImportStatic(PGuards.class)
18771877
public abstract static class FormatNode extends PythonBinaryBuiltinNode {
18781878

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/asyncio/GetAwaitableNode.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
import com.oracle.truffle.api.nodes.Node;
6363

6464
@GenerateUncached
65-
@OperationProxy.Proxyable
65+
@OperationProxy.Proxyable(storeBytecodeIndex = true)
6666
@GenerateInline(false)
6767
public abstract class GetAwaitableNode extends Node {
6868
public abstract Object execute(VirtualFrame frame, Object arg);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/objects/set/SetNodes.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ public static ConstructSetNode getUncached() {
117117
}
118118

119119
@GenerateUncached
120-
@OperationProxy.Proxyable
120+
@OperationProxy.Proxyable(storeBytecodeIndex = true)
121121
@GenerateInline(false) // footprint reduction 92 -> 73
122122
public abstract static class AddNode extends PNodeWithContext {
123123
public abstract void execute(Frame frame, PSet self, Object o);

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyNumberAddNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
import com.oracle.graal.python.runtime.object.PFactory;
5959
import com.oracle.graal.python.runtime.sequence.storage.SequenceStorage;
6060
import com.oracle.truffle.api.bytecode.OperationProxy;
61+
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
6162
import com.oracle.truffle.api.dsl.Bind;
6263
import com.oracle.truffle.api.dsl.Cached;
6364
import com.oracle.truffle.api.dsl.Cached.Exclusive;
@@ -74,7 +75,7 @@
7475

7576
@GenerateInline(false)
7677
@GenerateUncached
77-
@OperationProxy.Proxyable
78+
@OperationProxy.Proxyable(storeBytecodeIndex = false)
7879
public abstract class PyNumberAddNode extends PyNumberAddFastPathsBase {
7980

8081
@Specialization(guards = {"isBuiltinList(left)", "isBuiltinList(right)"})
@@ -102,6 +103,7 @@ public static TruffleString doIt(TruffleString left, TruffleString right,
102103
}
103104

104105
@Fallback
106+
@StoreBytecodeIndex
105107
public static Object doIt(VirtualFrame frame, Object v, Object w,
106108
@Bind Node inliningTarget,
107109
@Exclusive @Cached GetClassNode getVClass,

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyNumberAndNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import com.oracle.graal.python.lib.fastpath.PyNumberAndFastPathsBase;
4545
import com.oracle.truffle.api.HostCompilerDirectives.InliningCutoff;
4646
import com.oracle.truffle.api.bytecode.OperationProxy;
47+
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
4748
import com.oracle.truffle.api.dsl.Bind;
4849
import com.oracle.truffle.api.dsl.Cached;
4950
import com.oracle.truffle.api.dsl.Fallback;
@@ -55,11 +56,12 @@
5556

5657
@GenerateInline(false)
5758
@GenerateUncached
58-
@OperationProxy.Proxyable
59+
@OperationProxy.Proxyable(storeBytecodeIndex = false)
5960
public abstract class PyNumberAndNode extends PyNumberAndFastPathsBase {
6061

6162
@Fallback
6263
@InliningCutoff
64+
@StoreBytecodeIndex
6365
public static Object doIt(VirtualFrame frame, Object v, Object w,
6466
@Bind Node inliningTarget,
6567
@Cached CallBinaryOpNode callBinaryOpNode) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyNumberFloorDivideNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import com.oracle.graal.python.builtins.objects.type.slots.TpSlotBinaryOp.ReversibleSlot;
4444
import com.oracle.graal.python.lib.fastpath.PyNumberFloorDivideFastPathsBase;
4545
import com.oracle.truffle.api.bytecode.OperationProxy;
46+
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
4647
import com.oracle.truffle.api.dsl.Bind;
4748
import com.oracle.truffle.api.dsl.Cached;
4849
import com.oracle.truffle.api.dsl.Fallback;
@@ -54,10 +55,11 @@
5455

5556
@GenerateInline(false)
5657
@GenerateUncached
57-
@OperationProxy.Proxyable
58+
@OperationProxy.Proxyable(storeBytecodeIndex = false)
5859
public abstract class PyNumberFloorDivideNode extends PyNumberFloorDivideFastPathsBase {
5960

6061
@Fallback
62+
@StoreBytecodeIndex
6163
public static Object doIt(VirtualFrame frame, Object v, Object w,
6264
@Bind Node inliningTarget,
6365
@Cached CallBinaryOpNode callBinaryOpNode) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyNumberInPlaceAddNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import com.oracle.graal.python.nodes.object.GetClassNode;
5454
import com.oracle.truffle.api.HostCompilerDirectives.InliningCutoff;
5555
import com.oracle.truffle.api.bytecode.OperationProxy;
56+
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
5657
import com.oracle.truffle.api.dsl.Bind;
5758
import com.oracle.truffle.api.dsl.Cached;
5859
import com.oracle.truffle.api.dsl.Cached.Exclusive;
@@ -66,11 +67,12 @@
6667

6768
@GenerateInline(false)
6869
@GenerateUncached
69-
@OperationProxy.Proxyable
70+
@OperationProxy.Proxyable(storeBytecodeIndex = false)
7071
public abstract class PyNumberInPlaceAddNode extends PyNumberAddFastPathsBase {
7172

7273
@Fallback
7374
@InliningCutoff
75+
@StoreBytecodeIndex
7476
public static Object doIt(VirtualFrame frame, Object v, Object w,
7577
@Bind Node inliningTarget,
7678
@Exclusive @Cached GetClassNode getVClass,

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyNumberInPlaceAndNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import com.oracle.graal.python.lib.fastpath.PyNumberAndFastPathsBase;
4545
import com.oracle.truffle.api.HostCompilerDirectives.InliningCutoff;
4646
import com.oracle.truffle.api.bytecode.OperationProxy;
47+
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
4748
import com.oracle.truffle.api.dsl.Bind;
4849
import com.oracle.truffle.api.dsl.Cached;
4950
import com.oracle.truffle.api.dsl.Fallback;
@@ -55,10 +56,11 @@
5556

5657
@GenerateInline(false)
5758
@GenerateUncached
58-
@OperationProxy.Proxyable
59+
@OperationProxy.Proxyable(storeBytecodeIndex = false)
5960
public abstract class PyNumberInPlaceAndNode extends PyNumberAndFastPathsBase {
6061
@Fallback
6162
@InliningCutoff
63+
@StoreBytecodeIndex
6264
public static Object doIt(VirtualFrame frame, Object v, Object w,
6365
@Bind Node inliningTarget,
6466
@Cached CallBinaryIOpNode callBinaryOpNode) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyNumberInPlaceFloorDivideNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import com.oracle.graal.python.lib.fastpath.PyNumberFloorDivideFastPathsBase;
4545
import com.oracle.truffle.api.HostCompilerDirectives.InliningCutoff;
4646
import com.oracle.truffle.api.bytecode.OperationProxy;
47+
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
4748
import com.oracle.truffle.api.dsl.Bind;
4849
import com.oracle.truffle.api.dsl.Cached;
4950
import com.oracle.truffle.api.dsl.Fallback;
@@ -55,10 +56,11 @@
5556

5657
@GenerateInline(false)
5758
@GenerateUncached
58-
@OperationProxy.Proxyable
59+
@OperationProxy.Proxyable(storeBytecodeIndex = false)
5960
public abstract class PyNumberInPlaceFloorDivideNode extends PyNumberFloorDivideFastPathsBase {
6061
@Fallback
6162
@InliningCutoff
63+
@StoreBytecodeIndex
6264
public static Object doIt(VirtualFrame frame, Object v, Object w,
6365
@Bind Node inliningTarget,
6466
@Cached CallBinaryIOpNode callBinaryOpNode) {

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/lib/PyNumberInPlaceLshiftNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import com.oracle.graal.python.builtins.objects.type.slots.TpSlotBinaryOp.InplaceSlot;
4444
import com.oracle.graal.python.nodes.expression.BinaryOpNode;
4545
import com.oracle.truffle.api.bytecode.OperationProxy;
46+
import com.oracle.truffle.api.bytecode.StoreBytecodeIndex;
4647
import com.oracle.truffle.api.dsl.Bind;
4748
import com.oracle.truffle.api.dsl.Cached;
4849
import com.oracle.truffle.api.dsl.GenerateInline;
@@ -55,9 +56,10 @@
5556
// TODO: should inherit from PyNumberLshiftFastPathsBase, blocked by GR-64005
5657
@GenerateInline(false)
5758
@GenerateUncached
58-
@OperationProxy.Proxyable
59+
@OperationProxy.Proxyable(storeBytecodeIndex = false)
5960
public abstract class PyNumberInPlaceLshiftNode extends BinaryOpNode {
6061
@Specialization // (replaces = {"doII", "doLL"})
62+
@StoreBytecodeIndex
6163
public static Object doIt(VirtualFrame frame, Object v, Object w,
6264
@Bind Node inliningTarget,
6365
@Cached CallBinaryIOpNode callBinaryOpNode) {

0 commit comments

Comments
 (0)