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

Unified Diff: src/compiler/js-typed-lowering.cc

Issue 1163963003: [turbofan] Use reference equal to zero instead of a smi check. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-typed-lowering.cc
diff --git a/src/compiler/js-typed-lowering.cc b/src/compiler/js-typed-lowering.cc
index fb59ce06192cf33d5d8ca69c668defd2824cd333..0f6f38cb0f38f120163956faf008373631c0b6d1 100644
--- a/src/compiler/js-typed-lowering.cc
+++ b/src/compiler/js-typed-lowering.cc
@@ -942,7 +942,8 @@ Reduction JSTypedLowering::ReduceJSLoadDynamicGlobal(Node* node) {
Node* load = graph()->NewNode(
javascript()->LoadContext(depth, Context::EXTENSION_INDEX, false),
context, context, effect);
- Node* check = graph()->NewNode(simplified()->ObjectIsSmi(), load);
+ Node* check = graph()->NewNode(simplified()->ReferenceEqual(Type::Tagged()),
+ load, jsgraph()->ZeroConstant());
Node* branch = graph()->NewNode(common()->Branch(BranchHint::kTrue), check,
check_true);
Node* if_true = graph()->NewNode(common()->IfTrue(), branch);
« no previous file with comments | « no previous file | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698