Skip to content

Commit 02a4afd

Browse files
committed
rewrite: implement CALL_METHOD.
1 parent 38bfa04 commit 02a4afd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

pytype/rewrite/frame.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,13 @@ def byte_CALL_FUNCTION(self, opcode):
430430
func_var = self._stack.pop()
431431
self._call_function(func_var, abstract.Args(posargs=args))
432432

433+
def byte_CALL_METHOD(self, opcode):
434+
args = self._stack.popn(opcode.arg)
435+
func_var = self._stack.pop()
436+
# pop the NULL off the stack (see LOAD_METHOD)
437+
self._stack.pop_and_discard()
438+
self._call_function(func_var, abstract.Args(posargs=args))
439+
433440
def byte_POP_TOP(self, opcode):
434441
del opcode # unused
435442
self._stack.pop_and_discard()

0 commit comments

Comments
 (0)