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

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

Issue 1409763004: [types] Use the TypeCache consistently for common types. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/access-builder.cc ('k') | src/compiler/js-native-context-specialization.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 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/compiler/access-builder.h" 9 #include "src/compiler/access-builder.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 node, 311 node,
312 simplified()->StoreElement(AccessBuilder::ForSeqStringChar(encoding))); 312 simplified()->StoreElement(AccessBuilder::ForSeqStringChar(encoding)));
313 return Changed(node); 313 return Changed(node);
314 } 314 }
315 315
316 316
317 Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) { 317 Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) {
318 Node* value = NodeProperties::GetValueInput(node, 0); 318 Node* value = NodeProperties::GetValueInput(node, 0);
319 Node* effect = NodeProperties::GetEffectInput(node); 319 Node* effect = NodeProperties::GetEffectInput(node);
320 Node* control = NodeProperties::GetControlInput(node); 320 Node* control = NodeProperties::GetControlInput(node);
321 return Change(node, simplified()->LoadField( 321 return Change(node, simplified()->LoadField(AccessBuilder::ForStringLength()),
322 AccessBuilder::ForStringLength(graph()->zone())),
323 value, effect, control); 322 value, effect, control);
324 } 323 }
325 324
326 325
327 Reduction JSIntrinsicLowering::ReduceUnLikely(Node* node, BranchHint hint) { 326 Reduction JSIntrinsicLowering::ReduceUnLikely(Node* node, BranchHint hint) {
328 std::stack<Node*> nodes_to_visit; 327 std::stack<Node*> nodes_to_visit;
329 nodes_to_visit.push(node); 328 nodes_to_visit.push(node);
330 while (!nodes_to_visit.empty()) { 329 while (!nodes_to_visit.empty()) {
331 Node* current = nodes_to_visit.top(); 330 Node* current = nodes_to_visit.top();
332 nodes_to_visit.pop(); 331 nodes_to_visit.pop();
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 } 605 }
607 606
608 607
609 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { 608 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const {
610 return jsgraph()->simplified(); 609 return jsgraph()->simplified();
611 } 610 }
612 611
613 } // namespace compiler 612 } // namespace compiler
614 } // namespace internal 613 } // namespace internal
615 } // namespace v8 614 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/access-builder.cc ('k') | src/compiler/js-native-context-specialization.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698