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

Issue 2208703002: [wasm] Allow import function to be any kind of callables. (Closed)

Created:
4 years, 4 months ago by ahaas
Modified:
4 years, 4 months ago
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[wasm] Allow import function to be any kind of callables. With this CL all kinds of Callable can imported into wasm. Please take a special look at the context that is used now in the WasmToJSWrapper. BUG=633895 TEST=mjsunit/wasm/ffi.js Committed: https://crrev.com/8d4910893cd1ffe2aa802e2079fb059b5d6ef1b9 Cr-Commit-Position: refs/heads/master@{#38569}

Patch Set 1 #

Patch Set 2 : Create a native context at the beginning of all tests in test-run-wasm-js.cc #

Total comments: 8

Patch Set 3 : Comments. #

Total comments: 4

Patch Set 4 : Fix the problem in wasm-module.cc, and refactor the code in wasm-compiler.cc #

Total comments: 2

Patch Set 5 : Fix the receiver of native functions, and its test. #

Patch Set 6 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+249 lines, -81 lines) Patch
M src/compiler/wasm-compiler.h View 1 2 3 4 5 2 chunks +3 lines, -5 lines 0 comments Download
M src/compiler/wasm-compiler.cc View 1 2 3 4 5 6 chunks +49 lines, -40 lines 0 comments Download
M src/runtime/runtime.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime/runtime-test.cc View 1 2 3 4 5 1 chunk +28 lines, -0 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 5 4 chunks +22 lines, -18 lines 0 comments Download
M test/cctest/wasm/test-run-wasm-js.cc View 1 14 chunks +87 lines, -16 lines 0 comments Download
M test/mjsunit/wasm/ffi.js View 1 2 3 4 3 chunks +59 lines, -2 lines 0 comments Download

Messages

Total messages: 46 (29 generated)
ahaas
PTAL
4 years, 4 months ago (2016-08-03 15:54:02 UTC) #5
titzer
https://codereview.chromium.org/2208703002/diff/20001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2208703002/diff/20001/src/compiler/wasm-compiler.cc#newcode2734 src/compiler/wasm-compiler.cc:2734: // Use the Call builtin. Always using the builtin ...
4 years, 4 months ago (2016-08-03 16:33:50 UTC) #8
titzer
On 2016/08/03 16:33:50, titzer wrote: > https://codereview.chromium.org/2208703002/diff/20001/src/compiler/wasm-compiler.cc > File src/compiler/wasm-compiler.cc (right): > > https://codereview.chromium.org/2208703002/diff/20001/src/compiler/wasm-compiler.cc#newcode2734 > ...
4 years, 4 months ago (2016-08-03 16:34:00 UTC) #9
Benedikt Meurer
> src/compiler/wasm-compiler.cc:2734: // Use the Call builtin. > Always using the builtin does increase the ...
4 years, 4 months ago (2016-08-03 17:06:04 UTC) #10
Benedikt Meurer
LGTM once comments/nits addressed. https://codereview.chromium.org/2208703002/diff/20001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2208703002/diff/20001/src/compiler/wasm-compiler.cc#newcode2726 src/compiler/wasm-compiler.cc:2726: Node* context = HeapConstant(isolate->native_context()); Uhm, ...
4 years, 4 months ago (2016-08-03 17:14:43 UTC) #11
ahaas
Benedikt, PTAL. I added tests for all kinds of callables you mentioned. Additionally I reintroduced ...
4 years, 4 months ago (2016-08-09 14:34:54 UTC) #14
Mircea Trofin
Please see comments. Also +clarkchenwang for the changes to wasm-module.cc (it's his elision code) https://codereview.chromium.org/2208703002/diff/40001/src/compiler/wasm-compiler.cc ...
4 years, 4 months ago (2016-08-09 14:54:07 UTC) #18
ahaas
https://codereview.chromium.org/2208703002/diff/40001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2208703002/diff/40001/src/compiler/wasm-compiler.cc#newcode2558 src/compiler/wasm-compiler.cc:2558: Handle<JSFunction> function; On 2016/08/09 at 14:54:07, Mircea Trofin wrote: ...
4 years, 4 months ago (2016-08-09 18:00:09 UTC) #21
Mircea Trofin
On 2016/08/09 18:00:09, ahaas wrote: > https://codereview.chromium.org/2208703002/diff/40001/src/compiler/wasm-compiler.cc > File src/compiler/wasm-compiler.cc (right): > > https://codereview.chromium.org/2208703002/diff/40001/src/compiler/wasm-compiler.cc#newcode2558 > ...
4 years, 4 months ago (2016-08-09 19:37:19 UTC) #24
Benedikt Meurer
https://codereview.chromium.org/2208703002/diff/60001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2208703002/diff/60001/src/compiler/wasm-compiler.cc#newcode2568 src/compiler/wasm-compiler.cc:2568: if (is_sloppy(function->shared()->language_mode())) { This is wrong. You also need ...
4 years, 4 months ago (2016-08-10 03:29:02 UTC) #25
ahaas
https://codereview.chromium.org/2208703002/diff/60001/src/compiler/wasm-compiler.cc File src/compiler/wasm-compiler.cc (right): https://codereview.chromium.org/2208703002/diff/60001/src/compiler/wasm-compiler.cc#newcode2568 src/compiler/wasm-compiler.cc:2568: if (is_sloppy(function->shared()->language_mode())) { On 2016/08/10 at 03:29:02, Benedikt Meurer ...
4 years, 4 months ago (2016-08-10 07:12:49 UTC) #28
Benedikt Meurer
LGTM^4
4 years, 4 months ago (2016-08-11 07:29:32 UTC) #31
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/2208703002/80001
4 years, 4 months ago (2016-08-11 07:53:52 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: v8_win64_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_win64_rel_ng/builds/12308)
4 years, 4 months ago (2016-08-11 07:58:40 UTC) #36
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/2208703002/100001
4 years, 4 months ago (2016-08-11 08:31:17 UTC) #43
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 4 months ago (2016-08-11 08:32:56 UTC) #44
commit-bot: I haz the power
4 years, 4 months ago (2016-08-11 08:34:06 UTC) #46
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/8d4910893cd1ffe2aa802e2079fb059b5d6ef1b9
Cr-Commit-Position: refs/heads/master@{#38569}

Powered by Google App Engine
This is Rietveld 408576698