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 6155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
12715 case EXTERNAL_FLOAT_ELEMENTS: { | 12764 case EXTERNAL_FLOAT_ELEMENTS: { |
12716 Handle<ExternalFloatArray> array( | 12765 Handle<ExternalFloatArray> array( |
12717 ExternalFloatArray::cast(object->elements())); | 12766 ExternalFloatArray::cast(object->elements())); |
12718 return ExternalFloatArray::SetValue(array, index, value); | 12767 return ExternalFloatArray::SetValue(array, index, value); |
12719 } | 12768 } |
12720 case EXTERNAL_DOUBLE_ELEMENTS: { | 12769 case EXTERNAL_DOUBLE_ELEMENTS: { |
12721 Handle<ExternalDoubleArray> array( | 12770 Handle<ExternalDoubleArray> array( |
12722 ExternalDoubleArray::cast(object->elements())); | 12771 ExternalDoubleArray::cast(object->elements())); |
12723 return ExternalDoubleArray::SetValue(array, index, value); | 12772 return ExternalDoubleArray::SetValue(array, index, value); |
12724 } | 12773 } |
| 12774 case UINT8_ELEMENTS: { |
| 12775 Handle<FixedUint8Array> array( |
| 12776 FixedUint8Array::cast(object->elements())); |
| 12777 return FixedUint8Array::SetValue(array, index, value); |
| 12778 } |
| 12779 case UINT8_CLAMPED_ELEMENTS: { |
| 12780 Handle<FixedUint8ClampedArray> array( |
| 12781 FixedUint8ClampedArray::cast(object->elements())); |
| 12782 return FixedUint8ClampedArray::SetValue(array, index, value); |
| 12783 } |
| 12784 case INT8_ELEMENTS: { |
| 12785 Handle<FixedInt8Array> array( |
| 12786 FixedInt8Array::cast(object->elements())); |
| 12787 return FixedInt8Array::SetValue(array, index, value); |
| 12788 } |
| 12789 case UINT16_ELEMENTS: { |
| 12790 Handle<FixedUint16Array> array( |
| 12791 FixedUint16Array::cast(object->elements())); |
| 12792 return FixedUint16Array::SetValue(array, index, value); |
| 12793 } |
| 12794 case INT16_ELEMENTS: { |
| 12795 Handle<FixedInt16Array> array( |
| 12796 FixedInt16Array::cast(object->elements())); |
| 12797 return FixedInt16Array::SetValue(array, index, value); |
| 12798 } |
| 12799 case UINT32_ELEMENTS: { |
| 12800 Handle<FixedUint32Array> array( |
| 12801 FixedUint32Array::cast(object->elements())); |
| 12802 return FixedUint32Array::SetValue(array, index, value); |
| 12803 } |
| 12804 case INT32_ELEMENTS: { |
| 12805 Handle<FixedInt32Array> array( |
| 12806 FixedInt32Array::cast(object->elements())); |
| 12807 return FixedInt32Array::SetValue(array, index, value); |
| 12808 } |
| 12809 case FLOAT32_ELEMENTS: { |
| 12810 Handle<FixedFloat32Array> array( |
| 12811 FixedFloat32Array::cast(object->elements())); |
| 12812 return FixedFloat32Array::SetValue(array, index, value); |
| 12813 } |
| 12814 case FLOAT64_ELEMENTS: { |
| 12815 Handle<FixedFloat64Array> array( |
| 12816 FixedFloat64Array::cast(object->elements())); |
| 12817 return FixedFloat64Array::SetValue(array, index, value); |
| 12818 } |
12725 case DICTIONARY_ELEMENTS: | 12819 case DICTIONARY_ELEMENTS: |
12726 return SetDictionaryElement(object, index, value, attributes, strict_mode, | 12820 return SetDictionaryElement(object, index, value, attributes, strict_mode, |
12727 check_prototype, | 12821 check_prototype, |
12728 set_mode); | 12822 set_mode); |
12729 case NON_STRICT_ARGUMENTS_ELEMENTS: { | 12823 case NON_STRICT_ARGUMENTS_ELEMENTS: { |
12730 Handle<FixedArray> parameter_map(FixedArray::cast(object->elements())); | 12824 Handle<FixedArray> parameter_map(FixedArray::cast(object->elements())); |
12731 uint32_t length = parameter_map->length(); | 12825 uint32_t length = parameter_map->length(); |
12732 Handle<Object> probe = index < length - 2 ? | 12826 Handle<Object> probe = index < length - 2 ? |
12733 Handle<Object>(parameter_map->get(index + 2), isolate) : | 12827 Handle<Object>(parameter_map->get(index + 2), isolate) : |
12734 Handle<Object>(); | 12828 Handle<Object>(); |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13109 } | 13203 } |
13110 case EXTERNAL_BYTE_ELEMENTS: | 13204 case EXTERNAL_BYTE_ELEMENTS: |
13111 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 13205 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
13112 case EXTERNAL_SHORT_ELEMENTS: | 13206 case EXTERNAL_SHORT_ELEMENTS: |
13113 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 13207 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
13114 case EXTERNAL_INT_ELEMENTS: | 13208 case EXTERNAL_INT_ELEMENTS: |
13115 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 13209 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
13116 case EXTERNAL_FLOAT_ELEMENTS: | 13210 case EXTERNAL_FLOAT_ELEMENTS: |
13117 case EXTERNAL_DOUBLE_ELEMENTS: | 13211 case EXTERNAL_DOUBLE_ELEMENTS: |
13118 case EXTERNAL_PIXEL_ELEMENTS: | 13212 case EXTERNAL_PIXEL_ELEMENTS: |
| 13213 case UINT8_ELEMENTS: |
| 13214 case INT8_ELEMENTS: |
| 13215 case UINT16_ELEMENTS: |
| 13216 case INT16_ELEMENTS: |
| 13217 case UINT32_ELEMENTS: |
| 13218 case INT32_ELEMENTS: |
| 13219 case FLOAT32_ELEMENTS: |
| 13220 case FLOAT64_ELEMENTS: |
| 13221 case UINT8_CLAMPED_ELEMENTS: { |
13119 // External arrays are considered 100% used. | 13222 // External arrays are considered 100% used. |
13120 ExternalArray* external_array = ExternalArray::cast(elements()); | 13223 FixedArrayBase* external_array = FixedArrayBase::cast(elements()); |
13121 *capacity = external_array->length(); | 13224 *capacity = external_array->length(); |
13122 *used = external_array->length(); | 13225 *used = external_array->length(); |
13123 break; | 13226 break; |
| 13227 } |
13124 } | 13228 } |
13125 } | 13229 } |
13126 | 13230 |
13127 | 13231 |
13128 bool JSObject::ShouldConvertToSlowElements(int new_capacity) { | 13232 bool JSObject::ShouldConvertToSlowElements(int new_capacity) { |
13129 STATIC_ASSERT(kMaxUncheckedOldFastElementsLength <= | 13233 STATIC_ASSERT(kMaxUncheckedOldFastElementsLength <= |
13130 kMaxUncheckedFastElementsLength); | 13234 kMaxUncheckedFastElementsLength); |
13131 if (new_capacity <= kMaxUncheckedOldFastElementsLength || | 13235 if (new_capacity <= kMaxUncheckedOldFastElementsLength || |
13132 (new_capacity <= kMaxUncheckedFastElementsLength && | 13236 (new_capacity <= kMaxUncheckedFastElementsLength && |
13133 GetHeap()->InNewSpace(this))) { | 13237 GetHeap()->InNewSpace(this))) { |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
13621 ASSERT(!storage || storage->length() >= counter); | 13725 ASSERT(!storage || storage->length() >= counter); |
13622 break; | 13726 break; |
13623 } | 13727 } |
13624 case EXTERNAL_BYTE_ELEMENTS: | 13728 case EXTERNAL_BYTE_ELEMENTS: |
13625 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: | 13729 case EXTERNAL_UNSIGNED_BYTE_ELEMENTS: |
13626 case EXTERNAL_SHORT_ELEMENTS: | 13730 case EXTERNAL_SHORT_ELEMENTS: |
13627 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: | 13731 case EXTERNAL_UNSIGNED_SHORT_ELEMENTS: |
13628 case EXTERNAL_INT_ELEMENTS: | 13732 case EXTERNAL_INT_ELEMENTS: |
13629 case EXTERNAL_UNSIGNED_INT_ELEMENTS: | 13733 case EXTERNAL_UNSIGNED_INT_ELEMENTS: |
13630 case EXTERNAL_FLOAT_ELEMENTS: | 13734 case EXTERNAL_FLOAT_ELEMENTS: |
13631 case EXTERNAL_DOUBLE_ELEMENTS: { | 13735 case EXTERNAL_DOUBLE_ELEMENTS: |
13632 int length = ExternalArray::cast(elements())->length(); | 13736 case UINT8_ELEMENTS: |
| 13737 case INT8_ELEMENTS: |
| 13738 case UINT16_ELEMENTS: |
| 13739 case INT16_ELEMENTS: |
| 13740 case UINT32_ELEMENTS: |
| 13741 case INT32_ELEMENTS: |
| 13742 case FLOAT32_ELEMENTS: |
| 13743 case FLOAT64_ELEMENTS: |
| 13744 case UINT8_CLAMPED_ELEMENTS: { |
| 13745 int length = FixedArrayBase::cast(elements())->length(); |
13633 while (counter < length) { | 13746 while (counter < length) { |
13634 if (storage != NULL) { | 13747 if (storage != NULL) { |
13635 storage->set(counter, Smi::FromInt(counter)); | 13748 storage->set(counter, Smi::FromInt(counter)); |
13636 } | 13749 } |
13637 counter++; | 13750 counter++; |
13638 } | 13751 } |
13639 ASSERT(!storage || storage->length() >= counter); | 13752 ASSERT(!storage || storage->length() >= counter); |
13640 break; | 13753 break; |
13641 } | 13754 } |
13642 case DICTIONARY_ELEMENTS: { | 13755 case DICTIONARY_ELEMENTS: { |
(...skipping 2997 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16640 #define ERROR_MESSAGES_TEXTS(C, T) T, | 16753 #define ERROR_MESSAGES_TEXTS(C, T) T, |
16641 static const char* error_messages_[] = { | 16754 static const char* error_messages_[] = { |
16642 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) | 16755 ERROR_MESSAGES_LIST(ERROR_MESSAGES_TEXTS) |
16643 }; | 16756 }; |
16644 #undef ERROR_MESSAGES_TEXTS | 16757 #undef ERROR_MESSAGES_TEXTS |
16645 return error_messages_[reason]; | 16758 return error_messages_[reason]; |
16646 } | 16759 } |
16647 | 16760 |
16648 | 16761 |
16649 } } // namespace v8::internal | 16762 } } // namespace v8::internal |
OLD | NEW |