Remove duplicate routine_address == 0 check from op_call
The _call() method already handles this case, so the check in op_call is redundant.
This commit is contained in:
parent
e6b63622fa
commit
0f5fada29e
1 changed files with 1 additions and 11 deletions
|
|
@ -605,17 +605,7 @@ class ZCpu:
|
|||
# call in v1-3
|
||||
def op_call(self, routine_addr, *args):
|
||||
"""Call the routine r1, passing it any of r2, r3, r4 if defined."""
|
||||
# Calling address 0 is a no-op that returns false (0).
|
||||
if routine_addr == 0:
|
||||
self._write_result(0)
|
||||
return
|
||||
addr = self._memory.packed_address(routine_addr)
|
||||
return_addr = self._opdecoder.get_store_address()
|
||||
current_addr = self._opdecoder.program_counter
|
||||
new_addr = self._stackmanager.start_routine(
|
||||
addr, return_addr, current_addr, args
|
||||
)
|
||||
self._opdecoder.program_counter = new_addr
|
||||
self._call(routine_addr, args, True)
|
||||
|
||||
def op_call_vs(self, routine_addr, *args):
|
||||
"""See op_call."""
|
||||
|
|
|
|||
Loading…
Reference in a new issue