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

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

Issue 909973004: Revert of Fix IsWeakObjectInOptimizedCode predicate to also include property cells. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | 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 5224 matching lines...) Expand 10 before | Expand all | Expand 10 after
5235 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize); 5235 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize);
5236 } 5236 }
5237 5237
5238 5238
5239 bool Code::IsWeakObjectInOptimizedCode(Object* object) { 5239 bool Code::IsWeakObjectInOptimizedCode(Object* object) {
5240 if (!FLAG_collect_maps) return false; 5240 if (!FLAG_collect_maps) return false;
5241 if (object->IsMap()) { 5241 if (object->IsMap()) {
5242 return Map::cast(object)->CanTransition() && 5242 return Map::cast(object)->CanTransition() &&
5243 FLAG_weak_embedded_maps_in_optimized_code; 5243 FLAG_weak_embedded_maps_in_optimized_code;
5244 } 5244 }
5245 if (object->IsCell() || object->IsPropertyCell()) { 5245 if (object->IsCell()) object = Cell::cast(object)->value();
5246 object = Cell::cast(object)->value();
5247 }
5248 if (object->IsJSObject()) { 5246 if (object->IsJSObject()) {
5249 return FLAG_weak_embedded_objects_in_optimized_code; 5247 return FLAG_weak_embedded_objects_in_optimized_code;
5250 } 5248 }
5251 if (object->IsFixedArray()) { 5249 if (object->IsFixedArray()) {
5252 // Contexts of inlined functions are embedded in optimized code. 5250 // Contexts of inlined functions are embedded in optimized code.
5253 Map* map = HeapObject::cast(object)->map(); 5251 Map* map = HeapObject::cast(object)->map();
5254 Heap* heap = map->GetHeap(); 5252 Heap* heap = map->GetHeap();
5255 return FLAG_weak_embedded_objects_in_optimized_code && 5253 return FLAG_weak_embedded_objects_in_optimized_code &&
5256 map == heap->function_context_map(); 5254 map == heap->function_context_map();
5257 } 5255 }
(...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after
7625 #undef READ_SHORT_FIELD 7623 #undef READ_SHORT_FIELD
7626 #undef WRITE_SHORT_FIELD 7624 #undef WRITE_SHORT_FIELD
7627 #undef READ_BYTE_FIELD 7625 #undef READ_BYTE_FIELD
7628 #undef WRITE_BYTE_FIELD 7626 #undef WRITE_BYTE_FIELD
7629 #undef NOBARRIER_READ_BYTE_FIELD 7627 #undef NOBARRIER_READ_BYTE_FIELD
7630 #undef NOBARRIER_WRITE_BYTE_FIELD 7628 #undef NOBARRIER_WRITE_BYTE_FIELD
7631 7629
7632 } } // namespace v8::internal 7630 } } // namespace v8::internal
7633 7631
7634 #endif // V8_OBJECTS_INL_H_ 7632 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698