Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(201)

Side by Side Diff: src/objects-inl.h

Issue 335553004: Keep maps when resetting elements. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: simplified as suggested Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 // Review notes: 5 // Review notes:
6 // 6 //
7 // - The use of macros in these inline functions may seem superfluous 7 // - The use of macros in these inline functions may seem superfluous
8 // but it is absolutely needed to make sure gcc generates optimal 8 // but it is absolutely needed to make sure gcc generates optimal
9 // code. gcc is not happy when attempting to inline too deep. 9 // code. gcc is not happy when attempting to inline too deep.
10 // 10 //
(...skipping 2720 matching lines...) Expand 10 before | Expand all | Expand 10 after
2731 return GetHeap()->empty_fixed_array(); 2731 return GetHeap()->empty_fixed_array();
2732 } else if (has_external_array_elements()) { 2732 } else if (has_external_array_elements()) {
2733 ExternalArray* empty_array = GetHeap()->EmptyExternalArrayForMap(this); 2733 ExternalArray* empty_array = GetHeap()->EmptyExternalArrayForMap(this);
2734 ASSERT(!GetHeap()->InNewSpace(empty_array)); 2734 ASSERT(!GetHeap()->InNewSpace(empty_array));
2735 return empty_array; 2735 return empty_array;
2736 } else if (has_fixed_typed_array_elements()) { 2736 } else if (has_fixed_typed_array_elements()) {
2737 FixedTypedArrayBase* empty_array = 2737 FixedTypedArrayBase* empty_array =
2738 GetHeap()->EmptyFixedTypedArrayForMap(this); 2738 GetHeap()->EmptyFixedTypedArrayForMap(this);
2739 ASSERT(!GetHeap()->InNewSpace(empty_array)); 2739 ASSERT(!GetHeap()->InNewSpace(empty_array));
2740 return empty_array; 2740 return empty_array;
2741 } else if (has_dictionary_elements()) {
2742 ASSERT(!GetHeap()->InNewSpace(GetHeap()->empty_slow_element_dictionary()));
2743 return GetHeap()->empty_slow_element_dictionary();
2741 } else { 2744 } else {
2742 UNREACHABLE(); 2745 UNREACHABLE();
2743 } 2746 }
2744 return NULL; 2747 return NULL;
2745 } 2748 }
2746 2749
2747 2750
2748 Object** DescriptorArray::GetKeySlot(int descriptor_number) { 2751 Object** DescriptorArray::GetKeySlot(int descriptor_number) {
2749 ASSERT(descriptor_number < number_of_descriptors()); 2752 ASSERT(descriptor_number < number_of_descriptors());
2750 return RawFieldOfElementAt(ToKeyIndex(descriptor_number)); 2753 return RawFieldOfElementAt(ToKeyIndex(descriptor_number));
(...skipping 4234 matching lines...) Expand 10 before | Expand all | Expand 10 after
6985 #undef READ_SHORT_FIELD 6988 #undef READ_SHORT_FIELD
6986 #undef WRITE_SHORT_FIELD 6989 #undef WRITE_SHORT_FIELD
6987 #undef READ_BYTE_FIELD 6990 #undef READ_BYTE_FIELD
6988 #undef WRITE_BYTE_FIELD 6991 #undef WRITE_BYTE_FIELD
6989 #undef NOBARRIER_READ_BYTE_FIELD 6992 #undef NOBARRIER_READ_BYTE_FIELD
6990 #undef NOBARRIER_WRITE_BYTE_FIELD 6993 #undef NOBARRIER_WRITE_BYTE_FIELD
6991 6994
6992 } } // namespace v8::internal 6995 } } // namespace v8::internal
6993 6996
6994 #endif // V8_OBJECTS_INL_H_ 6997 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698