OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/access-builder.h" | 5 #include "src/compiler/access-builder.h" |
6 #include "src/compiler/graph-inl.h" | 6 #include "src/compiler/graph-inl.h" |
7 #include "src/compiler/js-builtin-reducer.h" | 7 #include "src/compiler/js-builtin-reducer.h" |
8 #include "src/compiler/js-typed-lowering.h" | 8 #include "src/compiler/js-typed-lowering.h" |
9 #include "src/compiler/node-aux-data-inl.h" | 9 #include "src/compiler/node-aux-data-inl.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
550 NodeProperties::GetEffectInput(node)); | 550 NodeProperties::GetEffectInput(node)); |
551 if (IsExternalArrayElementsKind(elements_kind)) { | 551 if (IsExternalArrayElementsKind(elements_kind)) { |
552 elements = graph()->NewNode( | 552 elements = graph()->NewNode( |
553 simplified()->LoadField(AccessBuilder::ForExternalArrayPointer()), | 553 simplified()->LoadField(AccessBuilder::ForExternalArrayPointer()), |
554 elements, NodeProperties::GetEffectInput(node)); | 554 elements, NodeProperties::GetEffectInput(node)); |
555 element_access = AccessBuilder::ForTypedArrayElement(type, true); | 555 element_access = AccessBuilder::ForTypedArrayElement(type, true); |
556 } else { | 556 } else { |
557 DCHECK(IsFixedTypedArrayElementsKind(elements_kind)); | 557 DCHECK(IsFixedTypedArrayElementsKind(elements_kind)); |
558 element_access = AccessBuilder::ForTypedArrayElement(type, false); | 558 element_access = AccessBuilder::ForTypedArrayElement(type, false); |
559 } | 559 } |
560 Node* value = | 560 Node* value = graph()->NewNode( |
561 graph()->NewNode(simplified()->LoadElement(element_access), elements, | 561 simplified()->LoadElement(element_access), elements, key, |
562 key, jsgraph()->Uint32Constant(length), | 562 jsgraph()->Uint32Constant(length), NodeProperties::GetEffectInput(node), |
563 NodeProperties::GetEffectInput(node)); | 563 NodeProperties::GetControlInput(node)); |
564 return ReplaceEagerly(node, value); | 564 return ReplaceEagerly(node, value); |
565 } | 565 } |
566 return NoChange(); | 566 return NoChange(); |
567 } | 567 } |
568 | 568 |
569 | 569 |
570 Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) { | 570 Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) { |
571 Node* key = NodeProperties::GetValueInput(node, 1); | 571 Node* key = NodeProperties::GetValueInput(node, 1); |
572 Node* base = NodeProperties::GetValueInput(node, 0); | 572 Node* base = NodeProperties::GetValueInput(node, 0); |
573 Node* value = NodeProperties::GetValueInput(node, 2); | 573 Node* value = NodeProperties::GetValueInput(node, 2); |
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 return JSBuiltinReducer(jsgraph()).Reduce(node); | 699 return JSBuiltinReducer(jsgraph()).Reduce(node); |
700 default: | 700 default: |
701 break; | 701 break; |
702 } | 702 } |
703 return NoChange(); | 703 return NoChange(); |
704 } | 704 } |
705 | 705 |
706 } // namespace compiler | 706 } // namespace compiler |
707 } // namespace internal | 707 } // namespace internal |
708 } // namespace v8 | 708 } // namespace v8 |
OLD | NEW |