Skip to content
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

Merged
merged 5 commits into from
Jun 24, 2024
Merged

Start codegen #30

merged 5 commits into from
Jun 24, 2024

Conversation

JakeRoggenbuck
Copy link
Member

No description provided.

@TheCrystalKeeper
Copy link
Collaborator

Seems fine to me -- doesn't look like there are any changes that break anything.

return end;
}

char *init_int_literal(int val) {
Copy link
Contributor

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?

Copy link
Member Author

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;
}
Copy link
Collaborator

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?

Copy link
Contributor

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

@NicoBliss NicoBliss merged commit 2891e98 into jabacat:main Jun 24, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

4 participants