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

Side by Side Diff: src/objects.cc

Issue 1178403003: Revert of Keep track of array buffers in new space separately (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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-inl.h ('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 <iomanip> 5 #include <iomanip>
6 #include <sstream> 6 #include <sstream>
7 7
8 #include "src/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/accessors.h" 10 #include "src/accessors.h"
(...skipping 16485 matching lines...) Expand 10 before | Expand all | Expand 10 after
16496 FixedToExternalElementsKind(map->elements_kind())); 16496 FixedToExternalElementsKind(map->elements_kind()));
16497 16497
16498 Handle<FixedTypedArrayBase> fixed_typed_array( 16498 Handle<FixedTypedArrayBase> fixed_typed_array(
16499 FixedTypedArrayBase::cast(typed_array->elements())); 16499 FixedTypedArrayBase::cast(typed_array->elements()));
16500 16500
16501 Handle<JSArrayBuffer> buffer(JSArrayBuffer::cast(typed_array->buffer()), 16501 Handle<JSArrayBuffer> buffer(JSArrayBuffer::cast(typed_array->buffer()),
16502 isolate); 16502 isolate);
16503 void* backing_store = 16503 void* backing_store =
16504 isolate->array_buffer_allocator()->AllocateUninitialized( 16504 isolate->array_buffer_allocator()->AllocateUninitialized(
16505 fixed_typed_array->DataSize()); 16505 fixed_typed_array->DataSize());
16506 isolate->heap()->RegisterNewArrayBuffer(isolate->heap()->InNewSpace(*buffer), 16506 isolate->heap()->RegisterNewArrayBuffer(backing_store,
16507 backing_store,
16508 fixed_typed_array->DataSize()); 16507 fixed_typed_array->DataSize());
16509 buffer->set_backing_store(backing_store); 16508 buffer->set_backing_store(backing_store);
16510 buffer->set_is_external(false); 16509 buffer->set_is_external(false);
16511 memcpy(buffer->backing_store(), 16510 memcpy(buffer->backing_store(),
16512 fixed_typed_array->DataPtr(), 16511 fixed_typed_array->DataPtr(),
16513 fixed_typed_array->DataSize()); 16512 fixed_typed_array->DataSize());
16514 Handle<ExternalArray> new_elements = 16513 Handle<ExternalArray> new_elements =
16515 isolate->factory()->NewExternalArray( 16514 isolate->factory()->NewExternalArray(
16516 fixed_typed_array->length(), typed_array->type(), 16515 fixed_typed_array->length(), typed_array->type(),
16517 static_cast<uint8_t*>(buffer->backing_store())); 16516 static_cast<uint8_t*>(buffer->backing_store()));
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
16660 Handle<Object> new_value) { 16659 Handle<Object> new_value) {
16661 if (cell->value() != *new_value) { 16660 if (cell->value() != *new_value) {
16662 cell->set_value(*new_value); 16661 cell->set_value(*new_value);
16663 Isolate* isolate = cell->GetIsolate(); 16662 Isolate* isolate = cell->GetIsolate();
16664 cell->dependent_code()->DeoptimizeDependentCodeGroup( 16663 cell->dependent_code()->DeoptimizeDependentCodeGroup(
16665 isolate, DependentCode::kPropertyCellChangedGroup); 16664 isolate, DependentCode::kPropertyCellChangedGroup);
16666 } 16665 }
16667 } 16666 }
16668 } // namespace internal 16667 } // namespace internal
16669 } // namespace v8 16668 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/objects-visiting-inl.h ('k') | src/runtime/runtime-typedarray.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698