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

Side by Side Diff: src/compiler/js-intrinsic-lowering.cc

Issue 1994503002: [turbofan] Turn common Guard operator into simplified TypeGuard. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 unified diff | Download patch
« no previous file with comments | « src/compiler/escape-analysis.cc ('k') | src/compiler/js-native-context-specialization.cc » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/js-intrinsic-lowering.h" 5 #include "src/compiler/js-intrinsic-lowering.h"
6 6
7 #include <stack> 7 #include <stack>
8 8
9 #include "src/code-factory.h" 9 #include "src/code-factory.h"
10 #include "src/compiler/access-builder.h" 10 #include "src/compiler/access-builder.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 Revisit(graph()->end()); 130 Revisit(graph()->end());
131 131
132 node->TrimInputCount(0); 132 node->TrimInputCount(0);
133 NodeProperties::ChangeOp(node, common()->Dead()); 133 NodeProperties::ChangeOp(node, common()->Dead());
134 return Changed(node); 134 return Changed(node);
135 } 135 }
136 136
137 137
138 Reduction JSIntrinsicLowering::ReduceDoubleHi(Node* node) { 138 Reduction JSIntrinsicLowering::ReduceDoubleHi(Node* node) {
139 // Tell the compiler to assume number input. 139 // Tell the compiler to assume number input.
140 Node* renamed = graph()->NewNode(common()->Guard(Type::Number()), 140 Node* renamed = graph()->NewNode(simplified()->TypeGuard(Type::Number()),
141 node->InputAt(0), graph()->start()); 141 node->InputAt(0), graph()->start());
142 node->ReplaceInput(0, renamed); 142 node->ReplaceInput(0, renamed);
143 return Change(node, machine()->Float64ExtractHighWord32()); 143 return Change(node, machine()->Float64ExtractHighWord32());
144 } 144 }
145 145
146 146
147 Reduction JSIntrinsicLowering::ReduceDoubleLo(Node* node) { 147 Reduction JSIntrinsicLowering::ReduceDoubleLo(Node* node) {
148 // Tell the compiler to assume number input. 148 // Tell the compiler to assume number input.
149 Node* renamed = graph()->NewNode(common()->Guard(Type::Number()), 149 Node* renamed = graph()->NewNode(simplified()->TypeGuard(Type::Number()),
150 node->InputAt(0), graph()->start()); 150 node->InputAt(0), graph()->start());
151 node->ReplaceInput(0, renamed); 151 node->ReplaceInput(0, renamed);
152 return Change(node, machine()->Float64ExtractLowWord32()); 152 return Change(node, machine()->Float64ExtractLowWord32());
153 } 153 }
154 154
155 155
156 Reduction JSIntrinsicLowering::ReduceIsInstanceType( 156 Reduction JSIntrinsicLowering::ReduceIsInstanceType(
157 Node* node, InstanceType instance_type) { 157 Node* node, InstanceType instance_type) {
158 // if (%_IsSmi(value)) { 158 // if (%_IsSmi(value)) {
159 // return false; 159 // return false;
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 } 477 }
478 478
479 479
480 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { 480 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const {
481 return jsgraph()->simplified(); 481 return jsgraph()->simplified();
482 } 482 }
483 483
484 } // namespace compiler 484 } // namespace compiler
485 } // namespace internal 485 } // namespace internal
486 } // namespace v8 486 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/escape-analysis.cc ('k') | src/compiler/js-native-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698