Skip to content

Commit de37997

Browse files
committed
Add @BytecodeInterpreterSwitch to quickened arithmetics
1 parent 45b26f4 commit de37997

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/bytecode/PBytecodeRootNode.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2252,6 +2252,7 @@ private void bytecodeBinaryOpAdaptive(VirtualFrame virtualFrame, int stackTop, b
22522252
bytecodeBinaryOpOOO(virtualFrame, stackTop, bci, localNodes, op, bcioffset);
22532253
}
22542254

2255+
@BytecodeInterpreterSwitch
22552256
private void bytecodeBinaryOpIIB(VirtualFrame virtualFrame, int stackTop, int bci, int op) {
22562257
int right, left;
22572258
if (virtualFrame.isInt(stackTop) && virtualFrame.isInt(stackTop - 1)) {
@@ -2289,6 +2290,7 @@ private void bytecodeBinaryOpIIB(VirtualFrame virtualFrame, int stackTop, int bc
22892290
virtualFrame.setBoolean(stackTop - 1, result);
22902291
}
22912292

2293+
@BytecodeInterpreterSwitch
22922294
private void bytecodeBinaryOpIIO(VirtualFrame virtualFrame, int stackTop, int bci, Node[] localNodes, int op) {
22932295
int right, left;
22942296
if (virtualFrame.isInt(stackTop) && virtualFrame.isInt(stackTop - 1)) {
@@ -2379,6 +2381,7 @@ private void bytecodeBinaryOpIIO(VirtualFrame virtualFrame, int stackTop, int bc
23792381
virtualFrame.setObject(stackTop - 1, result);
23802382
}
23812383

2384+
@BytecodeInterpreterSwitch
23822385
private void bytecodeBinaryOpIII(VirtualFrame virtualFrame, int stackTop, int bci, Node[] localNodes, int op, boolean useCachedNodes) {
23832386
int right, left, result;
23842387
if (virtualFrame.isInt(stackTop) && virtualFrame.isInt(stackTop - 1)) {
@@ -2477,6 +2480,7 @@ private void bytecodeBinaryOpIII(VirtualFrame virtualFrame, int stackTop, int bc
24772480
virtualFrame.setInt(stackTop - 1, result);
24782481
}
24792482

2483+
@BytecodeInterpreterSwitch
24802484
private void bytecodeBinaryOpDDD(VirtualFrame virtualFrame, int stackTop, int bci, Node[] localNodes, int op, boolean useCachedNodes) {
24812485
double right, left, result;
24822486
if (virtualFrame.isDouble(stackTop) && virtualFrame.isDouble(stackTop - 1)) {
@@ -2514,6 +2518,7 @@ private void bytecodeBinaryOpDDD(VirtualFrame virtualFrame, int stackTop, int bc
25142518
virtualFrame.setDouble(stackTop - 1, result);
25152519
}
25162520

2521+
@BytecodeInterpreterSwitch
25172522
private void bytecodeBinaryOpDDB(VirtualFrame virtualFrame, int stackTop, int bci, int op) {
25182523
double right, left;
25192524
if (virtualFrame.isDouble(stackTop) && virtualFrame.isDouble(stackTop - 1)) {
@@ -2550,6 +2555,7 @@ private void bytecodeBinaryOpDDB(VirtualFrame virtualFrame, int stackTop, int bc
25502555
virtualFrame.setBoolean(stackTop - 1, result);
25512556
}
25522557

2558+
@BytecodeInterpreterSwitch
25532559
private void bytecodeBinaryOpDDO(VirtualFrame virtualFrame, int stackTop, int bci, Node[] localNodes, int op, boolean useCachedNodes) {
25542560
int right, left;
25552561
if (virtualFrame.isInt(stackTop) && virtualFrame.isInt(stackTop - 1)) {
@@ -2616,6 +2622,7 @@ private void generalizeBinaryOp(VirtualFrame virtualFrame, int stackTop, int bci
26162622
bytecodeBinaryOpOOO(virtualFrame, stackTop, bci, localNodes, op, bcioffset);
26172623
}
26182624

2625+
@BytecodeInterpreterSwitch
26192626
private void bytecodeBinaryOpOOO(VirtualFrame virtualFrame, int stackTop, int bci, Node[] localNodes, int op, int bciSlot) {
26202627
setCurrentBci(virtualFrame, bciSlot, bci);
26212628
BinaryOp opNode = (BinaryOp) insertChildNodeInt(localNodes, bci, BinaryOp.class, BINARY_OP_FACTORY, op);
@@ -2690,6 +2697,7 @@ private void bytecodeUnaryOpAdaptive(VirtualFrame virtualFrame, int stackTop, in
26902697
bytecodeUnaryOpOO(virtualFrame, stackTop, bci, localNodes, op, bcioffset);
26912698
}
26922699

2700+
@BytecodeInterpreterSwitch
26932701
private void bytecodeUnaryOpII(VirtualFrame virtualFrame, int stackTop, int bci, int op) {
26942702
int value;
26952703
if (virtualFrame.isInt(stackTop)) {
@@ -2720,6 +2728,7 @@ private void bytecodeUnaryOpII(VirtualFrame virtualFrame, int stackTop, int bci,
27202728
}
27212729
}
27222730

2731+
@BytecodeInterpreterSwitch
27232732
private void bytecodeUnaryOpIO(VirtualFrame virtualFrame, int stackTop, int bci, int op, Node[] localNodes) {
27242733
int value;
27252734
if (virtualFrame.isInt(stackTop)) {
@@ -2750,6 +2759,7 @@ private void bytecodeUnaryOpIO(VirtualFrame virtualFrame, int stackTop, int bci,
27502759
virtualFrame.setObject(stackTop, result);
27512760
}
27522761

2762+
@BytecodeInterpreterSwitch
27532763
private void bytecodeUnaryOpDD(VirtualFrame virtualFrame, int stackTop, int bci, int op) {
27542764
double value;
27552765
if (virtualFrame.isDouble(stackTop)) {
@@ -2770,6 +2780,7 @@ private void bytecodeUnaryOpDD(VirtualFrame virtualFrame, int stackTop, int bci,
27702780
}
27712781
}
27722782

2783+
@BytecodeInterpreterSwitch
27732784
private void bytecodeUnaryOpDO(VirtualFrame virtualFrame, int stackTop, int bci, int op) {
27742785
double value;
27752786
if (virtualFrame.isDouble(stackTop)) {
@@ -2796,6 +2807,7 @@ private void bytecodeUnaryOpDO(VirtualFrame virtualFrame, int stackTop, int bci,
27962807
virtualFrame.setObject(stackTop, result);
27972808
}
27982809

2810+
@BytecodeInterpreterSwitch
27992811
private void bytecodeUnaryOpBB(VirtualFrame virtualFrame, int stackTop, int bci, int op) {
28002812
boolean value;
28012813
if (virtualFrame.isBoolean(stackTop)) {
@@ -2812,6 +2824,7 @@ private void bytecodeUnaryOpBB(VirtualFrame virtualFrame, int stackTop, int bci,
28122824
}
28132825
}
28142826

2827+
@BytecodeInterpreterSwitch
28152828
private void bytecodeUnaryOpBO(VirtualFrame virtualFrame, int stackTop, int bci, int op) {
28162829
boolean value;
28172830
if (virtualFrame.isBoolean(stackTop)) {
@@ -2835,6 +2848,7 @@ private void generalizeUnaryOp(VirtualFrame virtualFrame, int stackTop, int bci,
28352848
bytecodeUnaryOpOO(virtualFrame, stackTop, bci, adoptedNodes, op, bcioffset);
28362849
}
28372850

2851+
@BytecodeInterpreterSwitch
28382852
private void bytecodeUnaryOpOO(VirtualFrame virtualFrame, int stackTop, int bci, Node[] localNodes, int op, int bciSlot) {
28392853
setCurrentBci(virtualFrame, bciSlot, bci);
28402854
UnaryOpNode opNode = insertChildNodeInt(localNodes, bci, UnaryOpNode.class, UNARY_OP_FACTORY, op);

0 commit comments

Comments
 (0)