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

Issue 2681273002: [turbofan] Utilize the fact that empty string is canonicalized. (Closed)

Created:
3 years, 10 months ago by Benedikt Meurer
Modified:
3 years, 10 months ago
Reviewers:
Yang
CC:
v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[turbofan] Utilize the fact that empty string is canonicalized. Since the empty string is canonical HeapObject now, we can use this fact to optimize - strict equality comparisons with the empty string to a simple ReferenceEqual operation, and - optimize ToBoolean to avoid instance type checks completely. Drive-by-fix: Allow InternalizedString for Type::HeapConstant in the type system. This is safe, since InternalizedStrings can be compared to other heap constants by reference (except for non-InternalizedStrings, which are excluded from the HeapConstant type). BUG=v8:5267 R=yangguo@chromium.org Review-Url: https://codereview.chromium.org/2681273002 Cr-Commit-Position: refs/heads/master@{#43050} Committed: https://chromium.googlesource.com/v8/v8/+/cd9724d4b48bce53dff968635f72252e3ec687d4

Patch Set 1 #

Total comments: 2

Patch Set 2 : Feedback. Cleanup. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -107 lines) Patch
M src/code-stub-assembler.cc View 3 chunks +16 lines, -36 lines 0 comments Download
M src/compiler/effect-control-linearizer.cc View 1 chunk +35 lines, -49 lines 0 comments Download
M src/compiler/js-typed-lowering.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/js-typed-lowering.cc View 1 3 chunks +16 lines, -1 line 0 comments Download
M src/compiler/typer.h View 1 1 chunk +1 line, -1 line 0 comments Download
M src/compiler/typer.cc View 1 2 chunks +6 lines, -6 lines 0 comments Download
M src/compiler/types.h View 1 2 chunks +2 lines, -2 lines 0 comments Download
M src/compiler/types.cc View 2 chunks +3 lines, -12 lines 0 comments Download
M test/unittests/compiler/js-typed-lowering-unittest.cc View 1 chunk +11 lines, -0 lines 0 comments Download

Messages

Total messages: 15 (9 generated)
Benedikt Meurer
3 years, 10 months ago (2017-02-09 06:37:28 UTC) #1
Yang
On 2017/02/09 06:37:28, Benedikt Meurer wrote: lgtm.
3 years, 10 months ago (2017-02-09 06:41:34 UTC) #4
Yang
https://codereview.chromium.org/2681273002/diff/1/src/compiler/js-typed-lowering.cc File src/compiler/js-typed-lowering.cc (right): https://codereview.chromium.org/2681273002/diff/1/src/compiler/js-typed-lowering.cc#newcode542 src/compiler/js-typed-lowering.cc:542: graph()->zone())), can we have a helper function that returns ...
3 years, 10 months ago (2017-02-09 06:41:41 UTC) #5
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/2681273002/20001
3 years, 10 months ago (2017-02-09 06:58:15 UTC) #11
Benedikt Meurer
https://codereview.chromium.org/2681273002/diff/1/src/compiler/js-typed-lowering.cc File src/compiler/js-typed-lowering.cc (right): https://codereview.chromium.org/2681273002/diff/1/src/compiler/js-typed-lowering.cc#newcode542 src/compiler/js-typed-lowering.cc:542: graph()->zone())), On 2017/02/09 06:41:41, Yang wrote: > can we ...
3 years, 10 months ago (2017-02-09 06:58:24 UTC) #12
commit-bot: I haz the power
3 years, 10 months ago (2017-02-09 07:23:13 UTC) #15
Message was sent while issue was closed.
Committed patchset #2 (id:20001) as
https://chromium.googlesource.com/v8/v8/+/cd9724d4b48bce53dff968635f72252e3ec...

Powered by Google App Engine
This is Rietveld 408576698