Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Bug-let in pick example #51

Closed
fgmccabe opened this issue Dec 18, 2018 · 1 comment
Closed

Bug-let in pick example #51

fgmccabe opened this issue Dec 18, 2018 · 1 comment

Comments

@fgmccabe
Copy link

If I am not mistaken, there is a bug in this example:

(func $g
(param $p1 (ref $pair)) (param $p2 (ref $pair)) (param $pick (ref $pick))
(result (ref $C))
(if (i31ref.get_u (cast_down i31ref (get_local $p1)))
(then (cast_down (ref $C) (call_ref $pick (get_local $p2))))
(else (call $new_C))
)
)

Should this be:
(func $g
(param $p1 (ref $pair)) (param $p2 (ref $pair)) (param $pick (ref $pick))
(result (ref $C))
(if (i31ref.get_u (cast_down i31ref (call_ref $pick (get_local $p1))))
(then (cast_down (ref $C) (call_ref $pick (get_local $p2))))
(else (call $new_C))
)
)

??

@rossberg
Copy link
Member

rossberg commented Jan 7, 2019

I think you are right. Fixed, thanks!

@rossberg rossberg closed this as completed Jan 7, 2019
rossberg pushed a commit that referenced this issue Feb 24, 2021
* [js-api] Remove spurious argument to ToWebAssemblyValue().

Fixes #51.

* [js-api] Extend the WebAssembly.Table API.

Fixes #22.
Fixes #67.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants