Skip to content

[projects/08] _push_referenced_address_onto_stack function will take 2 positional argument. #1

Open
@PiroHiroPiro

Description

@PiroHiroPiro

def _push_referenced_address_onto_stack(virtual_memory_segment):

This is runtime error,

$ ./VMTranslator.py FunctionCalls/SimpleFunction/                                                                                                                
Traceback (most recent call last):
  File "./VMTranslator.py", line 741, in <module>
    Main(input).run_program()
  File "./VMTranslator.py", line 684, in run_program
    init_code = self.function_translator.init_code()
  File "./VMTranslator.py", line 475, in init_code
    *self.translate_function_call(VMCommand('call Sys.init 0'))
  File "./VMTranslator.py", line 532, in translate_function_call
    *self._push_referenced_address_onto_stack('LCL'),
TypeError: _push_referenced_address_onto_stack() takes 1 positional argument but 2 were given

So, I think it should be modified as follows.

def _push_referenced_address_onto_stack( **self** , virtual_memory_segment): 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions