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

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

Issue 1520613006: During property reconfiguring ensure that the first map that gets new descriptors is the one that o… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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') | test/cctest/test-unboxed-doubles.cc » ('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 4411 matching lines...) Expand 10 before | Expand all | Expand 10 after
4422 4422
4423 4423
4424 int Map::GetInObjectPropertyOffset(int index) { 4424 int Map::GetInObjectPropertyOffset(int index) {
4425 // Adjust for the number of properties stored in the object. 4425 // Adjust for the number of properties stored in the object.
4426 index -= GetInObjectProperties(); 4426 index -= GetInObjectProperties();
4427 DCHECK(index <= 0); 4427 DCHECK(index <= 0);
4428 return instance_size() + (index * kPointerSize); 4428 return instance_size() + (index * kPointerSize);
4429 } 4429 }
4430 4430
4431 4431
4432 Handle<Map> Map::CopyInstallDescriptorsForTesting( 4432 Handle<Map> Map::AddMissingTransitionsForTesting(
4433 Handle<Map> map, int new_descriptor, Handle<DescriptorArray> descriptors, 4433 Handle<Map> split_map, Handle<DescriptorArray> descriptors,
4434 Handle<LayoutDescriptor> layout_descriptor) { 4434 Handle<LayoutDescriptor> full_layout_descriptor) {
4435 return CopyInstallDescriptors(map, new_descriptor, descriptors, 4435 return AddMissingTransitions(split_map, descriptors, full_layout_descriptor);
4436 layout_descriptor);
4437 } 4436 }
4438 4437
4439 4438
4440 int HeapObject::SizeFromMap(Map* map) { 4439 int HeapObject::SizeFromMap(Map* map) {
4441 int instance_size = map->instance_size(); 4440 int instance_size = map->instance_size();
4442 if (instance_size != kVariableSizeSentinel) return instance_size; 4441 if (instance_size != kVariableSizeSentinel) return instance_size;
4443 // Only inline the most frequent cases. 4442 // Only inline the most frequent cases.
4444 InstanceType instance_type = map->instance_type(); 4443 InstanceType instance_type = map->instance_type();
4445 if (instance_type == FIXED_ARRAY_TYPE || 4444 if (instance_type == FIXED_ARRAY_TYPE ||
4446 instance_type == TRANSITION_ARRAY_TYPE) { 4445 instance_type == TRANSITION_ARRAY_TYPE) {
(...skipping 3421 matching lines...) Expand 10 before | Expand all | Expand 10 after
7868 #undef WRITE_INT64_FIELD 7867 #undef WRITE_INT64_FIELD
7869 #undef READ_BYTE_FIELD 7868 #undef READ_BYTE_FIELD
7870 #undef WRITE_BYTE_FIELD 7869 #undef WRITE_BYTE_FIELD
7871 #undef NOBARRIER_READ_BYTE_FIELD 7870 #undef NOBARRIER_READ_BYTE_FIELD
7872 #undef NOBARRIER_WRITE_BYTE_FIELD 7871 #undef NOBARRIER_WRITE_BYTE_FIELD
7873 7872
7874 } // namespace internal 7873 } // namespace internal
7875 } // namespace v8 7874 } // namespace v8
7876 7875
7877 #endif // V8_OBJECTS_INL_H_ 7876 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | test/cctest/test-unboxed-doubles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698