js-on-sx: object computed keys + insertion-order tracking
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 24s

This commit is contained in:
2026-05-08 18:16:32 +00:00
parent a8d0dfb38a
commit 0d99b5dfe8
4 changed files with 192 additions and 19 deletions

View File

@@ -391,7 +391,7 @@
(list
(js-sym "js-new-call")
(js-transpile callee)
(cons (js-sym "list") (map js-transpile args)))))
(cons (js-sym "js-args") (map js-transpile args)))))
(define
js-transpile-array
@@ -409,7 +409,7 @@
(list (js-sym "list") "js-spread" (js-transpile (nth e 1)))
(list (js-sym "list") "js-value" (js-transpile e))))
elts))
(cons (js-sym "list") (map js-transpile elts)))))
(cons (js-sym "js-make-list") (map js-transpile elts)))))
(define
js-has-spread?
@@ -449,7 +449,7 @@
(entries)
(list
(js-sym "let")
(list (list (js-sym "_obj") (list (js-sym "dict"))))
(list (list (js-sym "_obj") (list (js-sym "js-make-obj"))))
(cons
(js-sym "begin")
(append
@@ -457,9 +457,12 @@
(fn
(entry)
(list
(js-sym "dict-set!")
(js-sym "js-obj-set!")
(js-sym "_obj")
(get entry :key)
(if
(contains? (keys entry) :computed-key)
(list (js-sym "js-to-string") (js-transpile (get entry :computed-key)))
(get entry :key))
(js-transpile (get entry :value))))
entries)
(list (js-sym "_obj")))))))