Skip to content

Commit 34b8475

Browse files
author
rocky
committed
Go over CALL_OP instructions
1 parent f9e7a4a commit 34b8475

File tree

8 files changed

+17
-14
lines changed

8 files changed

+17
-14
lines changed

xdis/opcodes/opcode_3x/opcode_312.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import xdis.opcodes.opcode_3x.opcode_311 as opcode_311
2626
from xdis.opcodes.base import (
2727
binary_op,
28+
call_op,
2829
cpython_implementation,
2930
def_op,
3031
finalize_opcodes,
@@ -118,7 +119,7 @@
118119
def_op(loc , "INSTRUMENTED_CALL" , 241, 1, 1)
119120
def_op(loc , "INSTRUMENTED_RETURN_VALUE" , 242, 1, 0)
120121
def_op(loc , "INSTRUMENTED_YIELD_VALUE" , 243, 1, 1)
121-
def_op(loc , "INSTRUMENTED_CALL_FUNCTION_EX" , 244, 1, 1)
122+
call_op(loc , "INSTRUMENTED_CALL_FUNCTION_EX" , 244, 1, 1)
122123
def_op(loc , "INSTRUMENTED_JUMP_FORWARD" , 245, 1, 1)
123124
def_op(loc , "INSTRUMENTED_JUMP_BACKWARD" , 246, 1, 1)
124125
def_op(loc , "INSTRUMENTED_RETURN_CONST" , 247, 1, 1)

xdis/opcodes/opcode_3x/opcode_313.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import xdis.opcodes.opcode_3x.opcode_312 as opcode_312
2727
from xdis.opcodes.base import ( # noqa
2828
VARYING_STACK_INT,
29+
call_op,
2930
cpython_implementation,
3031
def_op,
3132
finalize_opcodes,
@@ -243,10 +244,10 @@
243244
def_op(loc, "BUILD_SLICE" , 50 , 2 , 1)
244245
def_op(loc, "BUILD_STRING" , 51 , -2, 2)
245246
def_op(loc, "BUILD_TUPLE" , 52 , -1, 1)
246-
def_op(loc, "CALL" , 53 , 1 , 0)
247-
def_op(loc, "CALL_FUNCTION_EX" , 54 , -2, 1)
248-
def_op(loc, "CALL_INTRINSIC_1" , 55 , 1 , 1)
249-
def_op(loc, "CALL_INTRINSIC_2" , 56 , 2 , 1)
247+
call_op(loc, "CALL" , 53 , 1 , 0)
248+
call_op(loc, "CALL_FUNCTION_EX" , 54 , -2, 1)
249+
call_op(loc, "CALL_INTRINSIC_1" , 55 , 1 , 1)
250+
call_op(loc, "CALL_INTRINSIC_2" , 56 , 2 , 1)
250251
def_op(loc, "COMPARE_OP" , 58 , 2 , 1)
251252
def_op(loc, "CONTAINS_OP" , 59 , 2 , 1)
252253
def_op(loc, "COPY" , 61 , 0 , 1)
@@ -315,9 +316,9 @@
315316
def_op(loc, "INSTRUMENTED_YIELD_VALUE" , 241 , 1 , 1)
316317
def_op(loc, "INSTRUMENTED_LOAD_SUPER_ATTR" , 242 , 2 , 0)
317318
def_op(loc, "INSTRUMENTED_FOR_ITER" , 243 , 1 , 1)
318-
def_op(loc, "INSTRUMENTED_CALL" , 244 , 1 , 1)
319-
def_op(loc, "INSTRUMENTED_CALL_KW" , 245 , 2 , 2)
320-
def_op(loc, "INSTRUMENTED_CALL_FUNCTION_EX" , 246 , 1 , 1)
319+
call_op(loc, "INSTRUMENTED_CALL" , 244 , 1 , 1)
320+
call_op(loc, "INSTRUMENTED_CALL_KW" , 245 , 2 , 2)
321+
call_op(loc, "INSTRUMENTED_CALL_FUNCTION_EX" , 246 , 1 , 1)
321322
def_op(loc, "INSTRUMENTED_INSTRUCTION" , 247 , 1 , 1)
322323
def_op(loc, "INSTRUMENTED_JUMP_FORWARD" , 248 , 1 , 1)
323324
def_op(loc, "INSTRUMENTED_JUMP_BACKWARD" , 249 , 1 , 1)

xdis/opcodes/opcode_3x/opcode_314.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@
279279
name_op(loc, "INSTRUMENTED_LOAD_SUPER_ATTR", 248, VARYING_STACK_INT, 1) # pushes 1 + (oparg & 1)
280280
call_op(loc, "INSTRUMENTED_CALL", 249, -2, 1)
281281
call_op(loc, "INSTRUMENTED_CALL_KW", 250, -3, 1)
282-
def_op(loc, "INSTRUMENTED_CALL_FUNCTION_EX", 251, 4, 1)
282+
call_op(loc, "INSTRUMENTED_CALL_FUNCTION_EX", 251, 4, 1)
283283
jrel_op(loc, "INSTRUMENTED_JUMP_BACKWARD", 252, 0, 0, conditional=False)
284284
def_op(loc, "INSTRUMENTED_LINE", 253, 0, 0)
285285
def_op(loc, "ENTER_EXECUTOR", 254, 0, 0)

xdis/opcodes/opcode_graal/opcode_310graal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@
449449
#
450450
# Pushes: call result
451451
#
452-
def_op_graal(loc, "CALL_FUNCTION_VARARGS", 0x46, 0, 2, 0)
452+
call_op_graal(loc, "CALL_FUNCTION_VARARGS", 0x46, 0, 2, 0)
453453

454454
# ----------------------
455455
# destructuring bytecodes

xdis/opcodes/opcode_graal/opcode_311graal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@
467467
#
468468
# Pushes: call result
469469
#
470-
def_op_graal(loc, "CALL_FUNCTION_VARARGS", 0x46, 0, 2, 0)
470+
call_op_graal(loc, "CALL_FUNCTION_VARARGS", 0x46, 0, 2, 0)
471471

472472
# ----------------------
473473
# destructuring bytecodes

xdis/opcodes/opcode_graal/opcode_312graal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@
461461
#
462462
# Pushes: call result
463463
#
464-
def_op_graal(loc, "CALL_FUNCTION_VARARGS", 0x48, 0, 2, 0)
464+
call_op_graal(loc, "CALL_FUNCTION_VARARGS", 0x48, 0, 2, 0)
465465

466466
# ----------------------
467467
# destructuring bytecodes

xdis/opcodes/opcode_graal/opcode_38graal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@
410410
#
411411
# Pushes: call result
412412
#
413-
def_op_graal(loc, "CALL_FUNCTION_VARARGS", 0x3B, 0, 2, 0)
413+
call_op_graal(loc, "CALL_FUNCTION_VARARGS", 0x3B, 0, 2, 0)
414414

415415
# ----------------------
416416
# destructuring bytecodes

xdis/opcodes/opcode_rust/opcode_312rust.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from xdis.opcodes.base import (
2525
VARYING_STACK_INT,
2626
binary_op,
27+
call_op,
2728
compare_op,
2829
const_op,
2930
def_op,
@@ -254,7 +255,7 @@ def pseudo_op(name: str, op: int, real_ops: list):
254255
free_op(loc, "DELETE_DEREF", 139, 0, 0)
255256
jrel_op(loc, "JUMP_BACKWARD", 140) # Number of words to skip (backwards)
256257

257-
def_op(loc, "CALL_FUNCTION_EX", 142) # Flags
258+
call_op(loc, "CALL_FUNCTION_EX", 142) # Flags
258259

259260
def_op(loc, "EXTENDED_ARG", 144)
260261
EXTENDED_ARG = 144

0 commit comments

Comments
 (0)