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
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:
@@ -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))))
|
||||
Reference in New Issue
Block a user