| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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/builtins/builtins.h" | 5 #include "src/builtins/builtins.h" |
| 6 #include "src/builtins/builtins-utils.h" | 6 #include "src/builtins/builtins-utils.h" |
| 7 | 7 |
| 8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
| 9 #include "src/contexts.h" | 9 #include "src/contexts.h" |
| 10 #include "src/elements.h" | 10 #include "src/elements.h" |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 "Disallow pushing onto arrays in dictionary named property mode"); | 226 "Disallow pushing onto arrays in dictionary named property mode"); |
| 227 Node* bit_field3 = assembler.LoadMapBitField3(map); | 227 Node* bit_field3 = assembler.LoadMapBitField3(map); |
| 228 assembler.GotoIf(assembler.IsSetWord32<Map::DictionaryMap>(bit_field3), | 228 assembler.GotoIf(assembler.IsSetWord32<Map::DictionaryMap>(bit_field3), |
| 229 &runtime); | 229 &runtime); |
| 230 | 230 |
| 231 // Check whether the length property is writable. The length property is the | 231 // Check whether the length property is writable. The length property is the |
| 232 // only default named property on arrays. It's nonconfigurable, hence is | 232 // only default named property on arrays. It's nonconfigurable, hence is |
| 233 // guaranteed to stay the first property. | 233 // guaranteed to stay the first property. |
| 234 Node* descriptors = assembler.LoadMapDescriptors(map); | 234 Node* descriptors = assembler.LoadMapDescriptors(map); |
| 235 Node* details = assembler.LoadFixedArrayElement( | 235 Node* details = assembler.LoadFixedArrayElement( |
| 236 descriptors, | 236 descriptors, DescriptorArray::ToDetailsIndex(0)); |
| 237 assembler.Int32Constant(DescriptorArray::ToDetailsIndex(0))); | |
| 238 mask = READ_ONLY << PropertyDetails::AttributesField::kShift; | 237 mask = READ_ONLY << PropertyDetails::AttributesField::kShift; |
| 239 Node* mask_node = assembler.SmiConstant(mask); | 238 Node* mask_node = assembler.SmiConstant(mask); |
| 240 test = assembler.WordAnd(details, mask_node); | 239 test = assembler.WordAnd(details, mask_node); |
| 241 assembler.GotoIf(assembler.WordEqual(test, mask_node), &runtime); | 240 assembler.GotoIf(assembler.WordEqual(test, mask_node), &runtime); |
| 242 | 241 |
| 243 arg_index.Bind(assembler.IntPtrConstant(0)); | 242 arg_index.Bind(assembler.IntPtrConstant(0)); |
| 244 kind = assembler.DecodeWord32<Map::ElementsKindBits>(bit_field2); | 243 kind = assembler.DecodeWord32<Map::ElementsKindBits>(bit_field2); |
| 245 | 244 |
| 246 assembler.GotoIf( | 245 assembler.GotoIf( |
| 247 assembler.IntPtrGreaterThan( | 246 assembler.IntPtrGreaterThan( |
| (...skipping 2510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2758 Runtime::kThrowIncompatibleMethodReceiver, context, | 2757 Runtime::kThrowIncompatibleMethodReceiver, context, |
| 2759 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked( | 2758 assembler.HeapConstant(assembler.factory()->NewStringFromAsciiChecked( |
| 2760 "Array Iterator.prototype.next", TENURED)), | 2759 "Array Iterator.prototype.next", TENURED)), |
| 2761 iterator); | 2760 iterator); |
| 2762 assembler.Return(result); | 2761 assembler.Return(result); |
| 2763 } | 2762 } |
| 2764 } | 2763 } |
| 2765 | 2764 |
| 2766 } // namespace internal | 2765 } // namespace internal |
| 2767 } // namespace v8 | 2766 } // namespace v8 |
| OLD | NEW |