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 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 Node* effect = NodeProperties::GetEffectInput(node); | 302 Node* effect = NodeProperties::GetEffectInput(node); |
303 Node* control = NodeProperties::GetControlInput(node); | 303 Node* control = NodeProperties::GetControlInput(node); |
304 node->set_op( | 304 node->set_op( |
305 simplified()->StoreElement(AccessBuilder::ForSeqStringChar(encoding))); | 305 simplified()->StoreElement(AccessBuilder::ForSeqStringChar(encoding))); |
306 node->ReplaceInput(0, string); | 306 node->ReplaceInput(0, string); |
307 node->ReplaceInput(1, index); | 307 node->ReplaceInput(1, index); |
308 node->ReplaceInput(2, chr); | 308 node->ReplaceInput(2, chr); |
309 node->ReplaceInput(3, effect); | 309 node->ReplaceInput(3, effect); |
310 node->ReplaceInput(4, control); | 310 node->ReplaceInput(4, control); |
311 node->TrimInputCount(5); | 311 node->TrimInputCount(5); |
312 NodeProperties::RemoveBounds(node); | 312 NodeProperties::RemoveType(node); |
313 ReplaceWithValue(node, string, node); | 313 ReplaceWithValue(node, string, node); |
314 return Changed(node); | 314 return Changed(node); |
315 } | 315 } |
316 | 316 |
317 | 317 |
318 Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) { | 318 Reduction JSIntrinsicLowering::ReduceStringGetLength(Node* node) { |
319 Node* value = NodeProperties::GetValueInput(node, 0); | 319 Node* value = NodeProperties::GetValueInput(node, 0); |
320 Node* effect = NodeProperties::GetEffectInput(node); | 320 Node* effect = NodeProperties::GetEffectInput(node); |
321 Node* control = NodeProperties::GetControlInput(node); | 321 Node* control = NodeProperties::GetControlInput(node); |
322 return Change(node, simplified()->LoadField( | 322 return Change(node, simplified()->LoadField( |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 } | 600 } |
601 | 601 |
602 | 602 |
603 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { | 603 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { |
604 return jsgraph()->machine(); | 604 return jsgraph()->machine(); |
605 } | 605 } |
606 | 606 |
607 } // namespace compiler | 607 } // namespace compiler |
608 } // namespace internal | 608 } // namespace internal |
609 } // namespace v8 | 609 } // namespace v8 |
OLD | NEW |