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

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

Issue 688853007: Implement aging of maps embedded in optimized code. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 1 month 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
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 825 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 HeapObject::cast(this)->map() == 836 HeapObject::cast(this)->map() ==
837 HeapObject::cast(this)->GetHeap()->hash_table_map(); 837 HeapObject::cast(this)->GetHeap()->hash_table_map();
838 } 838 }
839 839
840 840
841 bool Object::IsWeakHashTable() const { 841 bool Object::IsWeakHashTable() const {
842 return IsHashTable(); 842 return IsHashTable();
843 } 843 }
844 844
845 845
846 bool Object::IsEmbeddedMapCache() const { return IsHashTable(); }
847
848
846 bool Object::IsDictionary() const { 849 bool Object::IsDictionary() const {
847 return IsHashTable() && 850 return IsHashTable() &&
848 this != HeapObject::cast(this)->GetHeap()->string_table(); 851 this != HeapObject::cast(this)->GetHeap()->string_table();
849 } 852 }
850 853
851 854
852 bool Object::IsNameDictionary() const { 855 bool Object::IsNameDictionary() const {
853 return IsDictionary(); 856 return IsDictionary();
854 } 857 }
855 858
(...skipping 2445 matching lines...) Expand 10 before | Expand all | Expand 10 after
3301 CAST_ACCESSOR(SharedFunctionInfo) 3304 CAST_ACCESSOR(SharedFunctionInfo)
3302 CAST_ACCESSOR(SlicedString) 3305 CAST_ACCESSOR(SlicedString)
3303 CAST_ACCESSOR(Smi) 3306 CAST_ACCESSOR(Smi)
3304 CAST_ACCESSOR(String) 3307 CAST_ACCESSOR(String)
3305 CAST_ACCESSOR(StringTable) 3308 CAST_ACCESSOR(StringTable)
3306 CAST_ACCESSOR(Struct) 3309 CAST_ACCESSOR(Struct)
3307 CAST_ACCESSOR(Symbol) 3310 CAST_ACCESSOR(Symbol)
3308 CAST_ACCESSOR(UnseededNumberDictionary) 3311 CAST_ACCESSOR(UnseededNumberDictionary)
3309 CAST_ACCESSOR(WeakCell) 3312 CAST_ACCESSOR(WeakCell)
3310 CAST_ACCESSOR(WeakHashTable) 3313 CAST_ACCESSOR(WeakHashTable)
3314 CAST_ACCESSOR(EmbeddedMapCache)
Hannes Payer (out of office) 2014/11/17 17:34:33 alphabetic order
3311 3315
3312 3316
3313 template <class Traits> 3317 template <class Traits>
3314 FixedTypedArray<Traits>* FixedTypedArray<Traits>::cast(Object* object) { 3318 FixedTypedArray<Traits>* FixedTypedArray<Traits>::cast(Object* object) {
3315 SLOW_DCHECK(object->IsHeapObject() && 3319 SLOW_DCHECK(object->IsHeapObject() &&
3316 HeapObject::cast(object)->map()->instance_type() == 3320 HeapObject::cast(object)->map()->instance_type() ==
3317 Traits::kInstanceType); 3321 Traits::kInstanceType);
3318 return reinterpret_cast<FixedTypedArray<Traits>*>(object); 3322 return reinterpret_cast<FixedTypedArray<Traits>*>(object);
3319 } 3323 }
3320 3324
(...skipping 3694 matching lines...) Expand 10 before | Expand all | Expand 10 after
7015 } 7019 }
7016 7020
7017 7021
7018 Handle<ObjectHashTable> ObjectHashTable::Shrink( 7022 Handle<ObjectHashTable> ObjectHashTable::Shrink(
7019 Handle<ObjectHashTable> table, Handle<Object> key) { 7023 Handle<ObjectHashTable> table, Handle<Object> key) {
7020 return DerivedHashTable::Shrink(table, key); 7024 return DerivedHashTable::Shrink(table, key);
7021 } 7025 }
7022 7026
7023 7027
7024 template <int entrysize> 7028 template <int entrysize>
7025 bool WeakHashTableShape<entrysize>::IsMatch(Handle<Object> key, Object* other) { 7029 bool HeapPointerShape<entrysize>::IsMatch(Handle<Object> key, Object* other) {
7026 return key->SameValue(other); 7030 return key->SameValue(other);
7027 } 7031 }
7028 7032
7029 7033
7030 template <int entrysize> 7034 template <int entrysize>
7031 uint32_t WeakHashTableShape<entrysize>::Hash(Handle<Object> key) { 7035 uint32_t HeapPointerShape<entrysize>::Hash(Handle<Object> key) {
7032 intptr_t hash = reinterpret_cast<intptr_t>(*key); 7036 intptr_t hash = reinterpret_cast<intptr_t>(*key);
7033 return (uint32_t)(hash & 0xFFFFFFFF); 7037 return (uint32_t)(hash & 0xFFFFFFFF);
7034 } 7038 }
7035 7039
7036 7040
7037 template <int entrysize> 7041 template <int entrysize>
7038 uint32_t WeakHashTableShape<entrysize>::HashForObject(Handle<Object> key, 7042 uint32_t HeapPointerShape<entrysize>::HashForObject(Handle<Object> key,
7039 Object* other) { 7043 Object* other) {
7040 intptr_t hash = reinterpret_cast<intptr_t>(other); 7044 intptr_t hash = reinterpret_cast<intptr_t>(other);
7041 return (uint32_t)(hash & 0xFFFFFFFF); 7045 return (uint32_t)(hash & 0xFFFFFFFF);
7042 } 7046 }
7043 7047
7044 7048
7045 template <int entrysize> 7049 template <int entrysize>
7046 Handle<Object> WeakHashTableShape<entrysize>::AsHandle(Isolate* isolate, 7050 Handle<Object> HeapPointerShape<entrysize>::AsHandle(Isolate* isolate,
7047 Handle<Object> key) { 7051 Handle<Object> key) {
7048 return key; 7052 return key;
7049 } 7053 }
7050 7054
7051 7055
7052 void Map::ClearCodeCache(Heap* heap) { 7056 void Map::ClearCodeCache(Heap* heap) {
7053 // No write barrier is needed since empty_fixed_array is not in new space. 7057 // No write barrier is needed since empty_fixed_array is not in new space.
7054 // Please note this function is used during marking: 7058 // Please note this function is used during marking:
7055 // - MarkCompactCollector::MarkUnmarkedObject 7059 // - MarkCompactCollector::MarkUnmarkedObject
7056 // - IncrementalMarking::Step 7060 // - IncrementalMarking::Step
7057 DCHECK(!heap->InNewSpace(heap->empty_fixed_array())); 7061 DCHECK(!heap->InNewSpace(heap->empty_fixed_array()));
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
7350 #undef READ_SHORT_FIELD 7354 #undef READ_SHORT_FIELD
7351 #undef WRITE_SHORT_FIELD 7355 #undef WRITE_SHORT_FIELD
7352 #undef READ_BYTE_FIELD 7356 #undef READ_BYTE_FIELD
7353 #undef WRITE_BYTE_FIELD 7357 #undef WRITE_BYTE_FIELD
7354 #undef NOBARRIER_READ_BYTE_FIELD 7358 #undef NOBARRIER_READ_BYTE_FIELD
7355 #undef NOBARRIER_WRITE_BYTE_FIELD 7359 #undef NOBARRIER_WRITE_BYTE_FIELD
7356 7360
7357 } } // namespace v8::internal 7361 } } // namespace v8::internal
7358 7362
7359 #endif // V8_OBJECTS_INL_H_ 7363 #endif // V8_OBJECTS_INL_H_
OLDNEW
« src/objects.h ('K') | « src/objects.cc ('k') | src/serialize.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698