Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
PiroHiroPiro opened this issue Jan 7, 2019 · 0 comments

Comments

@PiroHiroPiro
Copy link

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): 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant