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

Side by Side Diff: src/heap/heap.cc

Issue 1918453002: Version 5.0.71.35 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@5.0
Patch Set: Created 4 years, 8 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 | « include/v8-version.h ('k') | src/profiler/heap-profiler.h » ('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 #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 3051 matching lines...) Expand 10 before | Expand all | Expand 10 after
3062 // At this point, we may be deserializing the heap from a snapshot, and 3062 // At this point, we may be deserializing the heap from a snapshot, and
3063 // none of the maps have been created yet and are NULL. 3063 // none of the maps have been created yet and are NULL.
3064 DCHECK((filler->map() == NULL && !deserialization_complete_) || 3064 DCHECK((filler->map() == NULL && !deserialization_complete_) ||
3065 filler->map()->IsMap()); 3065 filler->map()->IsMap());
3066 } 3066 }
3067 3067
3068 3068
3069 bool Heap::CanMoveObjectStart(HeapObject* object) { 3069 bool Heap::CanMoveObjectStart(HeapObject* object) {
3070 if (!FLAG_move_object_start) return false; 3070 if (!FLAG_move_object_start) return false;
3071 3071
3072 // Sampling heap profiler may have a reference to the object.
3073 if (isolate()->heap_profiler()->is_sampling_allocations()) return false;
3074
3072 Address address = object->address(); 3075 Address address = object->address();
3073 3076
3074 if (lo_space()->Contains(object)) return false; 3077 if (lo_space()->Contains(object)) return false;
3075 3078
3076 Page* page = Page::FromAddress(address); 3079 Page* page = Page::FromAddress(address);
3077 // We can move the object start if: 3080 // We can move the object start if:
3078 // (1) the object is not in old space, 3081 // (1) the object is not in old space,
3079 // (2) the page of the object was already swept, 3082 // (2) the page of the object was already swept,
3080 // (3) the page was already concurrently swept. This case is an optimization 3083 // (3) the page was already concurrently swept. This case is an optimization
3081 // for concurrent sweeping. The WasSwept predicate for concurrently swept 3084 // for concurrent sweeping. The WasSwept predicate for concurrently swept
(...skipping 3244 matching lines...) Expand 10 before | Expand all | Expand 10 after
6326 } 6329 }
6327 6330
6328 6331
6329 // static 6332 // static
6330 int Heap::GetStaticVisitorIdForMap(Map* map) { 6333 int Heap::GetStaticVisitorIdForMap(Map* map) {
6331 return StaticVisitorBase::GetVisitorId(map); 6334 return StaticVisitorBase::GetVisitorId(map);
6332 } 6335 }
6333 6336
6334 } // namespace internal 6337 } // namespace internal
6335 } // namespace v8 6338 } // namespace v8
OLDNEW
« no previous file with comments | « include/v8-version.h ('k') | src/profiler/heap-profiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698