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

feat(swingset): xsnap vat worker #2225

Merged
merged 23 commits into from
Jan 24, 2021
Merged

feat(swingset): xsnap vat worker #2225

merged 23 commits into from
Jan 24, 2021

Commits on Jan 24, 2021

  1. feat(xsnap): setImmediate and print

    In addition to detecting XS Machine quiescense so we can safely take
    snapshots, the supervisor has to detect vat queiscense so it can tell
    when a delivery is done.
    
    I have resorted to ad-hoc `fprintf()` at the C level for debugging
    enough to justify restoring print. Here we test that it's only
    available in the start compartment.
    
    note print() includes fflush()
    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    1ff6034 View commit details
    Browse the repository at this point in the history
  2. build(xsnap): don't set mxDebug in release builds

    fixes Agoric#2216
    
    only tested on lin, not mac nor win
    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    48d9b8b View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6aefa2f View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7caa380 View commit details
    Browse the repository at this point in the history
  5. feat(xsnap): return data from xsnap.evaluate()

    Using the .result property of a mutable object rather than
    the resolution of a promise is a little awkward, but it seems to work.
    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    19ad452 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    7119d81 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    98d0b2c View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    9ba6e65 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    51a30cd View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    69d08c7 View commit details
    Browse the repository at this point in the history
  11. feat(swingset): xsnap vat manager

     - build xsnap bootstrap bundles
     - bytes to tagged array and back
     - setBundle,  importBundle
     - syscall
     - delivery success symbol is ok, not deliverDone
     - Use Tagged type consistently;
       don't constrain tag to be string.
     - clean up logging: use parentLog(), trace(), ...
     - static typing for doProcess: capture dispatch while
       it's known to be not null
     - silence parentLog, workerLog for xsnap
     - no, handleSyscall doesn't return Tagged
     - inherit stdout, stderr in xsnap
     - vatid arg on doNotify is no more
    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    961f0b5 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    a19da62 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    c16d6ce View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    454362d View commit details
    Browse the repository at this point in the history
  15. refactor: avoid 2nd round trip to xsnap

      - manager: prune commandResult
      - supervisor: factor out "transport" logic as `ManagerPort`,
        separate from vat-worker `makeWorker()`
        - ManagerPort.handler provides `{ result?: ArrayBuffer }` idiom
          based on Promise<Tagged>
        - testLog uses ManagerPort.send
      - clean up redundant 'ok' tag in doMessage, doNotify
      - refactor: tagged -> item for consistency
    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    63e2eb1 View commit details
    Browse the repository at this point in the history
  16. feat(xsnap worker): pass console log messages to manager

     - prune 'starting xsnap' log msg (per code review)
     - handle rejection in ManagerPort.handler
    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    58dfb17 View commit details
    Browse the repository at this point in the history
  17. fix(xsnap): build args

    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    7df4d3b View commit details
    Browse the repository at this point in the history
  18. refactor(xsnap): fold in what's left of xs-vat-worker

      - prune obsolete locate.js
    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    f1b2000 View commit details
    Browse the repository at this point in the history
  19. chore(xsnap): move lockdown-shim out of src/ to avoid tsc errors

    move lockdown-shim.js and the rest of the SES bootstrap files from
    src/ to lib/ to avoid many tsc errors of the form...
    
    ```
    Error: ../../node_modules/ses/src/error/assert.js(24,20): error TS2304: Cannot find name 'StringablePayload'.
    ```
    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    1ebf699 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    aab7d0d View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    701e2f4 View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    d200428 View commit details
    Browse the repository at this point in the history
  23. chore(xsnap): provide non-trivial console in start compartment

    add TODO re other console methods with pointer to
    Agoric#2146
    dckc committed Jan 24, 2021
    Configuration menu
    Copy the full SHA
    37a658c View commit details
    Browse the repository at this point in the history