summaryrefslogtreecommitdiff
path: root/Lib/test/test_compile.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-12-14 18:22:44 +0000
committerGitHub <noreply@github.com>2021-12-14 18:22:44 +0000
commit9f8f45144b6f0ad481e80570538cce89b414f7f9 (patch)
treebde67ec27794633c1e58d7349be4bf16687a1949 /Lib/test/test_compile.py
parentd60457a6673cf0263213c2f2be02c633ec2e2038 (diff)
downloadcpython-git-9f8f45144b6f0ad481e80570538cce89b414f7f9.tar.gz
bpo-44525: Split calls into PRECALL and CALL (GH-30011)
* Add 3 new opcodes for calls: PRECALL_METHOD, CALL_NO_KW, CALL_KW. * Update specialization to handle new CALL opcodes. * Specialize call to method descriptors. * Remove old CALL opcodes: CALL_FUNCTION, CALL_METHOD, CALL_METHOD_KW, CALL_FUNCTION_KW.
Diffstat (limited to 'Lib/test/test_compile.py')
-rw-r--r--Lib/test/test_compile.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py
index 5bd7b06530..11615b3223 100644
--- a/Lib/test/test_compile.py
+++ b/Lib/test/test_compile.py
@@ -839,7 +839,7 @@ if 1:
self.assertNotIn('LOAD_METHOD', instructions)
self.assertNotIn('CALL_METHOD', instructions)
self.assertIn('LOAD_ATTR', instructions)
- self.assertIn('CALL_FUNCTION', instructions)
+ self.assertIn('CALL_NO_KW', instructions)
def test_lineno_procedure_call(self):
def call():
@@ -1095,7 +1095,7 @@ f(
)
"""
compiled_code, _ = self.check_positions_against_ast(snippet)
- self.assertOpcodeSourcePositionIs(compiled_code, 'CALL_FUNCTION',
+ self.assertOpcodeSourcePositionIs(compiled_code, 'CALL_NO_KW',
line=1, end_line=3, column=0, end_column=1)
def test_very_long_line_end_offset(self):
@@ -1105,7 +1105,7 @@ f(
snippet = f"g('{long_string}')"
compiled_code, _ = self.check_positions_against_ast(snippet)
- self.assertOpcodeSourcePositionIs(compiled_code, 'CALL_FUNCTION',
+ self.assertOpcodeSourcePositionIs(compiled_code, 'CALL_NO_KW',
line=1, end_line=1, column=None, end_column=None)
def test_complex_single_line_expression(self):