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

Issue 2051043002: Implement Wasm GrowMemory opcode as a wasm runtime call (Closed)

Created:
4 years, 6 months ago by gdeepti
Modified:
4 years, 5 months ago
Reviewers:
titzer, bradnelson, ahaas
CC:
v8-mips-ports_googlegroups.com, v8-ppc-ports_googlegroups.com, v8-reviews_googlegroups.com, v8-x87-ports_googlegroups.com, Yang
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Implement Wasm GrowMemory opcode as a wasm runtime call - GrowMemory runtime function, tests added to checks if memory can be grown and relocation information is updated correctly R=titzer@chromium.org, bradnelson@chromium.org Committed: https://crrev.com/ef2f33d6c6d37463e2ed902c99ebfdde6088fdcc Cr-Commit-Position: refs/heads/master@{#37338}

Patch Set 1 #

Patch Set 2 : Fix bad merge #

Patch Set 3 : Another bad merge #

Patch Set 4 : Fix test failures #

Total comments: 8

Patch Set 5 : Ben's review, fix includes #

Total comments: 4

Patch Set 6 : Fix tests #

Patch Set 7 : #

Patch Set 8 : rebase #

Patch Set 9 : Fix sign #

Patch Set 10 : Check allocation failures, fix windows error #

Patch Set 11 : Allow allocation/out of bounds errors to be caught #

Patch Set 12 : Fix build #

Patch Set 13 : Rebase #

Patch Set 14 : Don't pass in JSObject to runtime function #

Patch Set 15 : Test with mock-arraybuffer-allocator #

Patch Set 16 : Split tests #

Patch Set 17 : Clean up #

Patch Set 18 : Rebase #

Patch Set 19 : Rebase #

Total comments: 28

Patch Set 20 : Review changes #

Total comments: 2

Patch Set 21 : More review changes #

Patch Set 22 : Fix test #

Total comments: 4

Patch Set 23 : Review changes #

Unified diffs Side-by-side diffs Delta from patch set Stats (+345 lines, -20 lines) Patch
M BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/wasm-compiler.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4 chunks +37 lines, -1 line 0 comments Download
M src/messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -1 line 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +3 lines, -1 line 0 comments Download
A src/runtime/runtime-wasm.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +104 lines, -0 lines 0 comments Download
M src/v8.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M src/wasm/ast-decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 2 chunks +1 line, -6 lines 0 comments Download
M src/wasm/wasm-module.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +5 lines, -1 line 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +31 lines, -0 lines 0 comments Download
M src/wasm/wasm-opcodes.h View 1 2 3 4 5 6 7 8 9 3 chunks +12 lines, -9 lines 0 comments Download
M src/wasm/wasm-opcodes.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +1 line, -0 lines 0 comments Download
M test/mjsunit/mjsunit.status View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +5 lines, -0 lines 0 comments Download
A test/mjsunit/wasm/grow-memory.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +137 lines, -0 lines 0 comments Download
M test/mjsunit/wasm/wasm-constants.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2 chunks +3 lines, -1 line 0 comments Download

Messages

Total messages: 30 (12 generated)
titzer
https://codereview.chromium.org/2051043002/diff/60001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2051043002/diff/60001/src/compiler/wasm-compiler.cc#newcode1622 src/compiler/wasm-compiler.cc:1622: input = BuildChangeInt32ToTagged(input); I think this is OK for ...
4 years, 6 months ago (2016-06-10 09:38:13 UTC) #1
gdeepti
https://codereview.chromium.org/2051043002/diff/60001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2051043002/diff/60001/src/compiler/wasm-compiler.cc#newcode1622 src/compiler/wasm-compiler.cc:1622: input = BuildChangeInt32ToTagged(input); On 2016/06/10 09:38:13, titzer wrote: > ...
4 years, 6 months ago (2016-06-10 22:39:58 UTC) #2
ahaas
https://codereview.chromium.org/2051043002/diff/80001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2051043002/diff/80001/src/compiler/wasm-compiler.cc#newcode1624 src/compiler/wasm-compiler.cc:1624: input, jsgraph()->Constant(module->instance->js_object), Use HeapConstant(module->instance->js_object) instead of jsgraph()->Constant(module->instance->js_object) to avoid ...
4 years, 6 months ago (2016-06-14 13:03:14 UTC) #4
gdeepti
https://codereview.chromium.org/2051043002/diff/80001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2051043002/diff/80001/src/compiler/wasm-compiler.cc#newcode1624 src/compiler/wasm-compiler.cc:1624: input, jsgraph()->Constant(module->instance->js_object), On 2016/06/14 13:03:13, ahaas wrote: > Use ...
4 years, 6 months ago (2016-06-23 16:57:02 UTC) #8
gdeepti
PTAL. Quick note, windows ia32 grow_memory tests disabled for now because of some flaky crashes ...
4 years, 6 months ago (2016-06-23 16:57:58 UTC) #9
ahaas
https://codereview.chromium.org/2051043002/diff/410001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2051043002/diff/410001/src/compiler/wasm-compiler.cc#newcode1577 src/compiler/wasm-compiler.cc:1577: Runtime::FunctionId f = Runtime::kWasmGrowMemory; personal preference: would it be ...
4 years, 6 months ago (2016-06-24 11:10:15 UTC) #10
gdeepti
https://codereview.chromium.org/2051043002/diff/410001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2051043002/diff/410001/src/compiler/wasm-compiler.cc#newcode1577 src/compiler/wasm-compiler.cc:1577: Runtime::FunctionId f = Runtime::kWasmGrowMemory; On 2016/06/24 11:10:15, ahaas wrote: ...
4 years, 6 months ago (2016-06-25 00:28:42 UTC) #11
ahaas
https://codereview.chromium.org/2051043002/diff/430001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2051043002/diff/430001/src/compiler/wasm-compiler.cc#newcode1585 src/compiler/wasm-compiler.cc:1585: *control_ptr = graph()->NewNode(jsgraph()->common()->Merge(1), *control_ptr); why do you create a ...
4 years, 5 months ago (2016-06-27 15:08:25 UTC) #12
gdeepti
https://codereview.chromium.org/2051043002/diff/430001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2051043002/diff/430001/src/compiler/wasm-compiler.cc#newcode1585 src/compiler/wasm-compiler.cc:1585: *control_ptr = graph()->NewNode(jsgraph()->common()->Merge(1), *control_ptr); On 2016/06/27 15:08:25, ahaas wrote: ...
4 years, 5 months ago (2016-06-27 19:18:54 UTC) #14
gdeepti
https://codereview.chromium.org/2051043002/diff/410001/test/mjsunit/wasm/wasm-constants.js File test/mjsunit/wasm/wasm-constants.js (right): https://codereview.chromium.org/2051043002/diff/410001/test/mjsunit/wasm/wasm-constants.js#newcode315 test/mjsunit/wasm/wasm-constants.js:315: var kTrapMemAllocationFail = 8; On 2016/06/24 11:10:15, ahaas wrote: ...
4 years, 5 months ago (2016-06-27 19:55:12 UTC) #15
ahaas
lgtm https://codereview.chromium.org/2051043002/diff/490001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2051043002/diff/490001/src/wasm/wasm-module.cc#newcode1038 src/wasm/wasm-module.cc:1038: Handle<FixedArray> code_table; Use Handle<FixedArray> code_table(FixedArray::cast(obj)); here. https://codereview.chromium.org/2051043002/diff/490001/test/mjsunit/mjsunit.status File ...
4 years, 5 months ago (2016-06-28 14:51:50 UTC) #16
gdeepti
https://codereview.chromium.org/2051043002/diff/490001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2051043002/diff/490001/src/wasm/wasm-module.cc#newcode1038 src/wasm/wasm-module.cc:1038: Handle<FixedArray> code_table; On 2016/06/28 14:51:50, ahaas wrote: > Use ...
4 years, 5 months ago (2016-06-28 16:19:10 UTC) #18
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/2051043002/510001
4 years, 5 months ago (2016-06-28 16:20:02 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: v8_presubmit on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_presubmit/builds/18246)
4 years, 5 months ago (2016-06-28 16:24:08 UTC) #23
titzer
On 2016/06/28 16:24:08, commit-bot: I haz the power wrote: > Try jobs failed on following ...
4 years, 5 months ago (2016-06-28 16:40:06 UTC) #24
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/2051043002/510001
4 years, 5 months ago (2016-06-28 16:43:56 UTC) #26
commit-bot: I haz the power
Committed patchset #23 (id:510001)
4 years, 5 months ago (2016-06-28 16:46:47 UTC) #28
commit-bot: I haz the power
4 years, 5 months ago (2016-06-28 16:49:26 UTC) #30
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/ef2f33d6c6d37463e2ed902c99ebfdde6088fdcc
Cr-Commit-Position: refs/heads/master@{#37338}

Powered by Google App Engine
This is Rietveld 408576698