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

Unified Diff: src/heap/heap.cc

Issue 1107843002: Reland "Remove the weak list of views from array buffers" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use bounds check Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/objects-visiting.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/heap.cc
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 3d5510b05b2780fdbf677a20489334f188217ecf..e9379ac5658c9653cb21023f180d567a2364c068 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -141,9 +141,7 @@ Heap::Heap()
chunks_queued_for_free_(NULL),
gc_callbacks_depth_(0),
deserialization_complete_(false),
- concurrent_sweeping_enabled_(false),
- migration_failure_(false),
- previous_migration_failure_(false) {
+ concurrent_sweeping_enabled_(false) {
// Allow build-time customization of the max semispace size. Building
// V8 with snapshots and a non-default max semispace size is much
// easier if you can define it as part of the build environment.
@@ -705,13 +703,6 @@ void Heap::GarbageCollectionEpilogue() {
// Remember the last top pointer so that we can later find out
// whether we allocated in new space since the last GC.
new_space_top_after_last_gc_ = new_space()->top();
-
- if (migration_failure_) {
- set_previous_migration_failure(true);
- } else {
- set_previous_migration_failure(false);
- }
- set_migration_failure(false);
}
@@ -1687,7 +1678,6 @@ void Heap::UpdateReferencesInExternalStringTable(
void Heap::ProcessAllWeakReferences(WeakObjectRetainer* retainer) {
ProcessArrayBuffers(retainer, false);
- ProcessNewArrayBufferViews(retainer);
ProcessNativeContexts(retainer);
ProcessAllocationSites(retainer);
}
@@ -1695,7 +1685,6 @@ void Heap::ProcessAllWeakReferences(WeakObjectRetainer* retainer) {
void Heap::ProcessYoungWeakReferences(WeakObjectRetainer* retainer) {
ProcessArrayBuffers(retainer, true);
- ProcessNewArrayBufferViews(retainer);
ProcessNativeContexts(retainer);
}
@@ -1722,7 +1711,6 @@ void Heap::ProcessArrayBuffers(WeakObjectRetainer* retainer,
Object* undefined = undefined_value();
Object* next = array_buffers_list();
bool old_objects_recorded = false;
- if (migration_failure()) return;
while (next != undefined) {
if (!old_objects_recorded) {
old_objects_recorded = !InNewSpace(next);
@@ -1733,20 +1721,6 @@ void Heap::ProcessArrayBuffers(WeakObjectRetainer* retainer,
}
-void Heap::ProcessNewArrayBufferViews(WeakObjectRetainer* retainer) {
- // Retain the list of new space views.
- Object* typed_array_obj = VisitWeakList<JSArrayBufferView>(
- this, new_array_buffer_views_list_, retainer, false, NULL);
- set_new_array_buffer_views_list(typed_array_obj);
-
- // Some objects in the list may be in old space now. Find them
- // and move them to the corresponding array buffer.
- Object* view = VisitNewArrayBufferViewsWeakList(
- this, new_array_buffer_views_list_, retainer);
- set_new_array_buffer_views_list(view);
-}
-
-
void Heap::TearDownArrayBuffers() {
Object* undefined = undefined_value();
for (Object* o = array_buffers_list(); o != undefined;) {
@@ -2178,7 +2152,6 @@ class ScavengingVisitor : public StaticVisitorBase {
if (SemiSpaceCopyObject<alignment>(map, slot, object, object_size)) {
return;
}
- heap->set_migration_failure(true);
}
if (PromoteObject<object_contents, alignment>(map, slot, object,
@@ -5403,7 +5376,6 @@ bool Heap::CreateHeapObjects() {
set_native_contexts_list(undefined_value());
set_array_buffers_list(undefined_value());
set_last_array_buffer_in_list(undefined_value());
- set_new_array_buffer_views_list(undefined_value());
set_allocation_sites_list(undefined_value());
return true;
}
« no previous file with comments | « src/heap/heap.h ('k') | src/heap/objects-visiting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698