OLD | NEW |
1 | 1 |
2 // Copyright 2015 the V8 project authors. All rights reserved. | 2 // Copyright 2015 the V8 project authors. All rights reserved. |
3 // Use of this source code is governed by a BSD-style license that can be | 3 // Use of this source code is governed by a BSD-style license that can be |
4 // found in the LICENSE file. | 4 // found in the LICENSE file. |
5 | 5 |
6 #include "src/compiler/js-intrinsic-lowering.h" | 6 #include "src/compiler/js-intrinsic-lowering.h" |
7 | 7 |
8 #include <stack> | 8 #include <stack> |
9 | 9 |
10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 NodeProperties::RemoveBounds(node); | 287 NodeProperties::RemoveBounds(node); |
288 NodeProperties::ReplaceWithValue(node, string, node); | 288 NodeProperties::ReplaceWithValue(node, string, node); |
289 return Changed(node); | 289 return Changed(node); |
290 } | 290 } |
291 | 291 |
292 | 292 |
293 Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) { | 293 Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) { |
294 Node* value = NodeProperties::GetValueInput(node, 0); | 294 Node* value = NodeProperties::GetValueInput(node, 0); |
295 Node* effect = NodeProperties::GetEffectInput(node); | 295 Node* effect = NodeProperties::GetEffectInput(node); |
296 Node* control = NodeProperties::GetControlInput(node); | 296 Node* control = NodeProperties::GetControlInput(node); |
297 return Change(node, simplified()->LoadField(AccessBuilder::ForStringLength()), | 297 return Change(node, simplified()->LoadField( |
| 298 AccessBuilder::ForStringLength(graph()->zone())), |
298 value, effect, control); | 299 value, effect, control); |
299 } | 300 } |
300 | 301 |
301 | 302 |
302 Reduction JSIntrinsicLowering::ReduceUnLikely(Node* node, BranchHint hint) { | 303 Reduction JSIntrinsicLowering::ReduceUnLikely(Node* node, BranchHint hint) { |
303 std::stack<Node*> nodes_to_visit; | 304 std::stack<Node*> nodes_to_visit; |
304 nodes_to_visit.push(node); | 305 nodes_to_visit.push(node); |
305 while (!nodes_to_visit.empty()) { | 306 while (!nodes_to_visit.empty()) { |
306 Node* current = nodes_to_visit.top(); | 307 Node* current = nodes_to_visit.top(); |
307 nodes_to_visit.pop(); | 308 nodes_to_visit.pop(); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 } | 424 } |
424 | 425 |
425 | 426 |
426 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { | 427 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { |
427 return jsgraph()->machine(); | 428 return jsgraph()->machine(); |
428 } | 429 } |
429 | 430 |
430 } // namespace compiler | 431 } // namespace compiler |
431 } // namespace internal | 432 } // namespace internal |
432 } // namespace v8 | 433 } // namespace v8 |
OLD | NEW |