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

Issue 2646763003: [turbofan] Optimize typeof o === "object" checks. (Closed)

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

Description

[turbofan] Optimize typeof o === "object" checks. Properly recognize and optimize typeof in a strict/abstract equality comparison with the string literal "object" to a check for Null or a check of the map for Receiver instance type and non-callable. Drive-by-fix: Also optimize typeof o === "function" somewhat, now that we have the new types for Callable and NonCallable. R=jarin@chromium.org BUG=v8:5267 Review-Url: https://codereview.chromium.org/2646763003 Cr-Commit-Position: refs/heads/master@{#42501} Committed: https://chromium.googlesource.com/v8/v8/+/695026d411edcc222e514aa7090a42554237cb2a

Patch Set 1 #

Total comments: 2

Patch Set 2 : Address comment. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+64 lines, -4 lines) Patch
M src/compiler/effect-control-linearizer.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/effect-control-linearizer.cc View 1 2 chunks +34 lines, -0 lines 0 comments Download
M src/compiler/js-typed-lowering.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M src/compiler/opcodes.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/simplified-lowering.cc View 1 chunk +5 lines, -2 lines 0 comments Download
M src/compiler/simplified-operator.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/simplified-operator.cc View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/typer.cc View 3 chunks +13 lines, -2 lines 2 comments Download
M src/compiler/verifier.cc View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 15 (7 generated)
Benedikt Meurer
3 years, 11 months ago (2017-01-19 12:20:43 UTC) #1
Jarin
lgtm https://codereview.chromium.org/2646763003/diff/1/src/compiler/effect-control-linearizer.cc File src/compiler/effect-control-linearizer.cc (right): https://codereview.chromium.org/2646763003/diff/1/src/compiler/effect-control-linearizer.cc#newcode1713 src/compiler/effect-control-linearizer.cc:1713: Node* vfalse = __ Word32Equal( The vfalse name ...
3 years, 11 months ago (2017-01-19 12:30:27 UTC) #4
Benedikt Meurer
https://codereview.chromium.org/2646763003/diff/1/src/compiler/effect-control-linearizer.cc File src/compiler/effect-control-linearizer.cc (right): https://codereview.chromium.org/2646763003/diff/1/src/compiler/effect-control-linearizer.cc#newcode1713 src/compiler/effect-control-linearizer.cc:1713: Node* vfalse = __ Word32Equal( On 2017/01/19 12:30:27, Jarin ...
3 years, 11 months ago (2017-01-19 12:50:32 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/2646763003/20001
3 years, 11 months ago (2017-01-19 12:50:46 UTC) #8
commit-bot: I haz the power
Committed patchset #2 (id:20001) as https://chromium.googlesource.com/v8/v8/+/695026d411edcc222e514aa7090a42554237cb2a
3 years, 11 months ago (2017-01-19 13:16:33 UTC) #11
bakkot1
https://codereview.chromium.org/2646763003/diff/20001/src/compiler/typer.cc File src/compiler/typer.cc (right): https://codereview.chromium.org/2646763003/diff/20001/src/compiler/typer.cc#newcode506 src/compiler/typer.cc:506: if (type->Is(Type::Callable())) return t->singleton_true_; Drive-by comment: document.all is "callable", ...
3 years, 11 months ago (2017-01-23 19:26:16 UTC) #13
Benedikt Meurer
https://codereview.chromium.org/2646763003/diff/20001/src/compiler/typer.cc File src/compiler/typer.cc (right): https://codereview.chromium.org/2646763003/diff/20001/src/compiler/typer.cc#newcode506 src/compiler/typer.cc:506: if (type->Is(Type::Callable())) return t->singleton_true_; Aye, sorry for the delay, ...
3 years, 10 months ago (2017-02-14 10:18:24 UTC) #14
bakkot1
3 years, 10 months ago (2017-02-14 22:48:40 UTC) #15
Message was sent while issue was closed.
On 2017/02/14 10:18:24, Benedikt Meurer wrote:
> https://codereview.chromium.org/2646763003/diff/20001/src/compiler/typer.cc
> File src/compiler/typer.cc (right):
> 
>
https://codereview.chromium.org/2646763003/diff/20001/src/compiler/typer.cc#n...
> src/compiler/typer.cc:506: if (type->Is(Type::Callable())) return
> t->singleton_true_;
> Aye, sorry for the delay, just discovered this comment. Can you file a bug
> report please?

Done: https://bugs.chromium.org/p/v8/issues/detail?id=5972

Powered by Google App Engine
This is Rietveld 408576698