| OLD | NEW |
| 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 Loading... |
| 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(backing_store, | 16506 isolate->heap()->RegisterNewArrayBuffer(isolate->heap()->InNewSpace(*buffer), |
| 16507 backing_store, |
| 16507 fixed_typed_array->DataSize()); | 16508 fixed_typed_array->DataSize()); |
| 16508 buffer->set_backing_store(backing_store); | 16509 buffer->set_backing_store(backing_store); |
| 16509 buffer->set_is_external(false); | 16510 buffer->set_is_external(false); |
| 16510 memcpy(buffer->backing_store(), | 16511 memcpy(buffer->backing_store(), |
| 16511 fixed_typed_array->DataPtr(), | 16512 fixed_typed_array->DataPtr(), |
| 16512 fixed_typed_array->DataSize()); | 16513 fixed_typed_array->DataSize()); |
| 16513 Handle<ExternalArray> new_elements = | 16514 Handle<ExternalArray> new_elements = |
| 16514 isolate->factory()->NewExternalArray( | 16515 isolate->factory()->NewExternalArray( |
| 16515 fixed_typed_array->length(), typed_array->type(), | 16516 fixed_typed_array->length(), typed_array->type(), |
| 16516 static_cast<uint8_t*>(buffer->backing_store())); | 16517 static_cast<uint8_t*>(buffer->backing_store())); |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16659 Handle<Object> new_value) { | 16660 Handle<Object> new_value) { |
| 16660 if (cell->value() != *new_value) { | 16661 if (cell->value() != *new_value) { |
| 16661 cell->set_value(*new_value); | 16662 cell->set_value(*new_value); |
| 16662 Isolate* isolate = cell->GetIsolate(); | 16663 Isolate* isolate = cell->GetIsolate(); |
| 16663 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16664 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 16664 isolate, DependentCode::kPropertyCellChangedGroup); | 16665 isolate, DependentCode::kPropertyCellChangedGroup); |
| 16665 } | 16666 } |
| 16666 } | 16667 } |
| 16667 } // namespace internal | 16668 } // namespace internal |
| 16668 } // namespace v8 | 16669 } // namespace v8 |
| OLD | NEW |