| 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 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 if (IsExternalArrayElementsKind(array->map()->elements_kind())) { | 607 if (IsExternalArrayElementsKind(array->map()->elements_kind())) { |
| 608 ExternalArrayType type = array->type(); | 608 ExternalArrayType type = array->type(); |
| 609 double byte_length = array->byte_length()->Number(); | 609 double byte_length = array->byte_length()->Number(); |
| 610 if (byte_length <= kMaxInt) { | 610 if (byte_length <= kMaxInt) { |
| 611 Handle<ExternalArray> elements = | 611 Handle<ExternalArray> elements = |
| 612 Handle<ExternalArray>::cast(handle(array->elements())); | 612 Handle<ExternalArray>::cast(handle(array->elements())); |
| 613 Node* pointer = jsgraph()->IntPtrConstant( | 613 Node* pointer = jsgraph()->IntPtrConstant( |
| 614 bit_cast<intptr_t>(elements->external_pointer())); | 614 bit_cast<intptr_t>(elements->external_pointer())); |
| 615 Node* length = jsgraph()->Constant(byte_length / array->element_size()); | 615 Node* length = jsgraph()->Constant(byte_length / array->element_size()); |
| 616 Node* effect = NodeProperties::GetEffectInput(node); | 616 Node* effect = NodeProperties::GetEffectInput(node); |
| 617 Node* control = NodeProperties::GetControlInput(node); | |
| 618 Node* load = graph()->NewNode( | 617 Node* load = graph()->NewNode( |
| 619 simplified()->LoadElement( | 618 simplified()->LoadElement( |
| 620 AccessBuilder::ForTypedArrayElement(type, true)), | 619 AccessBuilder::ForTypedArrayElement(type, true)), |
| 621 pointer, key, length, effect, control); | 620 pointer, key, length, effect); |
| 622 return ReplaceEagerly(node, load); | 621 return ReplaceEagerly(node, load); |
| 623 } | 622 } |
| 624 } | 623 } |
| 625 } | 624 } |
| 626 return NoChange(); | 625 return NoChange(); |
| 627 } | 626 } |
| 628 | 627 |
| 629 | 628 |
| 630 Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) { | 629 Reduction JSTypedLowering::ReduceJSStoreProperty(Node* node) { |
| 631 Node* key = NodeProperties::GetValueInput(node, 1); | 630 Node* key = NodeProperties::GetValueInput(node, 1); |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 755 return JSBuiltinReducer(jsgraph()).Reduce(node); | 754 return JSBuiltinReducer(jsgraph()).Reduce(node); |
| 756 default: | 755 default: |
| 757 break; | 756 break; |
| 758 } | 757 } |
| 759 return NoChange(); | 758 return NoChange(); |
| 760 } | 759 } |
| 761 | 760 |
| 762 } // namespace compiler | 761 } // namespace compiler |
| 763 } // namespace internal | 762 } // namespace internal |
| 764 } // namespace v8 | 763 } // namespace v8 |
| OLD | NEW |