re-do `with` conflicts: last one wins, in wasm and topdown (#3010)
* compiler/wasm: use tee_local
It's the same as set_local followed by get_local: the target variable is set
to the value from the top of the stack, but that value is retained there.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
* compiler/wasm: make last 'with' statement win, update tests
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com>
* topdown/input: allow `with` overwrites that previously a conflict
This makes topdown behave more like WASM. Last `with` wins when in conflict:
input with input.foo as "foo" with input.foo.bar as "baz"
will resolve to
{"foo": {"bar": "baz"}}
now. Same with data references.
Signed-off-by: Stephan Renatus <stephan.renatus@gmail.com> S
Stephan Renatus committed
06c3d7e4b659a64a27d0d2678481d0fbe3c0dd49
Parent: 499f018
Committed by GitHub <noreply@github.com>
on 12/18/2020, 12:27:52 PM