| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 node->AppendInput(zone(), effect); | 136 node->AppendInput(zone(), effect); |
| 137 node->AppendInput(zone(), control); | 137 node->AppendInput(zone(), control); |
| 138 Reduction r = Reduce(node); | 138 Reduction r = Reduce(node); |
| 139 | 139 |
| 140 ASSERT_TRUE(r.Changed()); | 140 ASSERT_TRUE(r.Changed()); |
| 141 EXPECT_THAT( | 141 EXPECT_THAT( |
| 142 r.replacement(), | 142 r.replacement(), |
| 143 IsLoadElement(AccessBuilder::ForTypedArrayElement(type, true), | 143 IsLoadElement(AccessBuilder::ForTypedArrayElement(type, true), |
| 144 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), | 144 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), |
| 145 key, IsNumberConstant(static_cast<double>(kLength)), | 145 key, IsNumberConstant(static_cast<double>(kLength)), |
| 146 effect, control)); | 146 effect)); |
| 147 } | 147 } |
| 148 } | 148 } |
| 149 | 149 |
| 150 | 150 |
| 151 // ----------------------------------------------------------------------------- | 151 // ----------------------------------------------------------------------------- |
| 152 // JSStoreProperty | 152 // JSStoreProperty |
| 153 | 153 |
| 154 | 154 |
| 155 TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArray) { | 155 TEST_F(JSTypedLoweringTest, JSStorePropertyToExternalTypedArray) { |
| 156 const size_t kLength = 17; | 156 const size_t kLength = 17; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 184 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), | 184 IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), |
| 185 key, IsNumberConstant(static_cast<double>(kLength)), | 185 key, IsNumberConstant(static_cast<double>(kLength)), |
| 186 value, effect, control)); | 186 value, effect, control)); |
| 187 } | 187 } |
| 188 } | 188 } |
| 189 } | 189 } |
| 190 | 190 |
| 191 } // namespace compiler | 191 } // namespace compiler |
| 192 } // namespace internal | 192 } // namespace internal |
| 193 } // namespace v8 | 193 } // namespace v8 |
| OLD | NEW |