| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |