Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: endbasic/endbasic
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: endbasic/endbasic
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: context
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 9 commits
  • 21 files changed
  • 1 contributor

Commits on Dec 21, 2024

  1. 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.
    jmmv committed Dec 21, 2024
    Configuration menu
    Copy the full SHA
    bcc3d9e View commit details
    Browse the repository at this point in the history
  2. 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.
    jmmv committed Dec 21, 2024
    Configuration menu
    Copy the full SHA
    c880c20 View commit details
    Browse the repository at this point in the history
  3. 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.
    jmmv committed Dec 21, 2024
    Configuration menu
    Copy the full SHA
    c08aaa3 View commit details
    Browse the repository at this point in the history
  4. 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.
    jmmv committed Dec 21, 2024
    Configuration menu
    Copy the full SHA
    267cf5a View commit details
    Browse the repository at this point in the history
  5. 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.
    jmmv committed Dec 21, 2024
    Configuration menu
    Copy the full SHA
    10ede9e View commit details
    Browse the repository at this point in the history
  6. Simplify Scope creation

    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.
    jmmv committed Dec 21, 2024
    Configuration menu
    Copy the full SHA
    c70a2c5 View commit details
    Browse the repository at this point in the history
  7. 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.
    jmmv committed Dec 21, 2024
    Configuration menu
    Copy the full SHA
    c21e5f9 View commit details
    Browse the repository at this point in the history
  8. 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.
    jmmv committed Dec 21, 2024
    Configuration menu
    Copy the full SHA
    5358f32 View commit details
    Browse the repository at this point in the history
  9. i don't know what this is

    jmmv committed Dec 21, 2024
    Configuration menu
    Copy the full SHA
    29ee707 View commit details
    Browse the repository at this point in the history
Loading