Fix validation of non-void if blocks with no else
authorkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Dec 2016 02:38:27 +0000 (02:38 +0000)
committerkeith_miller@apple.com <keith_miller@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Dec 2016 02:38:27 +0000 (02:38 +0000)
commit19c8b9f8e08826daa163ccdd08d3cc1d232883bf
tree4a7d3fff7ecfa7b523fa46e48c941a8dfd9b8058
parentf2c5f94aca69382312dc4ad18b053deb1fcf676a
Fix validation of non-void if blocks with no else
https://bugs.webkit.org/show_bug.cgi?id=165938

Reviewed by Saam Barati.

JSTests:

Add a new failing test and a fix an existing one.

* wasm/function-tests/dead-call.js:
* wasm/function-tests/if-no-else-non-void.js: Added.

Source/JavaScriptCore:

We should not have been allowing non-void if-blocks that don't
have an else. Since this causes a value to be placed on the
stack that only appears under some control flow and not another.

* wasm/WasmValidate.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@209899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
JSTests/ChangeLog
JSTests/wasm/function-tests/dead-call.js
JSTests/wasm/function-tests/if-no-else-non-void.js [new file with mode: 0644]
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wasm/WasmValidate.cpp