-
-
Notifications
You must be signed in to change notification settings - Fork 17
Comparing changes
Open a pull request
base repository: endbasic/endbasic
base: master
head repository: endbasic/endbasic
compare: context
- 9 commits
- 21 files changed
- 1 contributor
Commits on Dec 21, 2024
-
Pull Context out of exec_with_data
This is the first step in decoupling Context from exec to allow the calling user to control the execution loop.
Configuration menu - View commit details
-
Copy full SHA for bcc3d9e - Browse repository at this point
Copy the full SHA bcc3d9eView commit details -
Move the Image into the Context
The execution Context is what should track the Image (program and memory of the machine during execution), so move it there instead of keeping it at the Machine level.
Configuration menu - View commit details
-
Copy full SHA for c880c20 - Browse repository at this point
Copy the full SHA c880c20View commit details -
Separate compilation from execution
Instead of compiling code within exec(), make the caller do the compilation first to prepare a Context, and then as the Machine to execute it. This removes a "wart" that has existed for a long time because compilation should always have been kept separate.
Configuration menu - View commit details
-
Copy full SHA for c08aaa3 - Browse repository at this point
Copy the full SHA c08aaa3View commit details -
Move last_error into the Context/Scope
The last_error is dependent on the program being run by the Context, so move it there and bubble access through the Scope.
Configuration menu - View commit details
-
Copy full SHA for 267cf5a - Browse repository at this point
Copy the full SHA 267cf5aView commit details -
Pull upcall handling code into a separate function
To keep the execution loop simpler, move upcall handling into its own function. This function is private for now, but it will become public once we are able to pull out the whole execution loop to the caller.
Configuration menu - View commit details
-
Copy full SHA for 10ede9e - Browse repository at this point
Copy the full SHA 10ede9eView commit details -
Now that Scope requires multiple parts of the Context, pass in the Context as a parameter. This will allow us to interact with even more parts of the Context.
Configuration menu - View commit details
-
Copy full SHA for c70a2c5 - Browse repository at this point
Copy the full SHA c70a2c5View commit details -
Handle chained executions (RUN) via the main loop
Instead of having the RUN command execute the stored program in a nested machine invocation, chain the execution contexts so that the machine's main loop can handle the nesting on its own. This should allow exposing the execution loop to callers as a fundamental primitive.
Configuration menu - View commit details
-
Copy full SHA for c21e5f9 - Browse repository at this point
Copy the full SHA c21e5f9View commit details -
Pull the main loop from the Machine to the REPL
Add a new Machine::resume() method that takes a Context and returns control as soon as the machine hits an interruptible point. This allows the REPL to implement its own execution loop and is one step more towards the removal of async from the core.
Configuration menu - View commit details
-
Copy full SHA for 5358f32 - Browse repository at this point
Copy the full SHA 5358f32View commit details -
Configuration menu - View commit details
-
Copy full SHA for 29ee707 - Browse repository at this point
Copy the full SHA 29ee707View commit details
This comparison is taking too long to generate.
Unfortunately it looks like we can’t render this comparison for you right now. It might be too big, or there might be something weird with your repository.
You can try running this command locally to see the comparison on your machine:
git diff master...context