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

Side by Side Diff: src/objects.cc

Issue 1188313006: Version 4.4.63.8 (cherry-pick) (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@4.4
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 17082 matching lines...) Expand 10 before | Expand all | Expand 10 after
17093 FixedToExternalElementsKind(map->elements_kind())); 17093 FixedToExternalElementsKind(map->elements_kind()));
17094 17094
17095 Handle<FixedTypedArrayBase> fixed_typed_array( 17095 Handle<FixedTypedArrayBase> fixed_typed_array(
17096 FixedTypedArrayBase::cast(typed_array->elements())); 17096 FixedTypedArrayBase::cast(typed_array->elements()));
17097 17097
17098 Handle<JSArrayBuffer> buffer(JSArrayBuffer::cast(typed_array->buffer()), 17098 Handle<JSArrayBuffer> buffer(JSArrayBuffer::cast(typed_array->buffer()),
17099 isolate); 17099 isolate);
17100 void* backing_store = 17100 void* backing_store =
17101 isolate->array_buffer_allocator()->AllocateUninitialized( 17101 isolate->array_buffer_allocator()->AllocateUninitialized(
17102 fixed_typed_array->DataSize()); 17102 fixed_typed_array->DataSize());
17103 isolate->heap()->RegisterNewArrayBuffer(backing_store,
17104 fixed_typed_array->DataSize());
17105 buffer->set_backing_store(backing_store); 17103 buffer->set_backing_store(backing_store);
17106 buffer->set_is_external(false); 17104 buffer->set_is_external(false);
17105 isolate->heap()->RegisterNewArrayBuffer(isolate->heap()->InNewSpace(*buffer),
17106 backing_store,
17107 fixed_typed_array->DataSize());
17107 memcpy(buffer->backing_store(), 17108 memcpy(buffer->backing_store(),
17108 fixed_typed_array->DataPtr(), 17109 fixed_typed_array->DataPtr(),
17109 fixed_typed_array->DataSize()); 17110 fixed_typed_array->DataSize());
17110 Handle<ExternalArray> new_elements = 17111 Handle<ExternalArray> new_elements =
17111 isolate->factory()->NewExternalArray( 17112 isolate->factory()->NewExternalArray(
17112 fixed_typed_array->length(), typed_array->type(), 17113 fixed_typed_array->length(), typed_array->type(),
17113 static_cast<uint8_t*>(buffer->backing_store())); 17114 static_cast<uint8_t*>(buffer->backing_store()));
17114 17115
17115 JSObject::SetMapAndElements(typed_array, new_map, new_elements); 17116 JSObject::SetMapAndElements(typed_array, new_map, new_elements);
17116 17117
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
17255 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell, 17256 void PropertyCell::SetValueWithInvalidation(Handle<PropertyCell> cell,
17256 Handle<Object> new_value) { 17257 Handle<Object> new_value) {
17257 if (cell->value() != *new_value) { 17258 if (cell->value() != *new_value) {
17258 cell->set_value(*new_value); 17259 cell->set_value(*new_value);
17259 Isolate* isolate = cell->GetIsolate(); 17260 Isolate* isolate = cell->GetIsolate();
17260 cell->dependent_code()->DeoptimizeDependentCodeGroup( 17261 cell->dependent_code()->DeoptimizeDependentCodeGroup(
17261 isolate, DependentCode::kPropertyCellChangedGroup); 17262 isolate, DependentCode::kPropertyCellChangedGroup);
17262 } 17263 }
17263 } 17264 }
17264 } } // namespace v8::internal 17265 } } // namespace v8::internal
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