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

Issue 2201193004: Use Variable::binding_needs_init() to determine hole initialization (Closed)

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

Description

Use Variable::binding_needs_init() to determine hole initialization The old code was using VariableMode, but that signal is both over-pessimistic (some CONST and LET variables need no hole-initialization) and inconsistent with other uses of the InitializationFlag enum (such as %LoadLookupSlot). This changes no observable behavior, but removes unnecessary hole initialization and hole checks in a few places, including block-scoped function declarations, super property lookups, and new.target. R=bmeurer@chromium.org, neis@chromium.org Committed: https://crrev.com/6768456db513936cb19c8cdc657a7cd6122584a9 Cr-Commit-Position: refs/heads/master@{#38395}

Patch Set 1 #

Patch Set 2 : Fix arm build #

Patch Set 3 : Use binding_needs_init for load and assignment as well #

Patch Set 4 : Fully ported #

Total comments: 2

Patch Set 5 : Removed bogus DCHECK #

Total comments: 4

Patch Set 6 : Remove unhelpful comment #

Patch Set 7 : Remove one more comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+272 lines, -463 lines) Patch
M src/compiler/ast-graph-builder.cc View 1 2 3 4 5 6 9 chunks +28 lines, -36 lines 0 comments Download
M src/crankshaft/hydrogen.cc View 2 chunks +2 lines, -4 lines 0 comments Download
M src/full-codegen/arm/full-codegen-arm.cc View 1 2 3 4 5 7 chunks +32 lines, -50 lines 0 comments Download
M src/full-codegen/arm64/full-codegen-arm64.cc View 1 2 3 4 5 7 chunks +30 lines, -48 lines 0 comments Download
M src/full-codegen/ia32/full-codegen-ia32.cc View 1 2 3 4 5 7 chunks +27 lines, -43 lines 0 comments Download
M src/full-codegen/mips/full-codegen-mips.cc View 1 2 3 4 5 7 chunks +32 lines, -50 lines 0 comments Download
M src/full-codegen/mips64/full-codegen-mips64.cc View 1 2 3 4 5 7 chunks +32 lines, -50 lines 0 comments Download
M src/full-codegen/x64/full-codegen-x64.cc View 1 2 3 4 5 7 chunks +28 lines, -42 lines 0 comments Download
M src/interpreter/bytecode-generator.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/interpreter/bytecode-generator.cc View 1 6 chunks +11 lines, -17 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/BasicLoops.golden View 1 2 4 chunks +7 lines, -13 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/BreakableBlocks.golden View 1 2 8 chunks +7 lines, -18 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/ClassAndSuperClass.golden View 1 2 6 chunks +29 lines, -74 lines 0 comments Download
M test/cctest/interpreter/bytecode_expectations/NewTarget.golden View 1 2 2 chunks +6 lines, -17 lines 0 comments Download

Messages

Total messages: 33 (21 generated)
adamk
4 years, 4 months ago (2016-08-03 22:02:21 UTC) #1
adamk
I think this is ready for review, but I'm also working on a followup that ...
4 years, 4 months ago (2016-08-03 22:09:40 UTC) #6
adamk
Okay, this patch now addresses all hole checking in the backend AST visitors. I considered ...
4 years, 4 months ago (2016-08-03 23:36:46 UTC) #13
adamk
A few notes https://codereview.chromium.org/2201193004/diff/50018/src/full-codegen/x64/full-codegen-x64.cc File src/full-codegen/x64/full-codegen-x64.cc (left): https://codereview.chromium.org/2201193004/diff/50018/src/full-codegen/x64/full-codegen-x64.cc#oldcode1280 src/full-codegen/x64/full-codegen-x64.cc:1280: if (var->mode() == LET || var->mode() ...
4 years, 4 months ago (2016-08-03 23:38:55 UTC) #14
neis
Great! lgtm https://codereview.chromium.org/2201193004/diff/70001/src/full-codegen/x64/full-codegen-x64.cc File src/full-codegen/x64/full-codegen-x64.cc (left): https://codereview.chromium.org/2201193004/diff/70001/src/full-codegen/x64/full-codegen-x64.cc#oldcode726 src/full-codegen/x64/full-codegen-x64.cc:726: VariableMode mode = declaration->mode(); I suppose the ...
4 years, 4 months ago (2016-08-04 09:27:12 UTC) #21
rmcilroy
Interpreter lgtm, thanks.
4 years, 4 months ago (2016-08-04 14:15:06 UTC) #23
adamk
bmeurer, ptal for compiler/ and crankshaft/ https://codereview.chromium.org/2201193004/diff/70001/src/full-codegen/x64/full-codegen-x64.cc File src/full-codegen/x64/full-codegen-x64.cc (left): https://codereview.chromium.org/2201193004/diff/70001/src/full-codegen/x64/full-codegen-x64.cc#oldcode726 src/full-codegen/x64/full-codegen-x64.cc:726: VariableMode mode = ...
4 years, 4 months ago (2016-08-04 17:46:59 UTC) #24
Benedikt Meurer
LGTM.
4 years, 4 months ago (2016-08-05 05:09:41 UTC) #25
neis
On 2016/08/04 17:46:59, adamk wrote: > bmeurer, ptal for compiler/ and crankshaft/ > > https://codereview.chromium.org/2201193004/diff/70001/src/full-codegen/x64/full-codegen-x64.cc ...
4 years, 4 months ago (2016-08-05 07:23:38 UTC) #26
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/2201193004/110001
4 years, 4 months ago (2016-08-05 17:29:01 UTC) #29
commit-bot: I haz the power
Committed patchset #7 (id:110001)
4 years, 4 months ago (2016-08-05 17:50:15 UTC) #31
commit-bot: I haz the power
4 years, 4 months ago (2016-08-05 17:51:25 UTC) #33
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/6768456db513936cb19c8cdc657a7cd6122584a9
Cr-Commit-Position: refs/heads/master@{#38395}

Powered by Google App Engine
This is Rietveld 408576698