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

add a higher-level IL to use as a target for source2il #21

Merged
merged 25 commits into from
Sep 5, 2024

Commits on Aug 30, 2024

  1. add the L10 grammar specification

    `spec` is updated too.
    zerbina committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    eebf4b2 View commit details
    Browse the repository at this point in the history
  2. tests: add a test suite for pass10

    It covers everything relevant to the lowering pass (unless I missed
    something). The output uses a shorter formatting that doesn't match
    what `pretty` produces -- a separate change for supporting S-expr
    normalization in the tester will be necessary.
    zerbina committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    7375fb5 View commit details
    Browse the repository at this point in the history
  3. implement the lowering pass for L10 -> L4

    It's fully functional (according to the test suite), though not very
    optimized, both in terms of output it produces and how it does so.
    zerbina committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    2043f3a View commit details
    Browse the repository at this point in the history
  4. tests: add the test runner for pass10

    It's a run-of-the-mill test runner. Given the repetition, common parts
    of the test runners should move into a separate module at one point.
    zerbina committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    4726985 View commit details
    Browse the repository at this point in the history
  5. tests: temporarily disable t01_loop

    The necessary runner support for disabling execution is still missing,
    and the test would only result in an infinite loop.
    zerbina committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    f94756a View commit details
    Browse the repository at this point in the history
  6. ci: verify lang10.md

    zerbina committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    070cecd View commit details
    Browse the repository at this point in the history

Commits on Aug 31, 2024

  1. pass10: refactor implicit argument handling

    The result stays the same, but how one gets there changes.
    
    There are no "implicit parameter", only "implicit arguments". Attaching
    the implicitness to the callee (i.e., target block) rather than the
    caller (i.e., block exit) precludes some future optimizations, such as
    merging basic blocks, in addition to just being wrong conceptually.
    zerbina committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    600a43a View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    697f00f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2a25efd View commit details
    Browse the repository at this point in the history
  4. pass10: more efficient loop handling

    Only loops are iterated twice now, greatly reducing the time the pass
    takes when there are no loops. Further optimizations are possible, such
    as not following the back edge when there are no changes, but are not
    implemented yet.
    
    The documentation is also improved a bit.
    zerbina committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    0dd9786 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    fa8d3db View commit details
    Browse the repository at this point in the history
  6. pass10: fix infinite loop in lowerProc

    A single-block `Loop` resulted in the forward propagation pass getting
    stuck.
    zerbina committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    f15dd16 View commit details
    Browse the repository at this point in the history
  7. tests: make t01_loop and t01_unreachable workable

    The test runner now supports the `--compileOnly` argument, which
    disables validation and execution of the produced VM bytecode.
    zerbina committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    4967801 View commit details
    Browse the repository at this point in the history
  8. tests: correct the t01_loop expected output

    It didn't reflect reality.
    zerbina committed Aug 31, 2024
    Configuration menu
    Copy the full SHA
    7fc9848 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2024

  1. Configuration menu
    Copy the full SHA
    ede3667 View commit details
    Browse the repository at this point in the history
  2. tests: mark pass10 test output as being S-expressions

    This fixes the test failures.
    zerbina committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    2b25c0f View commit details
    Browse the repository at this point in the history
  3. pass10: improve pinned local handling

    Pinned locals are now only passed through to blocks/continuations that
    perform an indirect memory access.
    zerbina committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    809a38d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    17ff245 View commit details
    Browse the repository at this point in the history
  5. pass10: implement procedure parameter handling

    Procedure parameters must unconditionally be registered with the first
    basic block.
    zerbina committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    07baf9c View commit details
    Browse the repository at this point in the history
  6. pass10/runner: don't fail on VM errors

    Some of the pinned local tests trigger an illegal access error at run-
    time, which is fine.
    zerbina committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    2b2d10b View commit details
    Browse the repository at this point in the history
  7. pass10: rename disabled to pinned

    The new name more accurately describes which locals the set contains.
    zerbina committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    12bdbf0 View commit details
    Browse the repository at this point in the history
  8. tests: fix test failures

    Some `.expected` files were not marked as storing S-expressions.
    zerbina committed Sep 1, 2024
    Configuration menu
    Copy the full SHA
    ddc04de View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. Configuration menu
    Copy the full SHA
    e280798 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    043964f View commit details
    Browse the repository at this point in the history

Commits on Sep 5, 2024

  1. tests: fix a typo

    Co-authored-by: Saem Ghani <[email protected]>
    zerbina and saem authored Sep 5, 2024
    Configuration menu
    Copy the full SHA
    10ef070 View commit details
    Browse the repository at this point in the history