OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1671 ExternalUnsignedIntArray::cast(this)->length()); | 1671 ExternalUnsignedIntArray::cast(this)->length()); |
1672 break; | 1672 break; |
1673 case EXTERNAL_FLOAT_ARRAY_TYPE: | 1673 case EXTERNAL_FLOAT_ARRAY_TYPE: |
1674 accumulator->Add("<ExternalFloatArray[%u]>", | 1674 accumulator->Add("<ExternalFloatArray[%u]>", |
1675 ExternalFloatArray::cast(this)->length()); | 1675 ExternalFloatArray::cast(this)->length()); |
1676 break; | 1676 break; |
1677 case EXTERNAL_DOUBLE_ARRAY_TYPE: | 1677 case EXTERNAL_DOUBLE_ARRAY_TYPE: |
1678 accumulator->Add("<ExternalDoubleArray[%u]>", | 1678 accumulator->Add("<ExternalDoubleArray[%u]>", |
1679 ExternalDoubleArray::cast(this)->length()); | 1679 ExternalDoubleArray::cast(this)->length()); |
1680 break; | 1680 break; |
| 1681 case FIXED_UINT8_ARRAY_TYPE: |
| 1682 accumulator->Add("<FixedUint8Array[%u]>", |
| 1683 FixedUint8Array::cast(this)->length()); |
| 1684 break; |
1681 case SHARED_FUNCTION_INFO_TYPE: { | 1685 case SHARED_FUNCTION_INFO_TYPE: { |
1682 SharedFunctionInfo* shared = SharedFunctionInfo::cast(this); | 1686 SharedFunctionInfo* shared = SharedFunctionInfo::cast(this); |
1683 SmartArrayPointer<char> debug_name = | 1687 SmartArrayPointer<char> debug_name = |
1684 shared->DebugName()->ToCString(); | 1688 shared->DebugName()->ToCString(); |
1685 if (debug_name[0] != 0) { | 1689 if (debug_name[0] != 0) { |
1686 accumulator->Add("<SharedFunctionInfo %s>", debug_name.get()); | 1690 accumulator->Add("<SharedFunctionInfo %s>", debug_name.get()); |
1687 } else { | 1691 } else { |
1688 accumulator->Add("<SharedFunctionInfo>"); | 1692 accumulator->Add("<SharedFunctionInfo>"); |
1689 } | 1693 } |
1690 break; | 1694 break; |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1860 case FREE_SPACE_TYPE: | 1864 case FREE_SPACE_TYPE: |
1861 case EXTERNAL_PIXEL_ARRAY_TYPE: | 1865 case EXTERNAL_PIXEL_ARRAY_TYPE: |
1862 case EXTERNAL_BYTE_ARRAY_TYPE: | 1866 case EXTERNAL_BYTE_ARRAY_TYPE: |
1863 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE: | 1867 case EXTERNAL_UNSIGNED_BYTE_ARRAY_TYPE: |
1864 case EXTERNAL_SHORT_ARRAY_TYPE: | 1868 case EXTERNAL_SHORT_ARRAY_TYPE: |
1865 case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE: | 1869 case EXTERNAL_UNSIGNED_SHORT_ARRAY_TYPE: |
1866 case EXTERNAL_INT_ARRAY_TYPE: | 1870 case EXTERNAL_INT_ARRAY_TYPE: |
1867 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: | 1871 case EXTERNAL_UNSIGNED_INT_ARRAY_TYPE: |
1868 case EXTERNAL_FLOAT_ARRAY_TYPE: | 1872 case EXTERNAL_FLOAT_ARRAY_TYPE: |
1869 case EXTERNAL_DOUBLE_ARRAY_TYPE: | 1873 case EXTERNAL_DOUBLE_ARRAY_TYPE: |
| 1874 case FIXED_INT8_ARRAY_TYPE: |
| 1875 case FIXED_UINT8_ARRAY_TYPE: |
| 1876 case FIXED_INT16_ARRAY_TYPE: |
| 1877 case FIXED_UINT16_ARRAY_TYPE: |
| 1878 case FIXED_INT32_ARRAY_TYPE: |
| 1879 case FIXED_UINT32_ARRAY_TYPE: |
| 1880 case FIXED_FLOAT32_ARRAY_TYPE: |
| 1881 case FIXED_FLOAT64_ARRAY_TYPE: |
| 1882 case FIXED_UINT8_CLAMPED_ARRAY_TYPE: |
1870 break; | 1883 break; |
1871 case SHARED_FUNCTION_INFO_TYPE: { | 1884 case SHARED_FUNCTION_INFO_TYPE: { |
1872 SharedFunctionInfo::BodyDescriptor::IterateBody(this, v); | 1885 SharedFunctionInfo::BodyDescriptor::IterateBody(this, v); |
1873 break; | 1886 break; |
1874 } | 1887 } |
1875 | 1888 |
1876 #define MAKE_STRUCT_CASE(NAME, Name, name) \ | 1889 #define MAKE_STRUCT_CASE(NAME, Name, name) \ |
1877 case NAME##_TYPE: | 1890 case NAME##_TYPE: |
1878 STRUCT_LIST(MAKE_STRUCT_CASE) | 1891 STRUCT_LIST(MAKE_STRUCT_CASE) |
1879 #undef MAKE_STRUCT_CASE | 1892 #undef MAKE_STRUCT_CASE |
(...skipping 3491 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5371 case EXTERNAL_BYTE_ELEMENTS: | 5384 case EXTERNAL_BYTE_ELEMENTS: |
5372 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 5385 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
5373 case EXTERNAL_SHORT_ELEMENTS: | 5386 case EXTERNAL_SHORT_ELEMENTS: |
5374 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 5387 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
5375 case EXTERNAL_INT_ELEMENTS: | 5388 case EXTERNAL_INT_ELEMENTS: |
5376 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 5389 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
5377 case EXTERNAL_FLOAT_ELEMENTS: | 5390 case EXTERNAL_FLOAT_ELEMENTS: |
5378 case EXTERNAL_DOUBLE_ELEMENTS: | 5391 case EXTERNAL_DOUBLE_ELEMENTS: |
5379 case FAST_DOUBLE_ELEMENTS: | 5392 case FAST_DOUBLE_ELEMENTS: |
5380 case FAST_HOLEY_DOUBLE_ELEMENTS: | 5393 case FAST_HOLEY_DOUBLE_ELEMENTS: |
| 5394 case UINT8_ELEMENTS: |
| 5395 case INT8_ELEMENTS: |
| 5396 case UINT16_ELEMENTS: |
| 5397 case INT16_ELEMENTS: |
| 5398 case UINT32_ELEMENTS: |
| 5399 case INT32_ELEMENTS: |
| 5400 case FLOAT32_ELEMENTS: |
| 5401 case FLOAT64_ELEMENTS: |
| 5402 case UINT8_CLAMPED_ELEMENTS: |
5381 // Raw pixels and external arrays do not reference other | 5403 // Raw pixels and external arrays do not reference other |
5382 // objects. | 5404 // objects. |
5383 break; | 5405 break; |
5384 case FAST_SMI_ELEMENTS: | 5406 case FAST_SMI_ELEMENTS: |
5385 case FAST_HOLEY_SMI_ELEMENTS: | 5407 case FAST_HOLEY_SMI_ELEMENTS: |
5386 break; | 5408 break; |
5387 case FAST_ELEMENTS: | 5409 case FAST_ELEMENTS: |
5388 case FAST_HOLEY_ELEMENTS: | 5410 case FAST_HOLEY_ELEMENTS: |
5389 case DICTIONARY_ELEMENTS: { | 5411 case DICTIONARY_ELEMENTS: { |
5390 FixedArray* elements = FixedArray::cast(this->elements()); | 5412 FixedArray* elements = FixedArray::cast(this->elements()); |
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5863 case EXTERNAL_BYTE_ELEMENTS: | 5885 case EXTERNAL_BYTE_ELEMENTS: |
5864 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 5886 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
5865 case EXTERNAL_SHORT_ELEMENTS: | 5887 case EXTERNAL_SHORT_ELEMENTS: |
5866 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 5888 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
5867 case EXTERNAL_INT_ELEMENTS: | 5889 case EXTERNAL_INT_ELEMENTS: |
5868 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 5890 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
5869 case EXTERNAL_FLOAT_ELEMENTS: | 5891 case EXTERNAL_FLOAT_ELEMENTS: |
5870 case EXTERNAL_DOUBLE_ELEMENTS: | 5892 case EXTERNAL_DOUBLE_ELEMENTS: |
5871 case FAST_DOUBLE_ELEMENTS: | 5893 case FAST_DOUBLE_ELEMENTS: |
5872 case FAST_HOLEY_DOUBLE_ELEMENTS: | 5894 case FAST_HOLEY_DOUBLE_ELEMENTS: |
| 5895 case UINT8_ELEMENTS: |
| 5896 case INT8_ELEMENTS: |
| 5897 case UINT16_ELEMENTS: |
| 5898 case INT16_ELEMENTS: |
| 5899 case UINT32_ELEMENTS: |
| 5900 case INT32_ELEMENTS: |
| 5901 case FLOAT32_ELEMENTS: |
| 5902 case FLOAT64_ELEMENTS: |
| 5903 case UINT8_CLAMPED_ELEMENTS: |
5873 // No contained objects, nothing to do. | 5904 // No contained objects, nothing to do. |
5874 break; | 5905 break; |
5875 } | 5906 } |
5876 } | 5907 } |
5877 | 5908 |
5878 return copy; | 5909 return copy; |
5879 } | 5910 } |
5880 | 5911 |
5881 | 5912 |
5882 Handle<JSObject> JSObject::DeepWalk( | 5913 Handle<JSObject> JSObject::DeepWalk( |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6082 break; | 6113 break; |
6083 case EXTERNAL_PIXEL_ELEMENTS: | 6114 case EXTERNAL_PIXEL_ELEMENTS: |
6084 case EXTERNAL_BYTE_ELEMENTS: | 6115 case EXTERNAL_BYTE_ELEMENTS: |
6085 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 6116 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
6086 case EXTERNAL_SHORT_ELEMENTS: | 6117 case EXTERNAL_SHORT_ELEMENTS: |
6087 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 6118 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
6088 case EXTERNAL_INT_ELEMENTS: | 6119 case EXTERNAL_INT_ELEMENTS: |
6089 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 6120 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
6090 case EXTERNAL_FLOAT_ELEMENTS: | 6121 case EXTERNAL_FLOAT_ELEMENTS: |
6091 case EXTERNAL_DOUBLE_ELEMENTS: | 6122 case EXTERNAL_DOUBLE_ELEMENTS: |
| 6123 case UINT8_ELEMENTS: |
| 6124 case INT8_ELEMENTS: |
| 6125 case UINT16_ELEMENTS: |
| 6126 case INT16_ELEMENTS: |
| 6127 case UINT32_ELEMENTS: |
| 6128 case INT32_ELEMENTS: |
| 6129 case FLOAT32_ELEMENTS: |
| 6130 case FLOAT64_ELEMENTS: |
| 6131 case UINT8_CLAMPED_ELEMENTS: |
6092 // Ignore getters and setters on pixel and external array elements. | 6132 // Ignore getters and setters on pixel and external array elements. |
6093 return; | 6133 return; |
6094 case DICTIONARY_ELEMENTS: | 6134 case DICTIONARY_ELEMENTS: |
6095 if (UpdateGetterSetterInDictionary(object->element_dictionary(), | 6135 if (UpdateGetterSetterInDictionary(object->element_dictionary(), |
6096 index, | 6136 index, |
6097 *getter, | 6137 *getter, |
6098 *setter, | 6138 *setter, |
6099 attributes)) { | 6139 attributes)) { |
6100 return; | 6140 return; |
6101 } | 6141 } |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6540 break; | 6580 break; |
6541 case EXTERNAL_PIXEL_ELEMENTS: | 6581 case EXTERNAL_PIXEL_ELEMENTS: |
6542 case EXTERNAL_BYTE_ELEMENTS: | 6582 case EXTERNAL_BYTE_ELEMENTS: |
6543 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 6583 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
6544 case EXTERNAL_SHORT_ELEMENTS: | 6584 case EXTERNAL_SHORT_ELEMENTS: |
6545 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 6585 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
6546 case EXTERNAL_INT_ELEMENTS: | 6586 case EXTERNAL_INT_ELEMENTS: |
6547 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 6587 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
6548 case EXTERNAL_FLOAT_ELEMENTS: | 6588 case EXTERNAL_FLOAT_ELEMENTS: |
6549 case EXTERNAL_DOUBLE_ELEMENTS: | 6589 case EXTERNAL_DOUBLE_ELEMENTS: |
| 6590 case UINT8_ELEMENTS: |
| 6591 case INT8_ELEMENTS: |
| 6592 case UINT16_ELEMENTS: |
| 6593 case INT16_ELEMENTS: |
| 6594 case UINT32_ELEMENTS: |
| 6595 case INT32_ELEMENTS: |
| 6596 case FLOAT32_ELEMENTS: |
| 6597 case FLOAT64_ELEMENTS: |
| 6598 case UINT8_CLAMPED_ELEMENTS: |
6550 // Ignore getters and setters on pixel and external array | 6599 // Ignore getters and setters on pixel and external array |
6551 // elements. | 6600 // elements. |
6552 return factory->undefined_value(); | 6601 return factory->undefined_value(); |
6553 case DICTIONARY_ELEMENTS: | 6602 case DICTIONARY_ELEMENTS: |
6554 break; | 6603 break; |
6555 case NON_STRICT_ARGUMENTS_ELEMENTS: | 6604 case NON_STRICT_ARGUMENTS_ELEMENTS: |
6556 UNIMPLEMENTED(); | 6605 UNIMPLEMENTED(); |
6557 break; | 6606 break; |
6558 } | 6607 } |
6559 | 6608 |
(...skipping 6181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12741 case EXTERNAL_FLOAT_ELEMENTS: { | 12790 case EXTERNAL_FLOAT_ELEMENTS: { |
12742 Handle<ExternalFloatArray> array( | 12791 Handle<ExternalFloatArray> array( |
12743 ExternalFloatArray::cast(object->elements())); | 12792 ExternalFloatArray::cast(object->elements())); |
12744 return ExternalFloatArray::SetValue(array, index, value); | 12793 return ExternalFloatArray::SetValue(array, index, value); |
12745 } | 12794 } |
12746 case EXTERNAL_DOUBLE_ELEMENTS: { | 12795 case EXTERNAL_DOUBLE_ELEMENTS: { |
12747 Handle<ExternalDoubleArray> array( | 12796 Handle<ExternalDoubleArray> array( |
12748 ExternalDoubleArray::cast(object->elements())); | 12797 ExternalDoubleArray::cast(object->elements())); |
12749 return ExternalDoubleArray::SetValue(array, index, value); | 12798 return ExternalDoubleArray::SetValue(array, index, value); |
12750 } | 12799 } |
| 12800 case UINT8_ELEMENTS: { |
| 12801 Handle<FixedUint8Array> array( |
| 12802 FixedUint8Array::cast(object->elements())); |
| 12803 return FixedUint8Array::SetValue(array, index, value); |
| 12804 } |
| 12805 case UINT8_CLAMPED_ELEMENTS: { |
| 12806 Handle<FixedUint8ClampedArray> array( |
| 12807 FixedUint8ClampedArray::cast(object->elements())); |
| 12808 return FixedUint8ClampedArray::SetValue(array, index, value); |
| 12809 } |
| 12810 case INT8_ELEMENTS: { |
| 12811 Handle<FixedInt8Array> array( |
| 12812 FixedInt8Array::cast(object->elements())); |
| 12813 return FixedInt8Array::SetValue(array, index, value); |
| 12814 } |
| 12815 case UINT16_ELEMENTS: { |
| 12816 Handle<FixedUint16Array> array( |
| 12817 FixedUint16Array::cast(object->elements())); |
| 12818 return FixedUint16Array::SetValue(array, index, value); |
| 12819 } |
| 12820 case INT16_ELEMENTS: { |
| 12821 Handle<FixedInt16Array> array( |
| 12822 FixedInt16Array::cast(object->elements())); |
| 12823 return FixedInt16Array::SetValue(array, index, value); |
| 12824 } |
| 12825 case UINT32_ELEMENTS: { |
| 12826 Handle<FixedUint32Array> array( |
| 12827 FixedUint32Array::cast(object->elements())); |
| 12828 return FixedUint32Array::SetValue(array, index, value); |
| 12829 } |
| 12830 case INT32_ELEMENTS: { |
| 12831 Handle<FixedInt32Array> array( |
| 12832 FixedInt32Array::cast(object->elements())); |
| 12833 return FixedInt32Array::SetValue(array, index, value); |
| 12834 } |
| 12835 case FLOAT32_ELEMENTS: { |
| 12836 Handle<FixedFloat32Array> array( |
| 12837 FixedFloat32Array::cast(object->elements())); |
| 12838 return FixedFloat32Array::SetValue(array, index, value); |
| 12839 } |
| 12840 case FLOAT64_ELEMENTS: { |
| 12841 Handle<FixedFloat64Array> array( |
| 12842 FixedFloat64Array::cast(object->elements())); |
| 12843 return FixedFloat64Array::SetValue(array, index, value); |
| 12844 } |
12751 case DICTIONARY_ELEMENTS: | 12845 case DICTIONARY_ELEMENTS: |
12752 return SetDictionaryElement(object, index, value, attributes, strict_mode, | 12846 return SetDictionaryElement(object, index, value, attributes, strict_mode, |
12753 check_prototype, | 12847 check_prototype, |
12754 set_mode); | 12848 set_mode); |
12755 case NON_STRICT_ARGUMENTS_ELEMENTS: { | 12849 case NON_STRICT_ARGUMENTS_ELEMENTS: { |
12756 Handle<FixedArray> parameter_map(FixedArray::cast(object->elements())); | 12850 Handle<FixedArray> parameter_map(FixedArray::cast(object->elements())); |
12757 uint32_t length = parameter_map->length(); | 12851 uint32_t length = parameter_map->length(); |
12758 Handle<Object> probe = index < length - 2 ? | 12852 Handle<Object> probe = index < length - 2 ? |
12759 Handle<Object>(parameter_map->get(index + 2), isolate) : | 12853 Handle<Object>(parameter_map->get(index + 2), isolate) : |
12760 Handle<Object>(); | 12854 Handle<Object>(); |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13135 } | 13229 } |
13136 case EXTERNAL_BYTE_ELEMENTS: | 13230 case EXTERNAL_BYTE_ELEMENTS: |
13137 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 13231 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
13138 case EXTERNAL_SHORT_ELEMENTS: | 13232 case EXTERNAL_SHORT_ELEMENTS: |
13139 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 13233 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
13140 case EXTERNAL_INT_ELEMENTS: | 13234 case EXTERNAL_INT_ELEMENTS: |
13141 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 13235 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
13142 case EXTERNAL_FLOAT_ELEMENTS: | 13236 case EXTERNAL_FLOAT_ELEMENTS: |
13143 case EXTERNAL_DOUBLE_ELEMENTS: | 13237 case EXTERNAL_DOUBLE_ELEMENTS: |
13144 case EXTERNAL_PIXEL_ELEMENTS: | 13238 case EXTERNAL_PIXEL_ELEMENTS: |
| 13239 case UINT8_ELEMENTS: |
| 13240 case INT8_ELEMENTS: |
| 13241 case UINT16_ELEMENTS: |
| 13242 case INT16_ELEMENTS: |
| 13243 case UINT32_ELEMENTS: |
| 13244 case INT32_ELEMENTS: |
| 13245 case FLOAT32_ELEMENTS: |
| 13246 case FLOAT64_ELEMENTS: |
| 13247 case UINT8_CLAMPED_ELEMENTS: { |
13145 // External arrays are considered 100% used. | 13248 // External arrays are considered 100% used. |
13146 ExternalArray* external_array = ExternalArray::cast(elements()); | 13249 FixedArrayBase* external_array = FixedArrayBase::cast(elements()); |
13147 *capacity = external_array->length(); | 13250 *capacity = external_array->length(); |
13148 *used = external_array->length(); | 13251 *used = external_array->length(); |
13149 break; | 13252 break; |
| 13253 } |
13150 } | 13254 } |
13151 } | 13255 } |
13152 | 13256 |
13153 | 13257 |
13154 bool JSObject::ShouldConvertToSlowElements(int new_capacity) { | 13258 bool JSObject::ShouldConvertToSlowElements(int new_capacity) { |
13155 STATIC_ASSERT(kMaxUncheckedOldFastElementsLength <= | 13259 STATIC_ASSERT(kMaxUncheckedOldFastElementsLength <= |
13156 kMaxUncheckedFastElementsLength); | 13260 kMaxUncheckedFastElementsLength); |
13157 if (new_capacity <= kMaxUncheckedOldFastElementsLength || | 13261 if (new_capacity <= kMaxUncheckedOldFastElementsLength || |
13158 (new_capacity <= kMaxUncheckedFastElementsLength && | 13262 (new_capacity <= kMaxUncheckedFastElementsLength && |
13159 GetHeap()->InNewSpace(this))) { | 13263 GetHeap()->InNewSpace(this))) { |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13647 ASSERT(!storage || storage->length() >= counter); | 13751 ASSERT(!storage || storage->length() >= counter); |
13648 break; | 13752 break; |
13649 } | 13753 } |
13650 case EXTERNAL_BYTE_ELEMENTS: | 13754 case EXTERNAL_BYTE_ELEMENTS: |
13651 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 13755 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
13652 case EXTERNAL_SHORT_ELEMENTS: | 13756 case EXTERNAL_SHORT_ELEMENTS: |
13653 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 13757 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
13654 case EXTERNAL_INT_ELEMENTS: | 13758 case EXTERNAL_INT_ELEMENTS: |
13655 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 13759 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
13656 case EXTERNAL_FLOAT_ELEMENTS: | 13760 case EXTERNAL_FLOAT_ELEMENTS: |
13657 case EXTERNAL_DOUBLE_ELEMENTS: { | 13761 case EXTERNAL_DOUBLE_ELEMENTS: |
13658 int length = ExternalArray::cast(elements())->length(); | 13762 case UINT8_ELEMENTS: |
| 13763 case INT8_ELEMENTS: |
| 13764 case UINT16_ELEMENTS: |
| 13765 case INT16_ELEMENTS: |
| 13766 case UINT32_ELEMENTS: |
| 13767 case INT32_ELEMENTS: |
| 13768 case FLOAT32_ELEMENTS: |
| 13769 case FLOAT64_ELEMENTS: |
| 13770 case UINT8_CLAMPED_ELEMENTS: { |
| 13771 int length = FixedArrayBase::cast(elements())->length(); |
13659 while (counter < length) { | 13772 while (counter < length) { |
13660 if (storage != NULL) { | 13773 if (storage != NULL) { |
13661 storage->set(counter, Smi::FromInt(counter)); | 13774 storage->set(counter, Smi::FromInt(counter)); |
13662 } | 13775 } |
13663 counter++; | 13776 counter++; |
13664 } | 13777 } |
13665 ASSERT(!storage || storage->length() >= counter); | 13778 ASSERT(!storage || storage->length() >= counter); |
13666 break; | 13779 break; |
13667 } | 13780 } |
13668 case DICTIONARY_ELEMENTS: { | 13781 case DICTIONARY_ELEMENTS: { |
(...skipping 2997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16666 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16779 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16667 static const char* error_messages_[] = { | 16780 static const char* error_messages_[] = { |
16668 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16781 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16669 }; | 16782 }; |
16670 #undef ERROR_MESSAGES_TEXTS | 16783 #undef ERROR_MESSAGES_TEXTS |
16671 return error_messages_[reason]; | 16784 return error_messages_[reason]; |
16672 } | 16785 } |
16673 | 16786 |
16674 | 16787 |
16675 } } // namespace v8::internal | 16788 } } // namespace v8::internal |
OLD | NEW |