Bug 165888 - WebAssembly: implement init_expr for Element
Summary: WebAssembly: implement init_expr for Element
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
: 169183 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-12-14 19:35 PST by Saam Barati
Modified: 2017-03-06 18:10 PST (History)
14 users (show)

See Also:


Attachments
WIP (27.02 KB, patch)
2017-03-03 18:46 PST, Saam Barati
no flags Details | Formatted Diff | Diff
patch (15.35 KB, patch)
2017-03-05 11:36 PST, Saam Barati
keith_miller: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2016-12-14 19:35:53 PST
...
Comment 1 Radar WebKit Bug Importer 2016-12-20 14:23:34 PST
<rdar://problem/29760199>
Comment 2 Saam Barati 2017-03-03 18:46:46 PST
Created attachment 303375 [details]
WIP

Needs a test. Also contains part of another patch inside of it.
Comment 3 Saam Barati 2017-03-05 10:55:56 PST
*** Bug 169183 has been marked as a duplicate of this bug. ***
Comment 4 Saam Barati 2017-03-05 11:36:31 PST
Created attachment 303460 [details]
patch
Comment 5 Keith Miller 2017-03-05 19:22:31 PST
Comment on attachment 303460 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=303460&action=review

r=me with a comment.

> Source/JavaScriptCore/wasm/WasmModuleParser.cpp:442
> +        WASM_PARSER_FAIL_IF(initExprType != I32, elementNum, "th Element init_expr must produce an i32");

typo: the*

I think I would say "Element init_expr must return an i32" though.
Comment 6 Saam Barati 2017-03-06 13:44:44 PST
landed in:
https://trac.webkit.org/changeset/213465
Comment 7 Carlos Alberto Lopez Perez 2017-03-06 16:20:35 PST
(In reply to comment #6)
> landed in:
> https://trac.webkit.org/changeset/213465

This has caused the test wasm.yaml/wasm/js-api/element.js to fail:


https://build.webkit.org/builders/Apple%20El%20Capitan%20Release%20JSC%20%28Tests%29/builds/12917/steps/jscore-test/logs/stdio

Running wasm.yaml/wasm/js-api/globals-export.js.default-wasm
wasm.yaml/wasm/js-api/element.js.default-wasm: Exception: Error: Expected to throw a CompileError with message "WebAssembly.Module doesn't parse at byte 58 / 72: 0th Element init_expr must produce an i32", got Error with message "WebAssembly.Module doesn't parse at byte 58 / 72: Element init_expr must produce an i32 (evaluating 'new WebAssembly.Module(bin)')"
wasm.yaml/wasm/js-api/element.js.default-wasm: _fail@/Volumes/Data/slave/elcapitan-release-tests-jsc/build/WebKitBuild/Release/jsc-stress-results/.tests/wasm.yaml/wasm/assert.js:27:20
wasm.yaml/wasm/js-api/element.js.default-wasm: _throws@/Volumes/Data/slave/elcapitan-release-tests-jsc/build/WebKitBuild/Release/jsc-stress-results/.tests/wasm.yaml/wasm/assert.js:128:14
wasm.yaml/wasm/js-api/element.js.default-wasm: module code@/Volumes/Data/slave/elcapitan-release-tests-jsc/build/WebKitBuild/Release/jsc-stress-results/.tests/wasm.yaml/wasm/js-api/element.js:218:18
wasm.yaml/wasm/js-api/element.js.default-wasm: evaluate@[native code]
wasm.yaml/wasm/js-api/element.js.default-wasm: moduleEvaluation@[native code]
wasm.yaml/wasm/js-api/element.js.default-wasm: [native code]
wasm.yaml/wasm/js-api/element.js.default-wasm: promiseReactionJob@[native code]
Running wasm.yaml/wasm/js-api/globals-import.js.default-wasm
wasm.yaml/wasm/js-api/element.js.default-wasm: ERROR: Unexpected exit code: 3
Comment 8 Saam Barati 2017-03-06 17:36:13 PST
Will fix now.
Comment 9 Saam Barati 2017-03-06 18:10:54 PST
Landed fix in:
https://trac.webkit.org/changeset/213484