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

Side by Side Diff: src/objects.cc

Issue 904633003: Just visit young array buffers during scavenge. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « src/heap/objects-visiting.cc ('k') | src/runtime/runtime-typedarray.cc » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 <sstream> 5 #include <sstream>
6 6
7 #include "src/v8.h" 7 #include "src/v8.h"
8 8
9 #include "src/accessors.h" 9 #include "src/accessors.h"
10 #include "src/allocation-site-scopes.h" 10 #include "src/allocation-site-scopes.h"
(...skipping 16865 matching lines...) Expand 10 before | Expand all | Expand 10 after
16876 Runtime::SetupArrayBufferAllocatingData(isolate, buffer, 16876 Runtime::SetupArrayBufferAllocatingData(isolate, buffer,
16877 fixed_typed_array->DataSize(), false); 16877 fixed_typed_array->DataSize(), false);
16878 memcpy(buffer->backing_store(), 16878 memcpy(buffer->backing_store(),
16879 fixed_typed_array->DataPtr(), 16879 fixed_typed_array->DataPtr(),
16880 fixed_typed_array->DataSize()); 16880 fixed_typed_array->DataSize());
16881 Handle<ExternalArray> new_elements = 16881 Handle<ExternalArray> new_elements =
16882 isolate->factory()->NewExternalArray( 16882 isolate->factory()->NewExternalArray(
16883 fixed_typed_array->length(), typed_array->type(), 16883 fixed_typed_array->length(), typed_array->type(),
16884 static_cast<uint8_t*>(buffer->backing_store())); 16884 static_cast<uint8_t*>(buffer->backing_store()));
16885 16885
16886 buffer->set_weak_first_view(*typed_array); 16886 Heap* heap = isolate->heap();
16887 DCHECK(typed_array->weak_next() == isolate->heap()->undefined_value()); 16887 if (heap->InNewSpace(*typed_array)) {
16888 DCHECK(typed_array->weak_next() == isolate->heap()->undefined_value());
16889 typed_array->set_weak_next(heap->new_array_buffer_views_list());
16890 heap->set_new_array_buffer_views_list(*typed_array);
16891 } else {
16892 buffer->set_weak_first_view(*typed_array);
16893 DCHECK(typed_array->weak_next() == isolate->heap()->undefined_value());
16894 }
16888 typed_array->set_buffer(*buffer); 16895 typed_array->set_buffer(*buffer);
16889 JSObject::SetMapAndElements(typed_array, new_map, new_elements); 16896 JSObject::SetMapAndElements(typed_array, new_map, new_elements);
16890 16897
16891 return buffer; 16898 return buffer;
16892 } 16899 }
16893 16900
16894 16901
16895 Handle<JSArrayBuffer> JSTypedArray::GetBuffer() { 16902 Handle<JSArrayBuffer> JSTypedArray::GetBuffer() {
16896 Handle<Object> result(buffer(), GetIsolate()); 16903 Handle<Object> result(buffer(), GetIsolate());
16897 if (*result != Smi::FromInt(0)) { 16904 if (*result != Smi::FromInt(0)) {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
16960 Handle<DependentCode> codes = 16967 Handle<DependentCode> codes =
16961 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()), 16968 DependentCode::Insert(handle(cell->dependent_code(), info->isolate()),
16962 DependentCode::kPropertyCellChangedGroup, 16969 DependentCode::kPropertyCellChangedGroup,
16963 info->object_wrapper()); 16970 info->object_wrapper());
16964 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); 16971 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes);
16965 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( 16972 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add(
16966 cell, info->zone()); 16973 cell, info->zone());
16967 } 16974 }
16968 16975
16969 } } // namespace v8::internal 16976 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/heap/objects-visiting.cc ('k') | src/runtime/runtime-typedarray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698