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

Issue 2204703002: [wasm] Get rid of extra wrappers when import another wasm export (Closed)

Created:
4 years, 4 months ago by Chen
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

Add signature checking when directly import a foreign function Committed: https://crrev.com/dfd8db8bec891aa1f82b9ec728c09ccdcaebe29d Cr-Commit-Position: refs/heads/master@{#38349}

Patch Set 1 #

Total comments: 5

Patch Set 2 : Pass the arity to the internal field instead of the whole sharedFuncInfo, as well as fixing some ot… #

Patch Set 3 : Add enum for exported JS Function internal fields, also make the code more clean in CompileWrappers… #

Patch Set 4 : Change the interface of WrapExportCodeAsJSFunction in case of that there is no signature to pass in… #

Total comments: 1

Patch Set 5 : Adding test cases #

Total comments: 12

Patch Set 6 : Made code more clean according to code reviews #

Total comments: 6

Patch Set 7 : Modified runtime test functions and added more test cases #

Total comments: 12

Patch Set 8 : Make test case code more clean #

Unified diffs Side-by-side diffs Delta from patch set Stats (+390 lines, -15 lines) Patch
M src/runtime/runtime.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M src/runtime/runtime-test.cc View 1 2 3 4 5 6 7 1 chunk +64 lines, -0 lines 0 comments Download
M src/wasm/wasm-js.cc View 1 1 chunk +6 lines, -3 lines 0 comments Download
M src/wasm/wasm-module.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 3 4 9 chunks +65 lines, -11 lines 0 comments Download
M test/cctest/wasm/wasm-run-utils.h View 1 2 1 chunk +7 lines, -1 line 0 comments Download
A test/mjsunit/wasm/test-import-export-wrapper.js View 1 2 3 4 5 6 7 1 chunk +241 lines, -0 lines 0 comments Download
M test/mjsunit/wasm/wasm-constants.js View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (36 generated)
Chen
Hi Mircea, I would like you to review my code changes. Thanks!
4 years, 4 months ago (2016-08-01 22:57:20 UTC) #2
Mircea Trofin
This is the right idea. See comments. https://codereview.chromium.org/2204703002/diff/1/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2204703002/diff/1/src/wasm/wasm-module.cc#newcode132 src/wasm/wasm-module.cc:132: function->SetInternalField(2, *signature); ...
4 years, 4 months ago (2016-08-01 23:38:32 UTC) #7
Chen
I have made patch 2, pass arity to the internal field instead of sharedFuncInfo.
4 years, 4 months ago (2016-08-02 01:19:49 UTC) #8
Chen
Patch 4. Fixed the building errors and runtime errors.
4 years, 4 months ago (2016-08-02 23:09:51 UTC) #21
Chen
Hi, Mircea and Brad, I have made four test cases. The first one has exact ...
4 years, 4 months ago (2016-08-03 22:03:47 UTC) #23
Mircea Trofin
Nice - see comments. https://codereview.chromium.org/2204703002/diff/60001/src/wasm/wasm-module.cc File src/wasm/wasm-module.cc (right): https://codereview.chromium.org/2204703002/diff/60001/src/wasm/wasm-module.cc#newcode28 src/wasm/wasm-module.cc:28: enum JSFunctionExportInternalField { You could ...
4 years, 4 months ago (2016-08-03 22:52:17 UTC) #28
Chen
Hi Mircea, Changes have been made due to your comments! Thanks!
4 years, 4 months ago (2016-08-03 23:59:22 UTC) #31
Mircea Trofin
https://codereview.chromium.org/2204703002/diff/100001/src/runtime/runtime-test.cc File src/runtime/runtime-test.cc (right): https://codereview.chromium.org/2204703002/diff/100001/src/runtime/runtime-test.cc#newcode285 src/runtime/runtime-test.cc:285: RUNTIME_FUNCTION(Runtime_CheckWasmWrapperElison) { typo (...Elison => ...Elision) https://codereview.chromium.org/2204703002/diff/100001/src/runtime/runtime-test.cc#newcode344 src/runtime/runtime-test.cc:344: return ...
4 years, 4 months ago (2016-08-04 00:51:28 UTC) #34
Chen
Hi Mircea and Brad, Runtime test function has been changed to return boolean and I ...
4 years, 4 months ago (2016-08-04 17:21:54 UTC) #37
Mircea Trofin
https://codereview.chromium.org/2204703002/diff/120001/src/runtime/runtime-test.cc File src/runtime/runtime-test.cc (right): https://codereview.chromium.org/2204703002/diff/120001/src/runtime/runtime-test.cc#newcode296 src/runtime/runtime-test.cc:296: if (export_code->kind() != Code::JS_TO_WASM_FUNCTION) { actually, this is a ...
4 years, 4 months ago (2016-08-04 18:21:09 UTC) #40
Chen
Hi Mircea, Done with all the comments, Thanks! Best, Chen https://codereview.chromium.org/2204703002/diff/120001/src/runtime/runtime-test.cc File src/runtime/runtime-test.cc (right): https://codereview.chromium.org/2204703002/diff/120001/src/runtime/runtime-test.cc#newcode296 ...
4 years, 4 months ago (2016-08-04 20:05:07 UTC) #43
Mircea Trofin
lgtm
4 years, 4 months ago (2016-08-04 20:11:38 UTC) #44
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/2204703002/140001
4 years, 4 months ago (2016-08-04 20:26:44 UTC) #48
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 4 months ago (2016-08-04 20:28:21 UTC) #49
commit-bot: I haz the power
4 years, 4 months ago (2016-08-04 20:34:16 UTC) #51
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/dfd8db8bec891aa1f82b9ec728c09ccdcaebe29d
Cr-Commit-Position: refs/heads/master@{#38349}

Powered by Google App Engine
This is Rietveld 408576698