compile (set! *var* val)
The analyzer punted set! as uncompilable. Add it as a special form: (set! sym val) on a var emits jolt-var-set, which updates the innermost thread binding (or the root when unbound), returning val. A local target (deftype mutable field) or an interop (.-field) target stays uncompilable for now. Also defines *warn-on-reflection* (false) so set! on it resolves. SCI load 186 -> 196/218.
This commit is contained in:
parent
86aa89c832
commit
e6ee17b055
6 changed files with 53 additions and 36 deletions
|
|
@ -96,6 +96,7 @@
|
|||
(= op :do) (assoc node :statements (mapv f (get node :statements))
|
||||
:ret (f (get node :ret)))
|
||||
(= op :throw) (assoc node :expr (f (get node :expr)))
|
||||
(= op :set-var) (assoc node :val (f (get node :val)))
|
||||
(= op :invoke) (assoc node :fn (f (get node :fn))
|
||||
:args (mapv f (get node :args)))
|
||||
(= op :vector) (assoc node :items (mapv f (get node :items)))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue