eliminate multiple return statements for wasm2asm functions#1448
Conversation
kripken
left a comment
There was a problem hiding this comment.
lgtm, thanks!
Not sure what the CI errors are - maybe not all tests were updated?
| &static_cast<Block*>(func->body)->list : nullptr; | ||
| bool endsInReturn = | ||
| (isBodyBlock && ((*stats)[stats->size()-1]->_id == Expression::ReturnId)); | ||
| (isBodyBlock && ((*stats)[stats->size()-1]->_id == Expression::ReturnId)) || |
There was a problem hiding this comment.
While you're here, please change ->_id == Expression::ReturnId to ->is<Return>(). (Also the same happens with Block a few lines above.)
Sigh, apparently CI checks out extra tests in a different repo and runs those, too? How are those supposed to be updated in parallel? |
|
Specifically, |
|
Is that the Perhaps the only thing missing is to add a few lines to |
|
Oh, I see, I don't have to update a separate repo, I just have to have the repo checked out, and |
594ca6b to
e4d0710
Compare
|
Last errors look like binaryen.js, which means we need to update the wasm2asm component in the JS port too. If you have emscripten set up |
200f05b to
04332cf
Compare
|
@kripken I don't know where to go from here. The test passes locally for me, and I think I've regenerated the JS files correctly. Can you try regenerating the files? |
|
I think the only problem left here might be the merge conflict. I merged in master and rebuilt here and it looks fine. We can just merge that branch in, or you can merge it into here, either way. |
04332cf to
7d8462d
Compare
|
Sigh, last thing to fix: Is this a known potential problem? I guess it's possible that the change might have eliminated a return statement that was there before, and thus the test never returns, or something? |
|
I've seen that before, it seemed like a random CI failure. Might be ok after a restart. |
This change eliminates one issue that prevents asm.js validation of the generated code, see WebAssembly#1443.
7d8462d to
9affe82
Compare
Hm, OK. Had to fix another merge conflict anyway, so rebased and pushed again. We'll see if CI is happy now. |
|
Looks good! :) |
This change eliminates one issue that prevents asm.js validation of the
generated code, see #1443.