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

Side by Side Diff: src/compiler/simplified-lowering.cc

Issue 2109623002: [turbofan] Introduce proper CheckNumber operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add to RedundancyElimination Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/compiler/redundancy-elimination.cc ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/simplified-lowering.h" 5 #include "src/compiler/simplified-lowering.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "src/address-map.h" 9 #include "src/address-map.h"
10 #include "src/base/bits.h" 10 #include "src/base/bits.h"
(...skipping 1669 matching lines...) Expand 10 before | Expand all | Expand 10 after
1680 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc)); 1680 NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
1681 } 1681 }
1682 return; 1682 return;
1683 } 1683 }
1684 1684
1685 case IrOpcode::kCheckBounds: { 1685 case IrOpcode::kCheckBounds: {
1686 VisitBinop(node, UseInfo::CheckedSigned32AsWord32(), 1686 VisitBinop(node, UseInfo::CheckedSigned32AsWord32(),
1687 UseInfo::TruncatingWord32(), MachineRepresentation::kWord32); 1687 UseInfo::TruncatingWord32(), MachineRepresentation::kWord32);
1688 return; 1688 return;
1689 } 1689 }
1690 case IrOpcode::kCheckNumber: {
1691 if (InputIs(node, Type::Number())) {
1692 if (truncation.TruncatesToWord32()) {
1693 VisitUnop(node, UseInfo::TruncatingWord32(),
1694 MachineRepresentation::kWord32);
1695 } else {
1696 VisitUnop(node, UseInfo::TruncatingFloat64(),
1697 MachineRepresentation::kFloat64);
1698 }
1699 if (lower()) DeferReplacement(node, node->InputAt(0));
1700 } else {
1701 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
1702 }
1703 return;
1704 }
1690 case IrOpcode::kCheckTaggedPointer: { 1705 case IrOpcode::kCheckTaggedPointer: {
1691 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged); 1706 VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
1692 if (lower()) { 1707 if (lower()) {
1693 if (InputIs(node, Type::TaggedPointer())) { 1708 if (InputIs(node, Type::TaggedPointer())) {
1694 DeferReplacement(node, node->InputAt(0)); 1709 DeferReplacement(node, node->InputAt(0));
1695 } 1710 }
1696 } 1711 }
1697 return; 1712 return;
1698 } 1713 }
1699 case IrOpcode::kCheckTaggedSigned: { 1714 case IrOpcode::kCheckTaggedSigned: {
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
3093 isolate(), graph()->zone(), callable.descriptor(), 0, flags, 3108 isolate(), graph()->zone(), callable.descriptor(), 0, flags,
3094 Operator::kNoProperties); 3109 Operator::kNoProperties);
3095 to_number_operator_.set(common()->Call(desc)); 3110 to_number_operator_.set(common()->Call(desc));
3096 } 3111 }
3097 return to_number_operator_.get(); 3112 return to_number_operator_.get();
3098 } 3113 }
3099 3114
3100 } // namespace compiler 3115 } // namespace compiler
3101 } // namespace internal 3116 } // namespace internal
3102 } // namespace v8 3117 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/redundancy-elimination.cc ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698