| OLD | NEW | 
|---|
| 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 #include "src/heap/heap.h" | 5 #include "src/heap/heap.h" | 
| 6 | 6 | 
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" | 
| 8 #include "src/api.h" | 8 #include "src/api.h" | 
| 9 #include "src/ast/scopeinfo.h" | 9 #include "src/ast/scopeinfo.h" | 
| 10 #include "src/base/bits.h" | 10 #include "src/base/bits.h" | 
| (...skipping 1194 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1205 } | 1205 } | 
| 1206 | 1206 | 
| 1207 | 1207 | 
| 1208 void Heap::ClearNormalizedMapCaches() { | 1208 void Heap::ClearNormalizedMapCaches() { | 
| 1209   if (isolate_->bootstrapper()->IsActive() && | 1209   if (isolate_->bootstrapper()->IsActive() && | 
| 1210       !incremental_marking()->IsMarking()) { | 1210       !incremental_marking()->IsMarking()) { | 
| 1211     return; | 1211     return; | 
| 1212   } | 1212   } | 
| 1213 | 1213 | 
| 1214   Object* context = native_contexts_list(); | 1214   Object* context = native_contexts_list(); | 
| 1215   while (!context->IsUndefined()) { | 1215   while (!context->IsUndefined(isolate())) { | 
| 1216     // GC can happen when the context is not fully initialized, | 1216     // GC can happen when the context is not fully initialized, | 
| 1217     // so the cache can be undefined. | 1217     // so the cache can be undefined. | 
| 1218     Object* cache = | 1218     Object* cache = | 
| 1219         Context::cast(context)->get(Context::NORMALIZED_MAP_CACHE_INDEX); | 1219         Context::cast(context)->get(Context::NORMALIZED_MAP_CACHE_INDEX); | 
| 1220     if (!cache->IsUndefined()) { | 1220     if (!cache->IsUndefined(isolate())) { | 
| 1221       NormalizedMapCache::cast(cache)->Clear(); | 1221       NormalizedMapCache::cast(cache)->Clear(); | 
| 1222     } | 1222     } | 
| 1223     context = Context::cast(context)->next_context_link(); | 1223     context = Context::cast(context)->next_context_link(); | 
| 1224   } | 1224   } | 
| 1225 } | 1225 } | 
| 1226 | 1226 | 
| 1227 | 1227 | 
| 1228 void Heap::UpdateSurvivalStatistics(int start_new_space_size) { | 1228 void Heap::UpdateSurvivalStatistics(int start_new_space_size) { | 
| 1229   if (start_new_space_size == 0) return; | 1229   if (start_new_space_size == 0) return; | 
| 1230 | 1230 | 
| (...skipping 5160 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 6391 } | 6391 } | 
| 6392 | 6392 | 
| 6393 | 6393 | 
| 6394 // static | 6394 // static | 
| 6395 int Heap::GetStaticVisitorIdForMap(Map* map) { | 6395 int Heap::GetStaticVisitorIdForMap(Map* map) { | 
| 6396   return StaticVisitorBase::GetVisitorId(map); | 6396   return StaticVisitorBase::GetVisitorId(map); | 
| 6397 } | 6397 } | 
| 6398 | 6398 | 
| 6399 }  // namespace internal | 6399 }  // namespace internal | 
| 6400 }  // namespace v8 | 6400 }  // namespace v8 | 
| OLD | NEW | 
|---|