fix some KissInterp2 side-effects on exps
Some checks failed
CI / test (push) Failing after 56s
CI / test-core (14, ubuntu-latest, 3.x, nodejs) (push) Failing after 1m42s
CI / test-core (14, ubuntu-latest, 3.x, interp) (push) Failing after 1m45s
CI / test-core (14, ubuntu-latest, 3.x, py) (push) Failing after 2m14s
CI / test-core (14, ubuntu-latest, 3.x, cpp) (push) Failing after 2m51s
CI / test-core (14, ubuntu-latest, 3.x, js) (push) Failing after 1m53s

This commit is contained in:
2025-11-09 19:57:22 -06:00
parent f2e46e0b7b
commit 6e8b2938b5

View File

@@ -47,7 +47,7 @@
=>"let"
->[args cc]
(let [bindings (first args)
bindings (Prelude.bindingList bindings "let")
bindings (.copy (Prelude.bindingList bindings "let"))
body (rest args)
scope (new Map<String,Dynamic>)]
(localScopes.push scope)
@@ -135,7 +135,6 @@
(cc (Reflect.callMethod null f values)))))
// Method/function call
((CallExp callable args)
(transformToFieldExp callable)
(evalCC callable ->f {
(_evalAllCC args ->values
(case callable
@@ -189,7 +188,7 @@
(cc f)
(return)))
// Check for field access
(when (transformToFieldExp exp)
(whenLet [exp (transformToFieldExp exp)]
(evalCC exp cc)
(return))
// Check for ident aliases
@@ -206,12 +205,14 @@
(throw "Can't interpret $(Reader.toString def)"))))
(otherwise (throw "Can't interpret ${input}"))))
(method :Void _evalAllCC [:Array<Dynamic> inputs :Array<Dynamic>->Void cc &opt :Array<Dynamic> outputs]
(unless outputs (set outputs []))
(method :Void _evalAllCC [:Array<Dynamic> inputs :Array<Dynamic>->Void cc]
(__evalAllCC (inputs.copy) cc []))
(method :Void __evalAllCC [:Array<Dynamic> inputs :Array<Dynamic>->Void cc :Array<Dynamic> outputs]
(if inputs
(evalCC (inputs.shift) ->v {
(outputs.push v)
(_evalAllCC inputs cc outputs)
(__evalAllCC inputs cc outputs)
})
(cc outputs)))
@@ -227,7 +228,5 @@
(let [safe (StringTools.startsWith part "?")]
(when safe (set part (part.substr 1)))
(set newExp (makeExp (FieldExp part newExp safe)))))
(set exp.def newExp.def)
(return true)))))
(never otherwise))
false)
(return newExp)))))
(otherwise (return null))))