Commit Graph

18 Commits

Author SHA1 Message Date
machenbach
e1eee748dd Revert of [wasm] Master CL for Binary 0xC changes. (patchset #26 id:490001 of https://codereview.chromium.org/2345593003/ )
Reason for revert:
Main suspect for tsan:
https://build.chromium.org/p/client.v8/builders/V8%20Linux64%20TSAN/builds/11893

Also changes layout tests:
https://build.chromium.org/p/client.v8.fyi/builders/V8-Blink%20Linux%2064/builds/10036

+mips builder:
https://build.chromium.org/p/client.v8.ports/builders/V8%20Mips%20-%20builder/builds/4032

Original issue's description:
> [wasm] Master CL for Binary 0xC changes.
>
> [0xC] Convert to stack machine semantics.
> [0xC] Use section codes instead of names.
> [0xC] Add elements section decoding.
> [0xC] Decoding of globals section.
> [0xC] Decoding of memory section.
> [0xC] Decoding of imports section.
> [0xC] Decoding of exports section.
> [0xC] Decoding of data section.
> [0xC] Remove CallImport bytecode.
> [0xC] Function bodies have an implicit block.
> [0xC] Remove the bottom label from loops.
> [0xC] Add signatures to blocks.
> [0xC] Remove arities from branches.
> Add tests for init expression decoding.
> Rework compilation of import wrappers and how they are patched.
> Rework function indices in debugging.
> Fix ASM->WASM builder for stack machine.
> Reorganize asm.js foreign functions due to import indices change.
>
> R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
> BUG=chromium:575167
> LOG=Y
>
> Committed: https://crrev.com/76eb976a67273b8c03c744f64ad850b0432554b9
> Cr-Commit-Position: refs/heads/master@{#39678}

TBR=ahaas@chromium.org,bradnelson@chromium.org,mtrofin@chromium.org,rossberg@chromium.org,bradnelson@google.com,titzer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=chromium:575167

Review-Url: https://codereview.chromium.org/2361053004
Cr-Commit-Position: refs/heads/master@{#39685}
2016-09-23 17:58:24 +00:00
titzer
76eb976a67 [wasm] Master CL for Binary 0xC changes.
[0xC] Convert to stack machine semantics.
[0xC] Use section codes instead of names.
[0xC] Add elements section decoding.
[0xC] Decoding of globals section.
[0xC] Decoding of memory section.
[0xC] Decoding of imports section.
[0xC] Decoding of exports section.
[0xC] Decoding of data section.
[0xC] Remove CallImport bytecode.
[0xC] Function bodies have an implicit block.
[0xC] Remove the bottom label from loops.
[0xC] Add signatures to blocks.
[0xC] Remove arities from branches.
Add tests for init expression decoding.
Rework compilation of import wrappers and how they are patched.
Rework function indices in debugging.
Fix ASM->WASM builder for stack machine.
Reorganize asm.js foreign functions due to import indices change.

R=ahaas@chromium.org,rossberg@chromium.org,bradnelson@chromium.org
BUG=chromium:575167
LOG=Y

Review-Url: https://codereview.chromium.org/2345593003
Cr-Commit-Position: refs/heads/master@{#39678}
2016-09-23 15:56:54 +00:00
rossberg
271a7f55cd Refactor module builder
- Use ES6 classes and other goodies.
- Make some names match design/spec.
- Remove obsolete generation of END section.

R=bradnelson@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2081973003
Cr-Commit-Position: refs/heads/master@{#37155}
2016-06-21 19:48:16 +00:00
titzer
ee03b7217b [wasm] Binary 11: Bump module version to 0xB.
[wasm] Binary 11: Swap the order of section name / section length.
[wasm] Binary 11: Shorter section names.
[wasm] Binary 11: Add a prefix for function type declarations.
[wasm] Binary 11: Function types encoded as pcount, p*, rcount, r*
[wasm] Fix numeric names for functions.

R=rossberg@chromium.org,jfb@chromium.org,ahaas@chromium.org
BUG=chromium:575167
LOG=Y

Review-Url: https://codereview.chromium.org/1896863003
Cr-Commit-Position: refs/heads/master@{#35897}
2016-04-29 09:40:24 +00:00
titzer
2aa4656eeb [wasm] Binary 11: WASM AST is now postorder.
[wasm] Binary 11: br_table takes a value.
[wasm] Binary 11: Add implicit blocks to if arms.
[wasm] Binary 11: Add arities to call, return, and breaks
[wasm] Binary 11: Add experimental version.

This CL changes the encoder, decoder, and tests to use a postorder
encoding of the AST, which is more efficient in decode time and
space.

R=bradnelson@chromium.org,rossberg@chromium.org,binji@chromium.org
BUG=chromium:575167
LOG=Y

Review-Url: https://codereview.chromium.org/1830663002
Cr-Commit-Position: refs/heads/master@{#35896}
2016-04-29 09:16:21 +00:00
titzer
f99624a98e [wasm] Encode immediates to Load and Store as varint.
R=binji@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1775123003

Cr-Commit-Position: refs/heads/master@{#34635}
2016-03-09 18:54:43 +00:00
titzer
d61a0c5a4a [wasm] Support a two-level namespace for imports.
R=binji@chromium.org,dschuff@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1780483002

Cr-Commit-Position: refs/heads/master@{#34600}
2016-03-08 19:57:10 +00:00
titzer
5c1c98e829 [wasm] Rename _WASMEXP_ object to Wasm.
R=ahaas@chromium.org,binji@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1770383002

Cr-Commit-Position: refs/heads/master@{#34587}
2016-03-08 14:48:27 +00:00
titzer
56157fe819 [wasm] Allow Uint8Array in _WASMEXP_.instantiateModule()
R=dschuff@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1767203002

Cr-Commit-Position: refs/heads/master@{#34565}
2016-03-07 21:09:54 +00:00
titzer
835c5e6beb [wasm] Rework encoding of local declarations.
Local declarations were previously encoded as an optional set of
4 uint16 values as part of the function declaration. This CL
implements the current design of moving these declarations to
a list of pairs of (type, count) that is part of the body.

R=bradnelson@chromium.org,binji@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1763433002

Cr-Commit-Position: refs/heads/master@{#34564}
2016-03-07 21:05:15 +00:00
Ben L. Titzer
fc936302fd [wasm] One more fix to test-wasm-module-builder.js
TBR=machenbach@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1769873002 .

Cr-Commit-Position: refs/heads/master@{#34525}
2016-03-07 10:14:25 +00:00
Ben L. Titzer
f8e761c6fd [wasm] Fix stupid arguments.
TBR=machenbach@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1772593002 .

Cr-Commit-Position: refs/heads/master@{#34524}
2016-03-07 10:09:18 +00:00
machenbach
701e520b2b Reland of [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript. (patchset #1 id:1 of https://codereview.chromium.org/1768963002/ )
Reason for revert:
Fix landed in head.

Original issue's description:
> Revert of [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript. (patchset #1 id:1 of https://codereview.chromium.org/1774463002/ )
>
> Reason for revert:
> [Sheriff] Problem is not fixed:
> https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/8799
>
> Original issue's description:
> > [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
> >
> > This is a reland of https://codereview.chromium.org/1762203002/
> >
> > R=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org
> > BUG=
> >
> > Committed: https://crrev.com/aa5770805060a347c6b650634c736ba34ab61728
> > Cr-Commit-Position: refs/heads/master@{#34519}
>
> TBR=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org,titzer@chromium.org
> # Skipping CQ checks because original CL landed less than 1 days ago.
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=

TBR=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org,titzer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1769863002

Cr-Commit-Position: refs/heads/master@{#34523}
2016-03-07 10:03:01 +00:00
machenbach
6242b3893d Revert of [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript. (patchset #1 id:1 of https://codereview.chromium.org/1774463002/ )
Reason for revert:
[Sheriff] Problem is not fixed:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/8799

Original issue's description:
> [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
>
> This is a reland of https://codereview.chromium.org/1762203002/
>
> R=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org
> BUG=
>
> Committed: https://crrev.com/aa5770805060a347c6b650634c736ba34ab61728
> Cr-Commit-Position: refs/heads/master@{#34519}

TBR=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org,titzer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1768963002

Cr-Commit-Position: refs/heads/master@{#34522}
2016-03-07 10:01:23 +00:00
Ben L. Titzer
79ebb2124d [wasm] Fix arguments in test-wasm-module-builder.cc
Cr-Commit-Position: refs/heads/master@{#34521}
2016-03-07 09:59:28 +00:00
titzer
aa57708050 [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
This is a reland of https://codereview.chromium.org/1762203002/

R=ahaas@chromium.org,binji@chromium.org,seththompson@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1774463002

Cr-Commit-Position: refs/heads/master@{#34519}
2016-03-07 09:46:37 +00:00
adamk
6479b01aff Revert of [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript. (patchset #2 id:20001 of https://codereview.chromium.org/1762203002/ )
Reason for revert:
New test test-wasm-module-builder fails on Linux - shared bot:
https://build.chromium.org/p/client.v8/builders/V8%20Linux%20-%20shared/builds/8793

Original issue's description:
> [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
>
> R=binji@chromium.org,seththompson@chromium.org
> BUG=
>
> Committed: https://crrev.com/d130c6bdc6a424b068614592a0b79a34750af0fc
> Cr-Commit-Position: refs/heads/master@{#34513}

TBR=binji@chromium.org,seththompson@chromium.org,titzer@chromium.org
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=

Review URL: https://codereview.chromium.org/1771553002

Cr-Commit-Position: refs/heads/master@{#34514}
2016-03-05 02:21:20 +00:00
titzer
d130c6bdc6 [wasm] Add a JavaScript utility to make it easier to build WASM modules from JavaScript.
R=binji@chromium.org,seththompson@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1762203002

Cr-Commit-Position: refs/heads/master@{#34513}
2016-03-05 01:48:12 +00:00