-
Notifications
You must be signed in to change notification settings - Fork 60
Interpreter: Make the function call and other basic instructions work #1752
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
Interpreter: Make the function call and other basic instructions work #1752
Conversation
|
UPDATE:
|
|
If you base this PR on the branch of your other PR, the changes of the other PR won't show up here, and when we merge that PR if we delete the branch in this repo, this PR will automatically be relative to main |
|
@dabrahams I couldn't base the PR correctly as I raised the PR using the fork I created. I currently don't have access to push branches in this repo, need that access for the same. |
|
UPDATE: Implemented unified memory addressing, that was necessary for supporting ConstantString and pointer arithmetic. Because, its already good change in current design, will wait for some initial feedback before implementing more instructions. I am planning to implement other instructions in subsequent PRs as this PR already is covering multiple grounds. |
|
Closing this PR as it was opened from my fork and would again block me opening incremental PRs. Raised #1753 from local branch for the same purposes. |
This PR also have changes of my previous PR because those are not merged yet, but I need those for testing.
Instructions implemented:
Instructions UN-implemented
Design Changes
Unified Memory Representation
Motivation
For supporting pointer operations, we need mechanism to convert a BuiltIn pointer type to Address representation in VM.
However, machine pointer width can be even 32-bits. Conversion of pointer to address that has UUID and things is not possible without huge extra storage. Also discriminator bit would used if there are 2 kind of addresses.
Design
During initialization of interpreter, stack is allocated that is nothing but Memory.Allocation. All the local variables live in that allocation and registers, returnAddress, parameters live in stack frames.
Fixes