| 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/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
| 7 #include "src/compiler/js-operator.h" | 7 #include "src/compiler/js-operator.h" |
| 8 #include "src/compiler/js-typed-lowering.h" | 8 #include "src/compiler/js-typed-lowering.h" |
| 9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 72 // ----------------------------------------------------------------------------- | 72 // ----------------------------------------------------------------------------- |
| 73 // JSLoadProperty | 73 // JSLoadProperty |
| 74 | 74 |
| 75 | 75 |
| 76 TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArray) { | 76 TEST_F(JSTypedLoweringTest, JSLoadPropertyFromExternalTypedArray) { |
| 77 const size_t kLength = 17; | 77 const size_t kLength = 17; |
| 78 uint8_t backing_store[kLength * 8]; | 78 uint8_t backing_store[kLength * 8]; |
| 79 Handle<JSArrayBuffer> buffer = | 79 Handle<JSArrayBuffer> buffer = |
| 80 NewArrayBuffer(backing_store, arraysize(backing_store)); | 80 NewArrayBuffer(backing_store, arraysize(backing_store)); |
| 81 VectorSlotPair feedback(Handle<TypeFeedbackVector>::null(), | 81 VectorSlotPair feedback(Handle<TypeFeedbackVector>::null(), |
| 82 FeedbackVectorSlot::Invalid()); | 82 FeedbackVectorICSlot::Invalid()); |
| 83 TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) { | 83 TRACED_FOREACH(ExternalArrayType, type, kExternalArrayTypes) { |
| 84 Handle<JSTypedArray> array = | 84 Handle<JSTypedArray> array = |
| 85 factory()->NewJSTypedArray(type, buffer, kLength); | 85 factory()->NewJSTypedArray(type, buffer, kLength); |
| 86 | 86 |
| 87 Node* key = Parameter(Type::Integral32()); | 87 Node* key = Parameter(Type::Integral32()); |
| 88 Node* base = HeapConstant(array); | 88 Node* base = HeapConstant(array); |
| 89 Node* context = UndefinedConstant(); | 89 Node* context = UndefinedConstant(); |
| 90 Node* effect = graph()->start(); | 90 Node* effect = graph()->start(); |
| 91 Node* control = graph()->start(); | 91 Node* control = graph()->start(); |
| 92 Node* node = graph()->NewNode(javascript()->LoadProperty(feedback), base, | 92 Node* node = graph()->NewNode(javascript()->LoadProperty(feedback), base, |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 CaptureEq(&elements)), | 157 CaptureEq(&elements)), |
| 158 key, IsInt32Constant(static_cast<int>(kLength)), value, effect, | 158 key, IsInt32Constant(static_cast<int>(kLength)), value, effect, |
| 159 control)); | 159 control)); |
| 160 } | 160 } |
| 161 } | 161 } |
| 162 } | 162 } |
| 163 | 163 |
| 164 } // namespace compiler | 164 } // namespace compiler |
| 165 } // namespace internal | 165 } // namespace internal |
| 166 } // namespace v8 | 166 } // namespace v8 |
| OLD | NEW |