Bug 149203

Summary: Fix asm.js errors in WebAssembly tests
Product: WebKit Reporter: Sukolsak Sakshuwong <sukolsak>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 146064    
Attachments:
Description Flags
Patch none

Description Sukolsak Sakshuwong 2015-09-15 19:01:48 PDT
Our WebAssembly implementation uses asm.js for testing. Using Firefox to parse asm.js reveals many errors that are not caught by pack-asmjs. For example,
- asm.js does not allow the use of the multiplication operator (*) to multiply two integers, because the result can be so large that some lower bits of precision are lost. Math.imul is used instead.
- an int variable must be coerced to either signed (via x|0) or unsigned (via x>>>0) before it's returned.
Comment 1 Sukolsak Sakshuwong 2015-09-15 19:04:47 PDT
Created attachment 261280 [details]
Patch
Comment 2 Geoffrey Garen 2015-09-15 20:38:30 PDT
Comment on attachment 261280 [details]
Patch

r=me
Comment 3 WebKit Commit Bot 2015-09-15 20:52:35 PDT
Comment on attachment 261280 [details]
Patch

Clearing flags on attachment: 261280

Committed r189844: <http://trac.webkit.org/changeset/189844>
Comment 4 WebKit Commit Bot 2015-09-15 20:52:37 PDT
All reviewed patches have been landed.  Closing bug.