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

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

Issue 258163003: Do not make objects in optimized code weak if collecting maps is disabled. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Extract comment check Created 6 years, 7 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 | « 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 4790 matching lines...) Expand 10 before | Expand all | Expand 10 after
4801 } 4801 }
4802 4802
4803 4803
4804 Object* Code::GetObjectFromEntryAddress(Address location_of_address) { 4804 Object* Code::GetObjectFromEntryAddress(Address location_of_address) {
4805 return HeapObject:: 4805 return HeapObject::
4806 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize); 4806 FromAddress(Memory::Address_at(location_of_address) - Code::kHeaderSize);
4807 } 4807 }
4808 4808
4809 4809
4810 bool Code::IsWeakObjectInOptimizedCode(Object* object) { 4810 bool Code::IsWeakObjectInOptimizedCode(Object* object) {
4811 if (!FLAG_collect_maps) return false;
4811 if (object->IsMap()) { 4812 if (object->IsMap()) {
4812 return Map::cast(object)->CanTransition() && 4813 return Map::cast(object)->CanTransition() &&
4813 FLAG_collect_maps &&
4814 FLAG_weak_embedded_maps_in_optimized_code; 4814 FLAG_weak_embedded_maps_in_optimized_code;
4815 } 4815 }
4816 if (object->IsJSObject() || 4816 if (object->IsJSObject() ||
4817 (object->IsCell() && Cell::cast(object)->value()->IsJSObject())) { 4817 (object->IsCell() && Cell::cast(object)->value()->IsJSObject())) {
4818 return FLAG_weak_embedded_objects_in_optimized_code; 4818 return FLAG_weak_embedded_objects_in_optimized_code;
4819 } 4819 }
4820 return false; 4820 return false;
4821 } 4821 }
4822 4822
4823 4823
(...skipping 2158 matching lines...) Expand 10 before | Expand all | Expand 10 after
6982 #undef READ_SHORT_FIELD 6982 #undef READ_SHORT_FIELD
6983 #undef WRITE_SHORT_FIELD 6983 #undef WRITE_SHORT_FIELD
6984 #undef READ_BYTE_FIELD 6984 #undef READ_BYTE_FIELD
6985 #undef WRITE_BYTE_FIELD 6985 #undef WRITE_BYTE_FIELD
6986 #undef NOBARRIER_READ_BYTE_FIELD 6986 #undef NOBARRIER_READ_BYTE_FIELD
6987 #undef NOBARRIER_WRITE_BYTE_FIELD 6987 #undef NOBARRIER_WRITE_BYTE_FIELD
6988 6988
6989 } } // namespace v8::internal 6989 } } // namespace v8::internal
6990 6990
6991 #endif // V8_OBJECTS_INL_H_ 6991 #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