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 1567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1578 case JS_OBJECT_TYPE: | 1578 case JS_OBJECT_TYPE: |
1579 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: | 1579 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: |
1580 case JS_GENERATOR_OBJECT_TYPE: | 1580 case JS_GENERATOR_OBJECT_TYPE: |
1581 case JS_MODULE_TYPE: | 1581 case JS_MODULE_TYPE: |
1582 case JS_VALUE_TYPE: | 1582 case JS_VALUE_TYPE: |
1583 case JS_DATE_TYPE: | 1583 case JS_DATE_TYPE: |
1584 case JS_ARRAY_TYPE: | 1584 case JS_ARRAY_TYPE: |
1585 case JS_ARRAY_BUFFER_TYPE: | 1585 case JS_ARRAY_BUFFER_TYPE: |
1586 case JS_TYPED_ARRAY_TYPE: | 1586 case JS_TYPED_ARRAY_TYPE: |
1587 case JS_DATA_VIEW_TYPE: | 1587 case JS_DATA_VIEW_TYPE: |
| 1588 case JS_SHARED_ARRAY_BUFFER_TYPE: |
| 1589 case JS_SHARED_TYPED_ARRAY_TYPE: |
1588 case JS_SET_TYPE: | 1590 case JS_SET_TYPE: |
1589 case JS_MAP_TYPE: | 1591 case JS_MAP_TYPE: |
1590 case JS_SET_ITERATOR_TYPE: | 1592 case JS_SET_ITERATOR_TYPE: |
1591 case JS_MAP_ITERATOR_TYPE: | 1593 case JS_MAP_ITERATOR_TYPE: |
1592 case JS_WEAK_MAP_TYPE: | 1594 case JS_WEAK_MAP_TYPE: |
1593 case JS_WEAK_SET_TYPE: | 1595 case JS_WEAK_SET_TYPE: |
1594 case JS_REGEXP_TYPE: | 1596 case JS_REGEXP_TYPE: |
1595 case JS_GLOBAL_PROXY_TYPE: | 1597 case JS_GLOBAL_PROXY_TYPE: |
1596 case JS_GLOBAL_OBJECT_TYPE: | 1598 case JS_GLOBAL_OBJECT_TYPE: |
1597 case JS_BUILTINS_OBJECT_TYPE: | 1599 case JS_BUILTINS_OBJECT_TYPE: |
(...skipping 15292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16890 DCHECK(IsFixedTypedArrayElementsKind(map->elements_kind())); | 16892 DCHECK(IsFixedTypedArrayElementsKind(map->elements_kind())); |
16891 | 16893 |
16892 Handle<Map> new_map = Map::TransitionElementsTo( | 16894 Handle<Map> new_map = Map::TransitionElementsTo( |
16893 map, | 16895 map, |
16894 FixedToExternalElementsKind(map->elements_kind())); | 16896 FixedToExternalElementsKind(map->elements_kind())); |
16895 | 16897 |
16896 Handle<JSArrayBuffer> buffer = isolate->factory()->NewJSArrayBuffer(); | 16898 Handle<JSArrayBuffer> buffer = isolate->factory()->NewJSArrayBuffer(); |
16897 Handle<FixedTypedArrayBase> fixed_typed_array( | 16899 Handle<FixedTypedArrayBase> fixed_typed_array( |
16898 FixedTypedArrayBase::cast(typed_array->elements())); | 16900 FixedTypedArrayBase::cast(typed_array->elements())); |
16899 Runtime::SetupArrayBufferAllocatingData(isolate, buffer, | 16901 Runtime::SetupArrayBufferAllocatingData(isolate, buffer, |
16900 fixed_typed_array->DataSize(), false); | 16902 fixed_typed_array->DataSize(), false, |
| 16903 typed_array->is_shared()); |
16901 memcpy(buffer->backing_store(), | 16904 memcpy(buffer->backing_store(), |
16902 fixed_typed_array->DataPtr(), | 16905 fixed_typed_array->DataPtr(), |
16903 fixed_typed_array->DataSize()); | 16906 fixed_typed_array->DataSize()); |
16904 Handle<ExternalArray> new_elements = | 16907 Handle<ExternalArray> new_elements = |
16905 isolate->factory()->NewExternalArray( | 16908 isolate->factory()->NewExternalArray( |
16906 fixed_typed_array->length(), typed_array->type(), | 16909 fixed_typed_array->length(), typed_array->type(), |
16907 static_cast<uint8_t*>(buffer->backing_store())); | 16910 static_cast<uint8_t*>(buffer->backing_store())); |
16908 | 16911 |
16909 Heap* heap = isolate->heap(); | 16912 Heap* heap = isolate->heap(); |
16910 if (heap->InNewSpace(*typed_array)) { | 16913 if (heap->InNewSpace(*typed_array)) { |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
17046 CompilationInfo* info) { | 17049 CompilationInfo* info) { |
17047 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( | 17050 Handle<DependentCode> codes = DependentCode::InsertCompilationInfo( |
17048 handle(cell->dependent_code(), info->isolate()), | 17051 handle(cell->dependent_code(), info->isolate()), |
17049 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); | 17052 DependentCode::kPropertyCellChangedGroup, info->object_wrapper()); |
17050 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); | 17053 if (*codes != cell->dependent_code()) cell->set_dependent_code(*codes); |
17051 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( | 17054 info->dependencies(DependentCode::kPropertyCellChangedGroup)->Add( |
17052 cell, info->zone()); | 17055 cell, info->zone()); |
17053 } | 17056 } |
17054 | 17057 |
17055 } } // namespace v8::internal | 17058 } } // namespace v8::internal |
OLD | NEW |