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

Issue 2342623002: [wasm] Set up Table and Memory constructors

Created:
4 years, 3 months ago by rossberg
Modified:
4 years, 2 months ago
Reviewers:
CC:
rmcilroy, v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Set up Wasm Table and Memory constructors This only provides skeletons so far: the constructors work, but the types are not wired up with the import/export mechanism yet; methods are still nops. Also, fix errors generated from Wasm to be proper Error/TypeError instances instead of just strings.

Patch Set 1 #

Patch Set 2 : Implement buffer getter; fix brand checks" #

Patch Set 3 : Eps #

Total comments: 13
Unified diffs Side-by-side diffs Delta from patch set Stats (+470 lines, -48 lines) Patch
M src/api.h View 1 2 chunks +3 lines, -0 lines 0 comments Download
M src/contexts.h View 1 chunk +4 lines, -0 lines 0 comments Download
M src/wasm/wasm-js.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/wasm/wasm-js.cc View 1 2 14 chunks +332 lines, -29 lines 0 comments Download
M src/wasm/wasm-result.h View 1 chunk +12 lines, -8 lines 5 comments Download
M src/wasm/wasm-result.cc View 2 chunks +32 lines, -7 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/CallRuntime.golden View 1 chunk +1 line, -1 line 0 comments Download
M test/cctest/wasm/wasm-run-utils.h View 1 chunk +1 line, -1 line 0 comments Download
A test/mjsunit/wasm/memory.js View 1 1 chunk +41 lines, -0 lines 6 comments Download
A test/mjsunit/wasm/table.js View 1 2 1 chunk +41 lines, -0 lines 2 comments Download
M test/mjsunit/wasm/unicode-validation.js View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10 (7 generated)
ahaas
https://codereview.chromium.org/2342623002/diff/40001/src/wasm/wasm-result.h File src/wasm/wasm-result.h (right): https://codereview.chromium.org/2342623002/diff/40001/src/wasm/wasm-result.h#newcode102 src/wasm/wasm-result.h:102: ErrorThrower(Isolate* isolate, const char* context) Why does the constructor ...
4 years, 3 months ago (2016-09-15 14:41:07 UTC) #3
ahaas
I took over this CL in https://codereview.chromium.org/2350643003 https://codereview.chromium.org/2342623002/diff/40001/src/wasm/wasm-result.h File src/wasm/wasm-result.h (right): https://codereview.chromium.org/2342623002/diff/40001/src/wasm/wasm-result.h#newcode102 src/wasm/wasm-result.h:102: ErrorThrower(Isolate* isolate, ...
4 years, 3 months ago (2016-09-19 14:02:37 UTC) #8
titzer
4 years, 2 months ago (2016-09-29 13:10:38 UTC) #9
On 2016/09/19 14:02:37, ahaas wrote:
> I took over this CL in https://codereview.chromium.org/2350643003
> 
> https://codereview.chromium.org/2342623002/diff/40001/src/wasm/wasm-result.h
> File src/wasm/wasm-result.h (right):
> 
>
https://codereview.chromium.org/2342623002/diff/40001/src/wasm/wasm-result.h#...
> src/wasm/wasm-result.h:102: ErrorThrower(Isolate* isolate, const char*
context)
> On 2016/09/15 at 14:41:06, ahaas wrote:
> > Why does the constructor not use i::Isolate* isolate as a parameter instead
of
> Isolate* isolate?
> 
> I changed it to i::Isolate*
> 
>
https://codereview.chromium.org/2342623002/diff/40001/src/wasm/wasm-result.h#...
> src/wasm/wasm-result.h:118: auto result = exception_;
> On 2016/09/15 at 14:41:06, ahaas wrote:
> > Could you not use auto here please?
> 
> Done.
> 
>
https://codereview.chromium.org/2342623002/diff/40001/src/wasm/wasm-result.h#...
> src/wasm/wasm-result.h:118: auto result = exception_;
> On 2016/09/15 at 14:41:06, ahaas wrote:
> > Could you not use auto here please?
> 
> Done.
> 
>
https://codereview.chromium.org/2342623002/diff/40001/test/mjsunit/wasm/memor...
> File test/mjsunit/wasm/memory.js (right):
> 
>
https://codereview.chromium.org/2342623002/diff/40001/test/mjsunit/wasm/memor...
> test/mjsunit/wasm/memory.js:22: assertThrows(() => new
> WebAssembly.Memory({initial: 1e20}), RangeError);
> On 2016/09/15 at 14:41:07, ahaas wrote:
> > could you store 1e20 in an outOfUint32RangeValue constant and use that
> constant here? Same below and in table.js
> 
> Done.
> 
>
https://codereview.chromium.org/2342623002/diff/40001/test/mjsunit/wasm/memor...
> test/mjsunit/wasm/memory.js:28: let memory = new WebAssembly.Memory({initial:
> 1});
> On 2016/09/15 at 14:41:06, ahaas wrote:
> > Can you add a test where the maximum is set, e.g. new
> WebAssembly.Memory({initial: 1, maximum: 10})?
> 
> Done.
> 
>
https://codereview.chromium.org/2342623002/diff/40001/test/mjsunit/wasm/memor...
> test/mjsunit/wasm/memory.js:30: assertSame(WebAssembly.Memory,
> memory.constructor);
> On 2016/09/15 at 14:41:06, ahaas wrote:
> > Can you check the value of maximum here?
> 
> oh, that's not possible.
> 
>
https://codereview.chromium.org/2342623002/diff/40001/test/mjsunit/wasm/table.js
> File test/mjsunit/wasm/table.js (right):
> 
>
https://codereview.chromium.org/2342623002/diff/40001/test/mjsunit/wasm/table...
> test/mjsunit/wasm/table.js:38: assertSame(WebAssembly.Table,
table.constructor);
> On 2016/09/15 at 14:41:07, ahaas wrote:
> > Could you add a test for the maximum property?
> 
> Done.

ahaas has landed this, so, removing myself as a reviewer.

Powered by Google App Engine
This is Rietveld 408576698