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

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

Issue 2601643002: [runtime] Add MapUpdater class that manages all kinds of map updates. (Closed)
Patch Set: Addressing comments Created 3 years, 11 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
« no previous file with comments | « src/objects.cc ('k') | src/property.h » ('j') | 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 3007 matching lines...) Expand 10 before | Expand all | Expand 10 after
3018 result = GetHeap()->empty_sloppy_arguments_elements(); 3018 result = GetHeap()->empty_sloppy_arguments_elements();
3019 } else if (has_fixed_typed_array_elements()) { 3019 } else if (has_fixed_typed_array_elements()) {
3020 result = GetHeap()->EmptyFixedTypedArrayForMap(this); 3020 result = GetHeap()->EmptyFixedTypedArrayForMap(this);
3021 } else { 3021 } else {
3022 UNREACHABLE(); 3022 UNREACHABLE();
3023 } 3023 }
3024 DCHECK(!GetHeap()->InNewSpace(result)); 3024 DCHECK(!GetHeap()->InNewSpace(result));
3025 return result; 3025 return result;
3026 } 3026 }
3027 3027
3028 // static
3029 Handle<Map> Map::ReconfigureProperty(Handle<Map> map, int modify_index,
3030 PropertyKind new_kind,
3031 PropertyAttributes new_attributes,
3032 Representation new_representation,
3033 Handle<FieldType> new_field_type,
3034 StoreMode store_mode) {
3035 return Reconfigure(map, map->elements_kind(), modify_index, new_kind,
3036 new_attributes, new_representation, new_field_type,
3037 store_mode);
3038 }
3039
3040 // static
3041 Handle<Map> Map::ReconfigureElementsKind(Handle<Map> map,
3042 ElementsKind new_elements_kind) {
3043 return Reconfigure(map, new_elements_kind, -1, kData, NONE,
3044 Representation::None(), FieldType::None(map->GetIsolate()),
3045 ALLOW_IN_DESCRIPTOR);
3046 }
3047
3048 Object** DescriptorArray::GetKeySlot(int descriptor_number) { 3028 Object** DescriptorArray::GetKeySlot(int descriptor_number) {
3049 DCHECK(descriptor_number < number_of_descriptors()); 3029 DCHECK(descriptor_number < number_of_descriptors());
3050 return RawFieldOfElementAt(ToKeyIndex(descriptor_number)); 3030 return RawFieldOfElementAt(ToKeyIndex(descriptor_number));
3051 } 3031 }
3052 3032
3053 3033
3054 Object** DescriptorArray::GetDescriptorStartSlot(int descriptor_number) { 3034 Object** DescriptorArray::GetDescriptorStartSlot(int descriptor_number) {
3055 return GetKeySlot(descriptor_number); 3035 return GetKeySlot(descriptor_number);
3056 } 3036 }
3057 3037
(...skipping 5393 matching lines...) Expand 10 before | Expand all | Expand 10 after
8451 #undef WRITE_INT64_FIELD 8431 #undef WRITE_INT64_FIELD
8452 #undef READ_BYTE_FIELD 8432 #undef READ_BYTE_FIELD
8453 #undef WRITE_BYTE_FIELD 8433 #undef WRITE_BYTE_FIELD
8454 #undef NOBARRIER_READ_BYTE_FIELD 8434 #undef NOBARRIER_READ_BYTE_FIELD
8455 #undef NOBARRIER_WRITE_BYTE_FIELD 8435 #undef NOBARRIER_WRITE_BYTE_FIELD
8456 8436
8457 } // namespace internal 8437 } // namespace internal
8458 } // namespace v8 8438 } // namespace v8
8459 8439
8460 #endif // V8_OBJECTS_INL_H_ 8440 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/property.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698