-
Notifications
You must be signed in to change notification settings - Fork 4
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
Start codegen #30
Start codegen #30
Conversation
Seems fine to me -- doesn't look like there are any changes that break anything. |
return end; | ||
} | ||
|
||
char *init_int_literal(int val) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my understanding, what exactly does this do? Does it just push a new int with the specified value to the stack? Still getting there with the assembly.
Also, this is all fine for now, but in the future maybe we should have all of these functions also accept a FILE* fp
and print into there instead. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup
add rsp, 32"; | ||
|
||
return end; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is perhaps silly, but are all of these no-input functions not behaving as immutable global variables you are asking for copies of?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the conversation above, it will make sense once we reorganize this to write into files instead
No description provided.