Bug 186552 - Adopt the new WebAssembly.Global system
Summary: Adopt the new WebAssembly.Global system
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebAssembly (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Yusuke Suzuki
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-11 18:51 PDT by Keith Miller
Modified: 2019-12-03 18:33 PST (History)
12 users (show)

See Also:


Attachments
Patch (112.85 KB, patch)
2019-11-29 01:02 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (102.12 KB, patch)
2019-11-29 01:04 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (102.94 KB, patch)
2019-11-29 01:09 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (103.64 KB, patch)
2019-11-29 01:15 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (104.57 KB, patch)
2019-11-29 01:22 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (104.57 KB, patch)
2019-11-29 01:23 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (169.87 KB, patch)
2019-11-29 03:58 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (173.29 KB, patch)
2019-11-29 04:11 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (169.14 KB, patch)
2019-11-29 04:13 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (176.41 KB, patch)
2019-11-29 10:35 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (185.30 KB, patch)
2019-11-30 15:01 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (489.05 KB, patch)
2019-12-02 21:58 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (489.14 KB, patch)
2019-12-02 22:05 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (485.92 KB, patch)
2019-12-03 11:53 PST, Yusuke Suzuki
no flags Details | Formatted Diff | Diff
Patch (486.08 KB, patch)
2019-12-03 12:01 PST, Yusuke Suzuki
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 Keith Miller 2018-06-11 18:51:15 PDT
Wasm modules can now export mutable globals, which are an object rather than a Number. See: https://github.com/WebAssembly/mutable-global.
Comment 1 Radar WebKit Bug Importer 2018-06-11 18:51:41 PDT
<rdar://problem/41030068>
Comment 2 Yusuke Suzuki 2019-11-29 01:02:48 PST
Created attachment 384483 [details]
Patch
Comment 3 Yusuke Suzuki 2019-11-29 01:04:48 PST
Created attachment 384484 [details]
Patch
Comment 4 Yusuke Suzuki 2019-11-29 01:09:25 PST
Created attachment 384485 [details]
Patch
Comment 5 Yusuke Suzuki 2019-11-29 01:15:55 PST
Created attachment 384486 [details]
Patch
Comment 6 Yusuke Suzuki 2019-11-29 01:22:02 PST
Created attachment 384488 [details]
Patch
Comment 7 Yusuke Suzuki 2019-11-29 01:23:08 PST
Created attachment 384489 [details]
Patch
Comment 8 Yusuke Suzuki 2019-11-29 03:58:10 PST
Created attachment 384495 [details]
Patch
Comment 9 Yusuke Suzuki 2019-11-29 04:11:36 PST
Created attachment 384496 [details]
Patch
Comment 10 Yusuke Suzuki 2019-11-29 04:13:25 PST
Created attachment 384497 [details]
Patch
Comment 11 Yusuke Suzuki 2019-11-29 10:35:08 PST
Created attachment 384520 [details]
Patch
Comment 12 Yusuke Suzuki 2019-11-30 15:01:18 PST
Created attachment 384550 [details]
Patch
Comment 13 Yusuke Suzuki 2019-12-02 21:58:53 PST
Created attachment 384688 [details]
Patch
Comment 14 Yusuke Suzuki 2019-12-02 22:05:04 PST
Created attachment 384689 [details]
Patch
Comment 15 Saam Barati 2019-12-03 00:03:19 PST
Comment on attachment 384689 [details]
Patch

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

> Source/JavaScriptCore/ChangeLog:25
> +        We also put Wasm related JSCells in IsoSubspace.

it feels like this should be its own patch IMO
Comment 16 Yusuke Suzuki 2019-12-03 11:30:46 PST
(In reply to Saam Barati from comment #15)
> Comment on attachment 384689 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=384689&action=review
> 
> > Source/JavaScriptCore/ChangeLog:25
> > +        We also put Wasm related JSCells in IsoSubspace.
> 
> it feels like this should be its own patch IMO

Splitting now.
Comment 17 Yusuke Suzuki 2019-12-03 11:53:32 PST
Created attachment 384732 [details]
Patch
Comment 18 Yusuke Suzuki 2019-12-03 12:01:22 PST
Created attachment 384733 [details]
Patch
Comment 19 Yusuke Suzuki 2019-12-03 12:01:41 PST
Small test fix, the existing one was wrong.
Comment 20 Keith Miller 2019-12-03 13:19:48 PST
Comment on attachment 384733 [details]
Patch

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

r=me.

> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:1266
> +        if (Arg::isValidAddrForm(offset, B3::Width64))

Can we add ASSERT(global.mutability == Mutable);?

> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:1277
> +            auto cell = g64();

Would this be simpler as a patchpoint that calls the MacroAssembler write barrier? I don't think Air will end up doing any optimizations on this.

> JSTests/wasm/spec-tests/call.wast.js:-3
> -let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x81\x81\x80\x80\x00\x18\x60\x02\x7f\x7f\x01\x7f\x60\x00\x01\x7f\x60\x00\x01\x7e\x60\x00\x01\x7d\x60\x00\x01\x7c\x60\x00\x02\x7f\x7e\x60\x01\x7f\x01\x7f\x60\x01\x7e\x01\x7e\x60\x01\x7d\x01\x7d\x60\x01\x7c\x01\x7c\x60\x02\x7f\x7c\x02\x7f\x7c\x60\x02\x7f\x7f\x02\x7f\x7f\x60\x02\x7d\x7c\x02\x7c\x7d\x60\x02\x7c\x7f\x02\x7f\x7c\x60\x02\x7d\x7f\x01\x7f\x60\x02\x7f\x7e\x01\x7e\x60\x02\x7c\x7d\x01\x7d\x60\x02\x7e\x7c\x01\x7c\x60\x00\x02\x7f\x7c\x60\x00\x02\x7f\x7f\x60\x00\x02\x7c\x7d\x60\x02\x7e\x7e\x01\x7e\x60\x01\x7e\x01\x7f\x60\x00\x00\x03\xcd\x80\x80\x80\x00\x4c\x01\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\x0c\x0d\x0e\x0f\x10\x11\x01\x02\x03\x04\x05\x01\x02\x03\x04\x01\x02\x03\x04\x12\x13\x14\x12\x01\x01\x13\x07\x15\x07\x16\x16\x17\x17\x17\x01\x01\x01\x01\x01\x01\x01\x01\x00\x01\x01\x01\x17\x17\x01\x01\x17\x01\x01\x01\x01\x01\x06\x08\x03\x01\x01\x01\x01\x01\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x01\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x06\x86\x80\x80\x80\x00\x01\x7f\x01\x41\x0a\x0b\x07\xa9\x87\x80\x80\x00\x37\x08\x74\x79\x70\x65\x2d\x69\x33\x32\x00\x11\x08\x74\x79\x70\x65\x2d\x69\x36\x34\x00\x12\x08\x74\x79\x70\x65\x2d\x66\x33\x32\x00\x13\x08\x74\x79\x70\x65\x2d\x66\x36\x34\x00\x14\x0c\x74\x79\x70\x65\x2d\x69\x33\x32\x2d\x69\x36\x34\x00\x15\x0e\x74\x79\x70\x65\x2d\x66\x69\x72\x73\x74\x2d\x69\x33\x32\x00\x16\x0e\x74\x79\x70\x65\x2d\x66\x69\x72\x73\x74\x2d\x69\x36\x34\x00\x17\x0e\x74\x79\x70\x65\x2d\x66\x69\x72\x73\x74\x2d\x66\x33\x32\x00\x18\x0e\x74\x79\x70\x65\x2d\x66\x69\x72\x73\x74\x2d\x66\x36\x34\x00\x19\x0f\x74\x79\x70\x65\x2d\x73\x65\x63\x6f\x6e\x64\x2d\x69\x33\x32\x00\x1a\x0f\x74\x79\x70\x65\x2d\x73\x65\x63\x6f\x6e\x64\x2d\x69\x36\x34\x00\x1b\x0f\x74\x79\x70\x65\x2d\x73\x65\x63\x6f\x6e\x64\x2d\x66\x33\x32\x00\x1c\x0f\x74\x79\x70\x65\x2d\x73\x65\x63\x6f\x6e\x64\x2d\x66\x36\x34\x00\x1d\x10\x74\x79\x70\x65\x2d\x61\x6c\x6c\x2d\x69\x33\x32\x2d\x66\x36\x34\x00\x1e\x10\x74\x79\x70\x65\x2d\x61\x6c\x6c\x2d\x69\x33\x32\x2d\x69\x33\x32\x00\x1f\x10\x74\x79\x70\x65\x2d\x61\x6c\x6c\x2d\x66\x33\x32\x2d\x66\x36\x34\x00\x20\x10\x74\x79\x70\x65\x2d\x61\x6c\x6c\x2d\x66\x36\x34\x2d\x69\x33\x32\x00\x21\x16\x61\x73\x2d\x62\x69\x6e\x61\x72\x79\x2d\x61\x6c\x6c\x2d\x6f\x70\x65\x72\x61\x6e\x64\x73\x00\x22\x11\x61\x73\x2d\x6d\x69\x78\x65\x64\x2d\x6f\x70\x65\x72\x61\x6e\x64\x73\x00\x23\x14\x61\x73\x2d\x63\x61\x6c\x6c\x2d\x61\x6c\x6c\x2d\x6f\x70\x65\x72\x61\x6e\x64\x73\x00\x24\x03\x66\x61\x63\x00\x25\x07\x66\x61\x63\x2d\x61\x63\x63\x00\x26\x03\x66\x69\x62\x00\x27\x04\x65\x76\x65\x6e\x00\x28\x03\x6f\x64\x64\x00\x29\x07\x72\x75\x6e\x61\x77\x61\x79\x00\x2a\x0e\x6d\x75\x74\x75\x61\x6c\x2d\x72\x75\x6e\x61\x77\x61\x79\x00\x2b\x0f\x61\x73\x2d\x73\x65\x6c\x65\x63\x74\x2d\x66\x69\x72\x73\x74\x00\x2d\x0d\x61\x73\x2d\x73\x65\x6c\x65\x63\x74\x2d\x6d\x69\x64\x00\x2e\x0e\x61\x73\x2d\x73\x65\x6c\x65\x63\x74\x2d\x6c\x61\x73\x74\x00\x2f\x0f\x61\x73\x2d\x69\x66\x2d\x63\x6f\x6e\x64\x69\x74\x69\x6f\x6e\x00\x30\x0e\x61\x73\x2d\x62\x72\x5f\x69\x66\x2d\x66\x69\x72\x73\x74\x00\x31\x0d\x61\x73\x2d\x62\x72\x5f\x69\x66\x2d\x6c\x61\x73\x74\x00\x32\x11\x61\x73\x2d\x62\x72\x5f\x74\x61\x62\x6c\x65\x2d\x66\x69\x72\x73\x74\x00\x33\x10\x61\x73\x2d\x62\x72\x5f\x74\x61\x62\x6c\x65\x2d\x6c\x61\x73\x74\x00\x34\x16\x61\x73\x2d\x63\x61\x6c\x6c\x5f\x69\x6e\x64\x69\x72\x65\x63\x74\x2d\x66\x69\x72\x73\x74\x00\x36\x14\x61\x73\x2d\x63\x61\x6c\x6c\x5f\x69\x6e\x64\x69\x72\x65\x63\x74\x2d\x6d\x69\x64\x00\x37\x15\x61\x73\x2d\x63\x61\x6c\x6c\x5f\x69\x6e\x64\x69\x72\x65\x63\x74\x2d\x6c\x61\x73\x74\x00\x38\x0e\x61\x73\x2d\x73\x74\x6f\x72\x65\x2d\x66\x69\x72\x73\x74\x00\x39\x0d\x61\x73\x2d\x73\x74\x6f\x72\x65\x2d\x6c\x61\x73\x74\x00\x3a\x14\x61\x73\x2d\x6d\x65\x6d\x6f\x72\x79\x2e\x67\x72\x6f\x77\x2d\x76\x61\x6c\x75\x65\x00\x3b\x0f\x61\x73\x2d\x72\x65\x74\x75\x72\x6e\x2d\x76\x61\x6c\x75\x65\x00\x3c\x0f\x61\x73\x2d\x64\x72\x6f\x70\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x3d\x0b\x61\x73\x2d\x62\x72\x2d\x76\x61\x6c\x75\x65\x00\x3e\x12\x61\x73\x2d\x6c\x6f\x63\x61\x6c\x2e\x73\x65\x74\x2d\x76\x61\x6c\x75\x65\x00\x3f\x12\x61\x73\x2d\x6c\x6f\x63\x61\x6c\x2e\x74\x65\x65\x2d\x76\x61\x6c\x75\x65\x00\x40\x13\x61\x73\x2d\x67\x6c\x6f\x62\x61\x6c\x2e\x73\x65\x74\x2d\x76\x61\x6c\x75\x65\x00\x41\x0f\x61\x73\x2d\x6c\x6f\x61\x64\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x42\x10\x61\x73\x2d\x75\x6e\x61\x72\x79\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x45\x0e\x61\x73\x2d\x62\x69\x6e\x61\x72\x79\x2d\x6c\x65\x66\x74\x00\x46\x0f\x61\x73\x2d\x62\x69\x6e\x61\x72\x79\x2d\x72\x69\x67\x68\x74\x00\x47\x0f\x61\x73\x2d\x74\x65\x73\x74\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x48\x0f\x61\x73\x2d\x63\x6f\x6d\x70\x61\x72\x65\x2d\x6c\x65\x66\x74\x00\x49\x10\x61\x73\x2d\x63\x6f\x6d\x70\x61\x72\x65\x2d\x72\x69\x67\x68\x74\x00\x4a\x12\x61\x73\x2d\x63\x6f\x6e\x76\x65\x72\x74\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x4b\x09\x87\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x01\x35\x0a\xc0\x88\x80\x80\x00\x4c\x85\x80\x80\x80\x00\x00\x41\xb2\x02\x0b\x85\x80\x80\x80\x00\x00\x42\xe4\x02\x0b\x87\x80\x80\x80\x00\x00\x43\x00\x20\x73\x45\x0b\x8b\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\xc8\xae\x40\x0b\x88\x80\x80\x80\x00\x00\x41\xb2\x02\x42\xe4\x02\x0b\x84\x80\x80\x80\x00\x00\x20\x00\x0b\x84\x80\x80\x80\x00\x00\x20\x00\x0b\x84\x80\x80\x80\x00\x00\x20\x00\x0b\x84\x80\x80\x80\x00\x00\x20\x00\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x20\x01\x0b\x86\x80\x80\x80\x00\x00\x20\x01\x20\x00\x0b\x86\x80\x80\x80\x00\x00\x20\x01\x20\x00\x0b\x86\x80\x80\x80\x00\x00\x20\x01\x20\x00\x0b\x84\x80\x80\x80\x00\x00\x20\x01\x0b\x84\x80\x80\x80\x00\x00\x20\x01\x0b\x84\x80\x80\x80\x00\x00\x20\x01\x0b\x84\x80\x80\x80\x00\x00\x20\x01\x0b\x84\x80\x80\x80\x00\x00\x10\x00\x0b\x84\x80\x80\x80\x00\x00\x10\x01\x0b\x84\x80\x80\x80\x00\x00\x10\x02\x0b\x84\x80\x80\x80\x00\x00\x10\x03\x0b\x84\x80\x80\x80\x00\x00\x10\x04\x0b\x86\x80\x80\x80\x00\x00\x41\x20\x10\x05\x0b\x87\x80\x80\x80\x00\x00\x42\xc0\x00\x10\x06\x0b\x89\x80\x80\x80\x00\x00\x43\xc3\xf5\xa8\x3f\x10\x07\x0b\x8d\x80\x80\x80\x00\x00\x44\x3d\x0a\xd7\xa3\x70\x3d\xfa\x3f\x10\x08\x0b\x8b\x80\x80\x80\x00\x00\x43\x66\x66\x00\x42\x41\x20\x10\x0d\x0b\x89\x80\x80\x80\x00\x00\x41\x20\x42\xc0\x00\x10\x0e\x0b\x92\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x50\x40\x43\x00\x00\x00\x42\x10\x0f\x0b\x90\x80\x80\x80\x00\x00\x42\xc0\x00\x44\x66\x66\x66\x66\x66\x06\x50\x40\x10\x10\x0b\x8f\x80\x80\x80\x00\x00\x41\x20\x44\x3d\x0a\xd7\xa3\x70\x3d\xfa\x3f\x10\x09\x0b\x88\x80\x80\x80\x00\x00\x41\x01\x41\x02\x10\x0a\x0b\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\x00\x40\x10\x0b\x0b\x8f\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x02\x10\x0c\x0b\x89\x80\x80\x80\x00\x00\x41\x03\x41\x04\x10\x0a\x6a\x0b\x8c\x80\x80\x80\x00\x00\x41\x03\x41\x04\x10\x0a\x41\x05\x6a\x6c\x0b\x8a\x80\x80\x80\x00\x00\x41\x03\x41\x04\x10\x0a\x10\x0a\x0b\x95\x80\x80\x80\x00\x00\x20\x00\x50\x04\x7e\x42\x01\x05\x20\x00\x20\x00\x42\x01\x7d\x10\x25\x7e\x0b\x0b\x97\x80\x80\x80\x00\x00\x20\x00\x50\x04\x7e\x20\x01\x05\x20\x00\x42\x01\x7d\x20\x00\x20\x01\x7e\x10\x26\x0b\x0b\x9c\x80\x80\x80\x00\x00\x20\x00\x42\x01\x58\x04\x7e\x42\x01\x05\x20\x00\x42\x02\x7d\x10\x27\x20\x00\x42\x01\x7d\x10\x27\x7c\x0b\x0b\x92\x80\x80\x80\x00\x00\x20\x00\x50\x04\x7f\x41\x2c\x05\x20\x00\x42\x01\x7d\x10\x29\x0b\x0b\x93\x80\x80\x80\x00\x00\x20\x00\x50\x04\x7f\x41\xe3\x00\x05\x20\x00\x42\x01\x7d\x10\x28\x0b\x0b\x84\x80\x80\x80\x00\x00\x10\x2a\x0b\x84\x80\x80\x80\x00\x00\x10\x2c\x0b\x84\x80\x80\x80\x00\x00\x10\x2b\x0b\x89\x80\x80\x80\x00\x00\x10\x00\x41\x02\x41\x03\x1b\x0b\x89\x80\x80\x80\x00\x00\x41\x02\x10\x00\x41\x03\x1b\x0b\x89\x80\x80\x80\x00\x00\x41\x02\x41\x03\x10\x00\x1b\x0b\x8c\x80\x80\x80\x00\x00\x10\x00\x04\x7f\x41\x01\x05\x41\x02\x0b\x0b\x8b\x80\x80\x80\x00\x00\x02\x7f\x10\x00\x41\x02\x0d\x00\x0b\x0b\x8b\x80\x80\x80\x00\x00\x02\x7f\x41\x02\x10\x00\x0d\x00\x0b\x0b\x8d\x80\x80\x80\x00\x00\x02\x7f\x10\x00\x41\x02\x0e\x01\x00\x00\x0b\x0b\x8d\x80\x80\x80\x00\x00\x02\x7f\x41\x02\x10\x00\x0e\x01\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x00\x20\x00\x0b\x8e\x80\x80\x80\x00\x00\x02\x7f\x10\x00\x41\x02\x41\x00\x11\x00\x00\x0b\x0b\x8e\x80\x80\x80\x00\x00\x02\x7f\x41\x02\x10\x00\x41\x00\x11\x00\x00\x0b\x0b\x8e\x80\x80\x80\x00\x00\x02\x7f\x41\x01\x41\x02\x10\x00\x11\x00\x00\x0b\x0b\x89\x80\x80\x80\x00\x00\x10\x00\x41\x01\x36\x02\x00\x0b\x89\x80\x80\x80\x00\x00\x41\x0a\x10\x00\x36\x02\x00\x0b\x86\x80\x80\x80\x00\x00\x10\x00\x40\x00\x0b\x85\x80\x80\x80\x00\x00\x10\x00\x0f\x0b\x85\x80\x80\x80\x00\x00\x10\x00\x1a\x0b\x89\x80\x80\x80\x00\x00\x02\x7f\x10\x00\x0c\x00\x0b\x0b\x8a\x80\x80\x80\x00\x01\x01\x7f\x10\x00\x21\x00\x20\x00\x0b\x88\x80\x80\x80\x00\x01\x01\x7f\x10\x00\x22\x00\x0b\x88\x80\x80\x80\x00\x00\x10\x00\x24\x00\x23\x00\x0b\x87\x80\x80\x80\x00\x00\x10\x00\x28\x02\x00\x0b\x84\x80\x80\x80\x00\x00\x20\x00\x0b\x84\x80\x80\x80\x00\x00\x20\x00\x0b\x8d\x80\x80\x80\x00\x00\x02\x7d\x43\x00\x00\x00\x00\x10\x44\x91\x0b\x0b\x8c\x80\x80\x80\x00\x00\x02\x7f\x41\x01\x10\x43\x41\x0a\x6a\x0b\x0b\x8c\x80\x80\x80\x00\x00\x02\x7f\x41\x0a\x41\x01\x10\x43\x6b\x0b\x0b\x8a\x80\x80\x80\x00\x00\x02\x7f\x41\x01\x10\x43\x45\x0b\x0b\x8c\x80\x80\x80\x00\x00\x02\x7f\x41\x01\x10\x43\x41\x0a\x4d\x0b\x0b\x8c\x80\x80\x80\x00\x00\x02\x7f\x41\x0a\x41\x01\x10\x43\x47\x0b\x0b\x8a\x80\x80\x80\x00\x00\x02\x7e\x41\x01\x10\x43\xac\x0b\x0b");

Does this remove the tests for Multi value? We should probably duplicate these tests with the sub repo they came from until they are merged to the spec master.

> JSTests/wasm/spec-tests/if.wast.js:-3
> -let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\xdd\x80\x80\x80\x00\x10\x60\x02\x7f\x7f\x01\x7f\x60\x00\x00\x60\x00\x01\x7f\x60\x01\x7f\x00\x60\x03\x7f\x7c\x7f\x03\x7f\x7c\x7f\x60\x01\x7f\x01\x7f\x60\x01\x7f\x02\x7f\x7f\x60\x00\x03\x7f\x7e\x7f\x60\x00\x02\x7f\x7f\x60\x00\x02\x7d\x7d\x60\x01\x7f\x03\x7f\x7f\x7e\x60\x00\x03\x7f\x7f\x7e\x60\x02\x7f\x7f\x02\x7f\x7f\x60\x03\x7e\x7e\x7f\x02\x7e\x7f\x60\x02\x7e\x7e\x01\x7e\x60\x01\x7e\x01\x7e\x03\xb5\x80\x80\x80\x00\x34\x01\x03\x05\x06\x00\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x05\x00\x05\x05\x05\x03\x03\x05\x05\x05\x05\x03\x05\x05\x05\x05\x05\x05\x00\x05\x00\x05\x05\x05\x02\x05\x0a\x05\x05\x05\x05\x05\x05\x05\x0d\x0e\x01\x04\x85\x80\x80\x80\x00\x01\x70\x01\x01\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x06\x86\x80\x80\x80\x00\x01\x7f\x01\x41\x0a\x0b\x07\xb9\x86\x80\x80\x00\x31\x05\x65\x6d\x70\x74\x79\x00\x01\x08\x73\x69\x6e\x67\x75\x6c\x61\x72\x00\x02\x05\x6d\x75\x6c\x74\x69\x00\x03\x06\x6e\x65\x73\x74\x65\x64\x00\x04\x0f\x61\x73\x2d\x73\x65\x6c\x65\x63\x74\x2d\x66\x69\x72\x73\x74\x00\x05\x0d\x61\x73\x2d\x73\x65\x6c\x65\x63\x74\x2d\x6d\x69\x64\x00\x06\x0e\x61\x73\x2d\x73\x65\x6c\x65\x63\x74\x2d\x6c\x61\x73\x74\x00\x07\x0d\x61\x73\x2d\x6c\x6f\x6f\x70\x2d\x66\x69\x72\x73\x74\x00\x08\x0b\x61\x73\x2d\x6c\x6f\x6f\x70\x2d\x6d\x69\x64\x00\x09\x0c\x61\x73\x2d\x6c\x6f\x6f\x70\x2d\x6c\x61\x73\x74\x00\x0a\x0f\x61\x73\x2d\x69\x66\x2d\x63\x6f\x6e\x64\x69\x74\x69\x6f\x6e\x00\x0b\x0e\x61\x73\x2d\x62\x72\x5f\x69\x66\x2d\x66\x69\x72\x73\x74\x00\x0c\x0d\x61\x73\x2d\x62\x72\x5f\x69\x66\x2d\x6c\x61\x73\x74\x00\x0d\x11\x61\x73\x2d\x62\x72\x5f\x74\x61\x62\x6c\x65\x2d\x66\x69\x72\x73\x74\x00\x0e\x10\x61\x73\x2d\x62\x72\x5f\x74\x61\x62\x6c\x65\x2d\x6c\x61\x73\x74\x00\x0f\x16\x61\x73\x2d\x63\x61\x6c\x6c\x5f\x69\x6e\x64\x69\x72\x65\x63\x74\x2d\x66\x69\x72\x73\x74\x00\x11\x14\x61\x73\x2d\x63\x61\x6c\x6c\x5f\x69\x6e\x64\x69\x72\x65\x63\x74\x2d\x6d\x69\x64\x00\x12\x15\x61\x73\x2d\x63\x61\x6c\x6c\x5f\x69\x6e\x64\x69\x72\x65\x63\x74\x2d\x6c\x61\x73\x74\x00\x13\x0e\x61\x73\x2d\x73\x74\x6f\x72\x65\x2d\x66\x69\x72\x73\x74\x00\x14\x0d\x61\x73\x2d\x73\x74\x6f\x72\x65\x2d\x6c\x61\x73\x74\x00\x15\x14\x61\x73\x2d\x6d\x65\x6d\x6f\x72\x79\x2e\x67\x72\x6f\x77\x2d\x76\x61\x6c\x75\x65\x00\x16\x0d\x61\x73\x2d\x63\x61\x6c\x6c\x2d\x76\x61\x6c\x75\x65\x00\x18\x0f\x61\x73\x2d\x72\x65\x74\x75\x72\x6e\x2d\x76\x61\x6c\x75\x65\x00\x19\x0f\x61\x73\x2d\x64\x72\x6f\x70\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x1a\x0b\x61\x73\x2d\x62\x72\x2d\x76\x61\x6c\x75\x65\x00\x1b\x12\x61\x73\x2d\x6c\x6f\x63\x61\x6c\x2e\x73\x65\x74\x2d\x76\x61\x6c\x75\x65\x00\x1c\x12\x61\x73\x2d\x6c\x6f\x63\x61\x6c\x2e\x74\x65\x65\x2d\x76\x61\x6c\x75\x65\x00\x1d\x13\x61\x73\x2d\x67\x6c\x6f\x62\x61\x6c\x2e\x73\x65\x74\x2d\x76\x61\x6c\x75\x65\x00\x1e\x0f\x61\x73\x2d\x6c\x6f\x61\x64\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x1f\x10\x61\x73\x2d\x75\x6e\x61\x72\x79\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x20\x11\x61\x73\x2d\x62\x69\x6e\x61\x72\x79\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x21\x0f\x61\x73\x2d\x74\x65\x73\x74\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x22\x12\x61\x73\x2d\x63\x6f\x6d\x70\x61\x72\x65\x2d\x6f\x70\x65\x72\x61\x6e\x64\x00\x23\x12\x61\x73\x2d\x62\x69\x6e\x61\x72\x79\x2d\x6f\x70\x65\x72\x61\x6e\x64\x73\x00\x24\x13\x61\x73\x2d\x63\x6f\x6d\x70\x61\x72\x65\x2d\x6f\x70\x65\x72\x61\x6e\x64\x73\x00\x25\x11\x61\x73\x2d\x6d\x69\x78\x65\x64\x2d\x6f\x70\x65\x72\x61\x6e\x64\x73\x00\x26\x0a\x62\x72\x65\x61\x6b\x2d\x62\x61\x72\x65\x00\x27\x0b\x62\x72\x65\x61\x6b\x2d\x76\x61\x6c\x75\x65\x00\x28\x11\x62\x72\x65\x61\x6b\x2d\x6d\x75\x6c\x74\x69\x2d\x76\x61\x6c\x75\x65\x00\x29\x05\x70\x61\x72\x61\x6d\x00\x2a\x06\x70\x61\x72\x61\x6d\x73\x00\x2b\x09\x70\x61\x72\x61\x6d\x73\x2d\x69\x64\x00\x2c\x0b\x70\x61\x72\x61\x6d\x2d\x62\x72\x65\x61\x6b\x00\x2d\x0c\x70\x61\x72\x61\x6d\x73\x2d\x62\x72\x65\x61\x6b\x00\x2e\x0f\x70\x61\x72\x61\x6d\x73\x2d\x69\x64\x2d\x62\x72\x65\x61\x6b\x00\x2f\x07\x65\x66\x66\x65\x63\x74\x73\x00\x30\x12\x61\x64\x64\x36\x34\x5f\x75\x5f\x77\x69\x74\x68\x5f\x63\x61\x72\x72\x79\x00\x31\x11\x61\x64\x64\x36\x34\x5f\x75\x5f\x73\x61\x74\x75\x72\x61\x74\x65\x64\x00\x32\x08\x74\x79\x70\x65\x2d\x75\x73\x65\x00\x33\x09\x87\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x01\x10\x0a\x88\x8d\x80\x80\x00\x34\x82\x80\x80\x80\x00\x00\x0b\x96\x80\x80\x80\x00\x00\x20\x00\x04\x40\x0b\x20\x00\x04\x40\x0b\x20\x00\x04\x40\x0b\x20\x00\x04\x40\x0b\x0b\x9a\x80\x80\x80\x00\x00\x20\x00\x04\x40\x01\x0b\x20\x00\x04\x40\x01\x05\x01\x0b\x20\x00\x04\x7f\x41\x07\x05\x41\x08\x0b\x0b\xe7\x80\x80\x80\x00\x00\x20\x00\x04\x40\x10\x00\x10\x00\x10\x00\x0b\x20\x00\x04\x40\x05\x10\x00\x10\x00\x10\x00\x0b\x20\x00\x04\x7f\x10\x00\x10\x00\x41\x08\x10\x00\x05\x10\x00\x10\x00\x41\x09\x10\x00\x0b\x20\x00\x04\x07\x10\x00\x10\x00\x41\x01\x10\x00\x10\x00\x10\x00\x42\x02\x10\x00\x10\x00\x10\x00\x41\x03\x10\x00\x05\x10\x00\x10\x00\x41\x7f\x10\x00\x10\x00\x10\x00\x42\x7e\x10\x00\x10\x00\x10\x00\x41\x7d\x10\x00\x0b\x1a\x1a\x0b\xd2\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x20\x01\x04\x40\x10\x00\x02\x40\x0b\x01\x0b\x20\x01\x04\x40\x05\x10\x00\x02\x40\x0b\x01\x0b\x20\x01\x04\x7f\x10\x00\x41\x09\x05\x10\x00\x41\x0a\x0b\x05\x20\x01\x04\x40\x10\x00\x02\x40\x0b\x01\x0b\x20\x01\x04\x40\x05\x10\x00\x02\x40\x0b\x01\x0b\x20\x01\x04\x7f\x10\x00\x41\x0a\x05\x10\x00\x41\x0b\x0b\x0b\x0b\x95\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x41\x02\x41\x03\x1b\x0b\x95\x80\x80\x80\x00\x00\x41\x02\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x41\x03\x1b\x0b\x95\x80\x80\x80\x00\x00\x41\x02\x41\x03\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x1b\x0b\x97\x80\x80\x80\x00\x00\x03\x7f\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x10\x00\x10\x00\x0b\x0b\x97\x80\x80\x80\x00\x00\x03\x7f\x10\x00\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x10\x00\x0b\x0b\x97\x80\x80\x80\x00\x00\x03\x7f\x10\x00\x10\x00\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x0b\x0b\x98\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x41\x01\x05\x41\x00\x0b\x04\x7f\x10\x00\x41\x02\x05\x10\x00\x41\x03\x0b\x0b\x9a\x80\x80\x80\x00\x00\x02\x7f\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x41\x02\x0d\x00\x41\x03\x0f\x0b\x0b\x9a\x80\x80\x80\x00\x00\x02\x7f\x41\x02\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x0d\x00\x41\x03\x0f\x0b\x0b\x99\x80\x80\x80\x00\x00\x02\x7f\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x41\x02\x0e\x01\x00\x00\x0b\x0b\x99\x80\x80\x80\x00\x00\x02\x7f\x41\x02\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x0e\x01\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x00\x20\x00\x0b\x9a\x80\x80\x80\x00\x00\x02\x7f\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x41\x02\x41\x00\x11\x00\x00\x0b\x0b\x9a\x80\x80\x80\x00\x00\x02\x7f\x41\x02\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x41\x00\x11\x00\x00\x0b\x0b\x9a\x80\x80\x80\x00\x00\x02\x7f\x41\x02\x41\x00\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x11\x00\x00\x0b\x0b\x95\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x41\x02\x36\x02\x00\x0b\x95\x80\x80\x80\x00\x00\x41\x02\x20\x00\x04\x7f\x10\x00\x41\x01\x05\x10\x00\x41\x00\x0b\x36\x02\x00\x0b\x8e\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x41\x01\x05\x41\x00\x0b\x40\x00\x0b\x84\x80\x80\x80\x00\x00\x20\x00\x0b\x8e\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x41\x01\x05\x41\x00\x0b\x10\x17\x0b\x8d\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x41\x01\x05\x41\x00\x0b\x0f\x0b\x8d\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x41\x01\x05\x41\x00\x0b\x1a\x0b\x91\x80\x80\x80\x00\x00\x02\x7f\x20\x00\x04\x7f\x41\x01\x05\x41\x00\x0b\x0c\x00\x0b\x0b\x92\x80\x80\x80\x00\x01\x01\x7f\x20\x00\x04\x7f\x41\x01\x05\x41\x00\x0b\x21\x00\x20\x00\x0b\x8e\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x41\x01\x05\x41\x00\x0b\x22\x00\x0b\x90\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x41\x01\x05\x41\x00\x0b\x24\x00\x23\x00\x0b\x8f\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x41\x0b\x05\x41\x0a\x0b\x28\x02\x00\x0b\x91\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x10\x00\x41\x0d\x05\x10\x00\x41\x73\x0b\x68\x0b\x9f\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x10\x00\x41\x03\x05\x10\x00\x41\x7d\x0b\x20\x01\x04\x7f\x10\x00\x41\x04\x05\x10\x00\x41\x7b\x0b\x6c\x0b\x91\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x10\x00\x41\x0d\x05\x10\x00\x41\x00\x0b\x45\x0b\xab\x80\x80\x80\x00\x00\x20\x00\x04\x7d\x10\x00\x43\x00\x00\x40\x40\x05\x10\x00\x43\x00\x00\x40\xc0\x0b\x20\x01\x04\x7d\x10\x00\x43\x00\x00\x80\x40\x05\x10\x00\x43\x00\x00\x80\xc0\x0b\x5e\x0b\x99\x80\x80\x80\x00\x00\x20\x00\x04\x08\x10\x00\x41\x03\x10\x00\x41\x04\x05\x10\x00\x41\x03\x10\x00\x41\x7c\x0b\x6c\x0b\xa5\x80\x80\x80\x00\x00\x20\x00\x04\x09\x10\x00\x43\x00\x00\x40\x40\x10\x00\x43\x00\x00\x40\x40\x05\x10\x00\x43\x00\x00\x00\xc0\x10\x00\x43\x00\x00\x40\xc0\x0b\x5e\x0b\x9c\x80\x80\x80\x00\x00\x20\x00\x04\x08\x10\x00\x41\x03\x10\x00\x41\x04\x05\x10\x00\x41\x7d\x10\x00\x41\x7c\x0b\x41\x05\x6a\x6c\x0b\xe7\x80\x80\x80\x00\x00\x41\x01\x04\x40\x0c\x00\x00\x0b\x41\x01\x04\x40\x0c\x00\x00\x05\x00\x0b\x41\x00\x04\x40\x00\x05\x0c\x00\x00\x0b\x41\x01\x04\x40\x41\x01\x0d\x00\x00\x0b\x41\x01\x04\x40\x41\x01\x0d\x00\x00\x05\x00\x0b\x41\x00\x04\x40\x00\x05\x41\x01\x0d\x00\x00\x0b\x41\x01\x04\x40\x41\x00\x0e\x00\x00\x00\x0b\x41\x01\x04\x40\x41\x00\x0e\x00\x00\x00\x05\x00\x0b\x41\x00\x04\x40\x00\x05\x41\x00\x0e\x00\x00\x00\x0b\x41\x13\x0b\x94\x80\x80\x80\x00\x00\x20\x00\x04\x7f\x41\x12\x0c\x00\x41\x13\x05\x41\x15\x0c\x00\x41\x14\x0b\x0b\xa4\x80\x80\x80\x00\x00\x20\x00\x04\x0b\x41\x12\x41\x6e\x42\x12\x0c\x00\x41\x13\x41\x6d\x42\x13\x05\x41\x6e\x41\x12\x42\x6e\x0c\x00\x41\x6d\x41\x13\x42\x6d\x0b\x0b\x90\x80\x80\x80\x00\x00\x41\x01\x20\x00\x04\x05\x41\x02\x6a\x05\x41\x7e\x6a\x0b\x0b\x8e\x80\x80\x80\x00\x00\x41\x01\x41\x02\x20\x00\x04\x00\x6a\x05\x6b\x0b\x0b\x8c\x80\x80\x80\x00\x00\x41\x01\x41\x02\x20\x00\x04\x0c\x0b\x6a\x0b\x94\x80\x80\x80\x00\x00\x41\x01\x20\x00\x04\x05\x41\x02\x6a\x0c\x00\x05\x41\x7e\x6a\x0c\x00\x0b\x0b\x92\x80\x80\x80\x00\x00\x41\x01\x41\x02\x20\x00\x04\x00\x6a\x0c\x00\x05\x6b\x0c\x00\x0b\x0b\x8e\x80\x80\x80\x00\x00\x41\x01\x41\x02\x20\x00\x04\x0c\x0c\x00\x0b\x6a\x0b\xd1\x80\x80\x80\x00\x01\x01\x7f\x02\x7f\x41\x01\x21\x01\x20\x00\x0b\x04\x40\x20\x01\x41\x03\x6c\x21\x01\x20\x01\x41\x05\x6b\x21\x01\x20\x01\x41\x07\x6c\x21\x01\x0c\x00\x20\x01\x41\xe4\x00\x6c\x21\x01\x05\x20\x01\x41\x05\x6c\x21\x01\x20\x01\x41\x07\x6b\x21\x01\x20\x01\x41\x03\x6c\x21\x01\x0c\x00\x20\x01\x41\xe8\x07\x6c\x21\x01\x0b\x20\x01\x0b\x97\x80\x80\x80\x00\x01\x01\x7e\x20\x00\x20\x01\x7c\x20\x02\xad\x7c\x21\x03\x20\x03\x20\x03\x20\x00\x54\x0f\x0b\x90\x80\x80\x80\x00\x00\x20\x00\x20\x01\x41\x00\x10\x31\x04\x0f\x1a\x42\x7f\x0b\x0b\xd5\x80\x80\x80\x00\x00\x41\x01\x04\x01\x0b\x41\x01\x04\x02\x41\x00\x05\x41\x02\x0b\x41\x01\x04\x03\x1a\x05\x1a\x0b\x41\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x41\x01\x04\x04\x0b\x1a\x1a\x1a\x41\x01\x04\x02\x41\x00\x05\x41\x02\x0b\x41\x01\x04\x03\x1a\x05\x1a\x0b\x41\x00\x44\x00\x00\x00\x00\x00\x00\x00\x00\x41\x00\x41\x01\x04\x04\x0b\x1a\x1a\x1a\x0b");

Ditto.
Comment 21 Aakash Jain 2019-12-03 14:23:35 PST
Please verify the Windows EWS failure in https://ews-build.webkit.org/#/builders/10/builds/595

Tools\DumpRenderTree\win\DumpRenderTree.cpp(800,61): error C2039: 'setWebAnimationsCompositeOperationsEnabled': is not a member of 'IWebPreferencesPrivate7' 
[C:\cygwin\home\buildbot\worker\Windows-EWS\build\WebKitBuild\Release\Tools\DumpRenderTree\DumpRenderTreeLib.vcxproj]

WebKitBuild\Release\DerivedSources\ForwardingHeaders\WebKitLegacy/WebKit.h(35633): message : see declaration of 'IWebPreferencesPrivate7'
Comment 22 Yusuke Suzuki 2019-12-03 14:46:37 PST
(In reply to Aakash Jain from comment #21)
> Please verify the Windows EWS failure in
> https://ews-build.webkit.org/#/builders/10/builds/595
> 
> Tools\DumpRenderTree\win\DumpRenderTree.cpp(800,61): error C2039:
> 'setWebAnimationsCompositeOperationsEnabled': is not a member of
> 'IWebPreferencesPrivate7' 
> [C:\cygwin\home\buildbot\worker\Windows-
> EWS\build\WebKitBuild\Release\Tools\DumpRenderTree\DumpRenderTreeLib.vcxproj]
> 
> WebKitBuild\Release\DerivedSources\ForwardingHeaders\WebKitLegacy/WebKit.
> h(35633): message : see declaration of 'IWebPreferencesPrivate7'

This looks unrelated to this patch. This patch is not touching any WebCore or upper files.
Comment 23 Yusuke Suzuki 2019-12-03 17:37:01 PST
Committed r253074: <https://trac.webkit.org/changeset/253074>
Comment 24 Yusuke Suzuki 2019-12-03 18:16:12 PST
Comment on attachment 384733 [details]
Patch

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

>> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:1266
>> +        if (Arg::isValidAddrForm(offset, B3::Width64))
> 
> Can we add ASSERT(global.mutability == Mutable);?

Fixed.

>> Source/JavaScriptCore/wasm/WasmAirIRGenerator.cpp:1277
>> +            auto cell = g64();
> 
> Would this be simpler as a patchpoint that calls the MacroAssembler write barrier? I don't think Air will end up doing any optimizations on this.

For now, I'm using this mechanism, since it is aligned to emitWriteBarrierForJSWrapper. If it does not optimize well, we could just use Patchpoint in emitWriteBarrierForJSWrapper too.
Comment 25 Yusuke Suzuki 2019-12-03 18:33:10 PST
Committed r253080: <https://trac.webkit.org/changeset/253080>