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

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

Issue 1295433002: [runtime] Remove useless IN builtin. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE again. Remove unused ReplaceWithBuiltinCall. Created 5 years, 3 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/opcodes.h ('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/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/code-factory.h" 10 #include "src/code-factory.h"
(...skipping 901 matching lines...) Expand 10 before | Expand all | Expand 10 after
912 Node* is_tagged = jsgraph_->graph()->NewNode( 912 Node* is_tagged = jsgraph_->graph()->NewNode(
913 jsgraph_->machine()->WordAnd(), node->InputAt(0), 913 jsgraph_->machine()->WordAnd(), node->InputAt(0),
914 jsgraph_->IntPtrConstant(kSmiTagMask)); 914 jsgraph_->IntPtrConstant(kSmiTagMask));
915 Node* is_smi = jsgraph_->graph()->NewNode( 915 Node* is_smi = jsgraph_->graph()->NewNode(
916 jsgraph_->machine()->WordEqual(), is_tagged, 916 jsgraph_->machine()->WordEqual(), is_tagged,
917 jsgraph_->IntPtrConstant(kSmiTag)); 917 jsgraph_->IntPtrConstant(kSmiTag));
918 DeferReplacement(node, is_smi); 918 DeferReplacement(node, is_smi);
919 } 919 }
920 break; 920 break;
921 } 921 }
922 case IrOpcode::kObjectIsNonNegativeSmi: {
923 ProcessInput(node, 0, kMachAnyTagged);
924 SetOutput(node, kRepBit | kTypeBool);
925 if (lower()) {
926 Node* is_tagged = jsgraph_->graph()->NewNode(
927 jsgraph_->machine()->WordAnd(), node->InputAt(0),
928 jsgraph_->IntPtrConstant(kSmiTagMask));
929 Node* is_smi = jsgraph_->graph()->NewNode(
930 jsgraph_->machine()->WordEqual(), is_tagged,
931 jsgraph_->IntPtrConstant(kSmiTag));
932 Node* is_non_neg = jsgraph_->graph()->NewNode(
933 jsgraph_->machine()->IntLessThanOrEqual(),
934 jsgraph_->IntPtrConstant(0), node->InputAt(0));
935 Node* is_non_neg_smi = jsgraph_->graph()->NewNode(
936 jsgraph_->machine()->Word32And(), is_smi, is_non_neg);
937 DeferReplacement(node, is_non_neg_smi);
938 }
939 break;
940 }
941 922
942 //------------------------------------------------------------------ 923 //------------------------------------------------------------------
943 // Machine-level operators. 924 // Machine-level operators.
944 //------------------------------------------------------------------ 925 //------------------------------------------------------------------
945 case IrOpcode::kLoad: { 926 case IrOpcode::kLoad: {
946 // TODO(titzer): machine loads/stores need to know BaseTaggedness!? 927 // TODO(titzer): machine loads/stores need to know BaseTaggedness!?
947 MachineTypeUnion tBase = kRepTagged | kMachPtr; 928 MachineTypeUnion tBase = kRepTagged | kMachPtr;
948 LoadRepresentation rep = OpParameter<LoadRepresentation>(node); 929 LoadRepresentation rep = OpParameter<LoadRepresentation>(node);
949 ProcessInput(node, 0, tBase); // pointer or object 930 ProcessInput(node, 0, tBase); // pointer or object
950 ProcessInput(node, 1, kMachIntPtr); // index 931 ProcessInput(node, 1, kMachIntPtr); // index
(...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after
1657 1638
1658 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) { 1639 void SimplifiedLowering::DoStringLessThanOrEqual(Node* node) {
1659 node->set_op(machine()->IntLessThanOrEqual()); 1640 node->set_op(machine()->IntLessThanOrEqual());
1660 node->ReplaceInput(0, StringComparison(node, true)); 1641 node->ReplaceInput(0, StringComparison(node, true));
1661 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL)); 1642 node->ReplaceInput(1, jsgraph()->SmiConstant(EQUAL));
1662 } 1643 }
1663 1644
1664 } // namespace compiler 1645 } // namespace compiler
1665 } // namespace internal 1646 } // namespace internal
1666 } // namespace v8 1647 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/simplified-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698