Recompile all 26 .sxbc with define-library wrappers + fix eval/JIT
All 26 browser modules recompiled with define-library/import forms. Compilation works without vm-compile-adapter (JIT pre-compilation hangs with library wrappers in some JIT paths — skipped for now, CEK compilation is ~34s total). Key fixes: - eval command: import-aware loop that handles define-library/import locally without touching the Python bridge pipe (avoids deadlock) - compile-modules.js: skip vm-compile-adapter, bump timeout 2621/2621 OCaml tests passing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,3 +1,41 @@
|
||||
|
||||
|
||||
(define-library (sx vm)
|
||||
(export
|
||||
make-upvalue-cell
|
||||
uv-get
|
||||
uv-set!
|
||||
make-vm-code
|
||||
make-vm-closure
|
||||
make-vm-frame
|
||||
make-vm
|
||||
vm-push
|
||||
vm-pop
|
||||
vm-peek
|
||||
frame-read-u8
|
||||
frame-read-u16
|
||||
frame-read-i16
|
||||
vm-push-frame
|
||||
code-from-value
|
||||
vm-closure?
|
||||
vm-call
|
||||
frame-local-get
|
||||
frame-local-set
|
||||
frame-upvalue-get
|
||||
frame-upvalue-set
|
||||
vm-global-get
|
||||
vm-resolve-ho-form
|
||||
vm-call-external
|
||||
vm-global-set
|
||||
env-walk
|
||||
env-walk-set!
|
||||
vm-create-closure
|
||||
vm-run
|
||||
vm-step
|
||||
vm-call-closure
|
||||
vm-execute-module)
|
||||
(begin
|
||||
|
||||
(define make-upvalue-cell (fn (value) {:uv-value value}))
|
||||
|
||||
(define uv-get (fn (cell) (get cell "uv-value")))
|
||||
@@ -516,6 +554,10 @@
|
||||
(vm-push vm (inc (vm-pop vm)))
|
||||
(= op 175)
|
||||
(vm-push vm (dec (vm-pop vm)))
|
||||
(= op 112)
|
||||
(let
|
||||
((request (vm-pop vm)))
|
||||
(error (str "VM: IO suspension (OP_PERFORM) — request: " request)))
|
||||
:else (error (str "VM: unknown opcode " op))))))
|
||||
|
||||
(define
|
||||
@@ -552,3 +594,9 @@
|
||||
(dict-set! vm "frames" (list frame))
|
||||
(vm-run vm)
|
||||
(vm-pop vm)))))
|
||||
|
||||
|
||||
)) ;; end define-library
|
||||
|
||||
;; Re-export to global namespace for backward compatibility
|
||||
(import (sx vm))
|
||||
|
||||
Reference in New Issue
Block a user