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

Issue 2771803005: Hide WasmModule.origin field behind readable accessors. (Closed)

Created:
3 years, 9 months ago by kschimpf
Modified:
3 years, 9 months ago
CC:
v8-reviews_googlegroups.com, wasm-v8_google.com
Target Ref:
refs/heads/master
Project:
v8
Visibility:
Public.

Description

Hide WasmModule.origin field behind readable accessors. Besides adding accessors get_origin() and set_origin(), it creates easier test accessors is_wasm() and is_asm_js(). This allows the possibility of caching boolean flags for is_wasm() and is_asm_js() without having to change any code except for the files containing the class definition for WasmModule. BUG=v8:6152 R=bbudge@chromium.org,mtrofin@chromium.org Review-Url: https://codereview.chromium.org/2771803005 Cr-Commit-Position: refs/heads/master@{#44130} Committed: https://chromium.googlesource.com/v8/v8/+/98ed1f9ca97882c2566646c67cdfabaa71d7ac5c

Patch Set 1 #

Patch Set 2 : Fix merge conflict with master. #

Total comments: 6

Patch Set 3 : Fix origin references in debug build. #

Total comments: 3

Patch Set 4 : Change field origin to origin_ #

Patch Set 5 : Use boolean accessors instead of get_origin. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -40 lines) Patch
M src/compiler/wasm-compiler.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/wasm/function-body-decoder.cc View 4 chunks +10 lines, -10 lines 0 comments Download
M src/wasm/module-decoder.cc View 1 chunk +1 line, -1 line 0 comments Download
M src/wasm/wasm-module.h View 1 2 3 3 chunks +10 lines, -2 lines 0 comments Download
M src/wasm/wasm-module.cc View 1 2 12 chunks +15 lines, -15 lines 0 comments Download
M src/wasm/wasm-objects.cc View 1 2 3 4 3 chunks +4 lines, -5 lines 0 comments Download
M test/cctest/wasm/wasm-run-utils.h View 3 chunks +4 lines, -4 lines 0 comments Download
M test/unittests/wasm/function-body-decoder-unittest.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 42 (24 generated)
Karl
3 years, 9 months ago (2017-03-24 21:41:24 UTC) #4
bradnelson
lgtm
3 years, 9 months ago (2017-03-24 21:54:13 UTC) #6
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/2771803005/1
3 years, 9 months ago (2017-03-24 22:01:17 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: v8_linux64_gyp_rel_ng on master.tryserver.v8 (JOB_FAILED, http://build.chromium.org/p/tryserver.v8/builders/v8_linux64_gyp_rel_ng/builds/15525) v8_linux_mipsel_compile_rel on master.tryserver.v8 (JOB_FAILED, ...
3 years, 9 months ago (2017-03-24 22:03:32 UTC) #10
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/2771803005/20001
3 years, 9 months ago (2017-03-24 22:15:31 UTC) #14
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/37644)
3 years, 9 months ago (2017-03-24 22:18:04 UTC) #16
Mircea Trofin
https://codereview.chromium.org/2771803005/diff/20001/src/wasm/wasm-module.h File src/wasm/wasm-module.h (right): https://codereview.chromium.org/2771803005/diff/20001/src/wasm/wasm-module.h#newcode192 src/wasm/wasm-module.h:192: ModuleOrigin origin = kWasmOrigin; // origin of the module ...
3 years, 9 months ago (2017-03-24 22:25:15 UTC) #19
Karl
Need approval from Mircea (for src/compiler directory). Comments below are things I had to fix ...
3 years, 9 months ago (2017-03-24 22:29:11 UTC) #20
Karl
https://codereview.chromium.org/2771803005/diff/20001/src/wasm/wasm-module.h File src/wasm/wasm-module.h (right): https://codereview.chromium.org/2771803005/diff/20001/src/wasm/wasm-module.h#newcode192 src/wasm/wasm-module.h:192: ModuleOrigin origin = kWasmOrigin; // origin of the module ...
3 years, 9 months ago (2017-03-24 22:41:40 UTC) #21
Mircea Trofin
https://codereview.chromium.org/2771803005/diff/20001/src/wasm/wasm-objects.cc File src/wasm/wasm-objects.cc (right): https://codereview.chromium.org/2771803005/diff/20001/src/wasm/wasm-objects.cc#newcode227 src/wasm/wasm-objects.cc:227: if (origin == ModuleOrigin::kWasmOrigin) { On 2017/03/24 22:41:40, Karl ...
3 years, 9 months ago (2017-03-24 22:43:42 UTC) #24
Karl
https://codereview.chromium.org/2771803005/diff/20001/src/wasm/wasm-objects.cc File src/wasm/wasm-objects.cc (right): https://codereview.chromium.org/2771803005/diff/20001/src/wasm/wasm-objects.cc#newcode227 src/wasm/wasm-objects.cc:227: if (origin == ModuleOrigin::kWasmOrigin) { On 2017/03/24 22:43:42, Mircea ...
3 years, 9 months ago (2017-03-24 22:51:17 UTC) #25
bbudge
I didn't realize how widespread these comparisons were. Thanks for doing this. lgtm
3 years, 9 months ago (2017-03-24 23:02:20 UTC) #28
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/2771803005/80001
3 years, 9 months ago (2017-03-25 01:08:03 UTC) #33
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/37656)
3 years, 9 months ago (2017-03-25 01:10:54 UTC) #35
Karl
Still waiting for approval from mtrofin for directory src/compiler
3 years, 9 months ago (2017-03-25 01:13:54 UTC) #36
Mircea Trofin
On 2017/03/25 01:13:54, Karl wrote: > Still waiting for approval from mtrofin for directory src/compiler ...
3 years, 9 months ago (2017-03-25 01:52:20 UTC) #37
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/2771803005/80001
3 years, 9 months ago (2017-03-25 01:52:54 UTC) #39
commit-bot: I haz the power
3 years, 9 months ago (2017-03-25 01:54:17 UTC) #42
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://chromium.googlesource.com/v8/v8/+/98ed1f9ca97882c2566646c67cdfabaa71d...

Powered by Google App Engine
This is Rietveld 408576698