Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Issue 2757693003: [wasm][asm.js] Asm.js -> wasm custom parser. (Closed)

Created:
3 years, 9 months ago by bradnelson
Modified:
3 years, 8 months ago
CC:
v8-reviews_googlegroups.com, Michael Hablich, Karl
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm][asm.js] Asm.js -> wasm custom parser. Add the --fast-validate-asm option, which directs asm.js code to a new parser + validator + wasm code generator, which is then compiled using WebAssembly. This parser takes advantage of asm.js structure to linearly parse asm.js code, keeping a scope stack + a few additional tables to track varibles. BUG=v8:6090 BUG=v8:4203 R=mstarzinger@chromium.org,marja@chromium.org,vogelheim@chromium.org,kschimpf@chromium.org Review-Url: https://codereview.chromium.org/2757693003 Cr-Commit-Position: refs/heads/master@{#44084} Committed: https://chromium.googlesource.com/v8/v8/+/083a8d7209e4ee3e43bb03ae3bb2633177d4a77c

Patch Set 1 #

Total comments: 122

Patch Set 2 : fix #

Patch Set 3 : fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2842 lines, -60 lines) Patch
M BUILD.gn View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/asmjs/asm-js.cc View 1 4 chunks +88 lines, -42 lines 0 comments Download
A src/asmjs/asm-parser.h View 1 1 chunk +304 lines, -0 lines 0 comments Download
A src/asmjs/asm-parser.cc View 1 2 1 chunk +2375 lines, -0 lines 0 comments Download
M src/flag-definitions.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/v8.gyp View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/wasm/wasm-module-builder.h View 4 chunks +15 lines, -3 lines 0 comments Download
M src/wasm/wasm-module-builder.cc View 1 9 chunks +43 lines, -13 lines 0 comments Download
M test/mjsunit/wasm/asm-wasm.js View 1 2 chunks +4 lines, -2 lines 0 comments Download

Messages

Total messages: 41 (23 generated)
bradn
I'm sending this out for review in one lump (now that the scanner is landed). ...
3 years, 9 months ago (2017-03-17 00:50:58 UTC) #3
marja
Some initial comments. The amount of code is indeed daunting. o.o Not sure how to ...
3 years, 9 months ago (2017-03-17 13:49:05 UTC) #8
vogelheim
- Given that this CL is >2.5 kloc I probably won't finish the review today. ...
3 years, 9 months ago (2017-03-17 17:27:07 UTC) #9
vogelheim
There's only a handful of tests, and I guess this relies strongly on the existing ...
3 years, 9 months ago (2017-03-17 17:31:13 UTC) #10
vogelheim
https://codereview.chromium.org/2757693003/diff/1/src/asmjs/asm-parser.cc File src/asmjs/asm-parser.cc (right): https://codereview.chromium.org/2757693003/diff/1/src/asmjs/asm-parser.cc#newcode28 src/asmjs/asm-parser.cc:28: #define ASSTRING(x) ASSTRING1(x) What does this indirect definition accomplish? ...
3 years, 9 months ago (2017-03-17 18:01:29 UTC) #11
marja
More comments, now reading through this more carefully. (But I'm only at line 600-ish in ...
3 years, 9 months ago (2017-03-20 14:28:47 UTC) #12
marja
https://codereview.chromium.org/2757693003/diff/1/src/asmjs/asm-parser.cc File src/asmjs/asm-parser.cc (right): https://codereview.chromium.org/2757693003/diff/1/src/asmjs/asm-parser.cc#newcode481 src/asmjs/asm-parser.cc:481: if (!scanner_.IsUnsigned() || scanner_.AsUnsigned() != 0) { Checking for ...
3 years, 9 months ago (2017-03-20 14:57:58 UTC) #13
marja
https://codereview.chromium.org/2757693003/diff/1/src/asmjs/asm-js.cc File src/asmjs/asm-js.cc (right): https://codereview.chromium.org/2757693003/diff/1/src/asmjs/asm-js.cc#newcode170 src/asmjs/asm-js.cc:170: wasm::ZoneBuffer* asm_offsets; On 2017/03/20 14:28:47, marja wrote: > I ...
3 years, 9 months ago (2017-03-20 15:49:23 UTC) #14
marja
Some more comments, but I'm still kinda overwhelmed by the amount of code (I've read ...
3 years, 9 months ago (2017-03-21 13:31:44 UTC) #15
Michael Starzinger
LGTM modulo comments. I agree with Marja's comment. Given the size of this CL it ...
3 years, 9 months ago (2017-03-22 14:55:52 UTC) #16
Karl
LGTM too. Like mentioned above, once the existing comments go in, I would be willing ...
3 years, 9 months ago (2017-03-22 17:10:44 UTC) #18
marja
lgtm based on the offline discussion
3 years, 9 months ago (2017-03-23 12:04:06 UTC) #19
marja
https://codereview.chromium.org/2757693003/diff/1/src/asmjs/asm-parser.cc File src/asmjs/asm-parser.cc (right): https://codereview.chromium.org/2757693003/diff/1/src/asmjs/asm-parser.cc#newcode316 src/asmjs/asm-parser.cc:316: if (label == 0 || it->label == label) { ...
3 years, 9 months ago (2017-03-23 12:16:56 UTC) #20
bradn
Thanks for all the hard work reviewing. Kicking off a try now and will land ...
3 years, 9 months ago (2017-03-24 03:58:19 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2757693003/40001
3 years, 9 months ago (2017-03-24 05:52:33 UTC) #36
commit-bot: I haz the power
Committed patchset #3 (id:40001) as https://chromium.googlesource.com/v8/v8/+/083a8d7209e4ee3e43bb03ae3bb2633177d4a77c
3 years, 9 months ago (2017-03-24 05:54:04 UTC) #39
agrieve
On 2017/03/24 05:54:04, commit-bot: I haz the power wrote: > Committed patchset #3 (id:40001) as ...
3 years, 8 months ago (2017-04-10 17:09:39 UTC) #40
agrieve
3 years, 8 months ago (2017-04-26 00:01:27 UTC) #41
Message was sent while issue was closed.
On 2017/04/10 17:09:39, agrieve wrote:
> On 2017/03/24 05:54:04, commit-bot: I haz the power wrote:
> > Committed patchset #3 (id:40001) as
> >
>
https://chromium.googlesource.com/v8/v8/+/083a8d7209e4ee3e43bb03ae3bb2633177d...
> 
> This caused a size alert. PTAL:
> https://bugs.chromium.org/p/chromium/issues/detail?id=705417

Could someone that reviewed this change maybe take a look at the size impact:
https://bugs.chromium.org/p/chromium/issues/detail?id=705417

Powered by Google App Engine
This is Rietveld 408576698