OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 11830 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11841 } | 11841 } |
11842 #endif | 11842 #endif |
11843 } | 11843 } |
11844 | 11844 |
11845 | 11845 |
11846 #ifdef DEBUG | 11846 #ifdef DEBUG |
11847 namespace { | 11847 namespace { |
11848 | 11848 |
11849 bool CanSubclassHaveInobjectProperties(InstanceType instance_type) { | 11849 bool CanSubclassHaveInobjectProperties(InstanceType instance_type) { |
11850 switch (instance_type) { | 11850 switch (instance_type) { |
| 11851 case JS_API_OBJECT_TYPE: |
| 11852 case JS_ARRAY_BUFFER_TYPE: |
| 11853 case JS_ARRAY_TYPE: |
| 11854 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: |
| 11855 case JS_DATA_VIEW_TYPE: |
| 11856 case JS_DATE_TYPE: |
| 11857 case JS_FUNCTION_TYPE: |
| 11858 case JS_GENERATOR_OBJECT_TYPE: |
| 11859 case JS_MAP_ITERATOR_TYPE: |
| 11860 case JS_MAP_TYPE: |
| 11861 case JS_MESSAGE_OBJECT_TYPE: |
| 11862 case JS_MODULE_TYPE: |
11851 case JS_OBJECT_TYPE: | 11863 case JS_OBJECT_TYPE: |
11852 case JS_CONTEXT_EXTENSION_OBJECT_TYPE: | 11864 case JS_PROMISE_TYPE: |
11853 case JS_GENERATOR_OBJECT_TYPE: | 11865 case JS_REGEXP_TYPE: |
11854 case JS_MODULE_TYPE: | 11866 case JS_SET_ITERATOR_TYPE: |
| 11867 case JS_SET_TYPE: |
| 11868 case JS_SPECIAL_API_OBJECT_TYPE: |
| 11869 case JS_TYPED_ARRAY_TYPE: |
11855 case JS_VALUE_TYPE: | 11870 case JS_VALUE_TYPE: |
11856 case JS_DATE_TYPE: | |
11857 case JS_ARRAY_TYPE: | |
11858 case JS_MESSAGE_OBJECT_TYPE: | |
11859 case JS_ARRAY_BUFFER_TYPE: | |
11860 case JS_TYPED_ARRAY_TYPE: | |
11861 case JS_DATA_VIEW_TYPE: | |
11862 case JS_SET_TYPE: | |
11863 case JS_MAP_TYPE: | |
11864 case JS_SET_ITERATOR_TYPE: | |
11865 case JS_MAP_ITERATOR_TYPE: | |
11866 case JS_WEAK_MAP_TYPE: | 11871 case JS_WEAK_MAP_TYPE: |
11867 case JS_WEAK_SET_TYPE: | 11872 case JS_WEAK_SET_TYPE: |
11868 case JS_PROMISE_TYPE: | |
11869 case JS_REGEXP_TYPE: | |
11870 case JS_FUNCTION_TYPE: | |
11871 return true; | 11873 return true; |
11872 | 11874 |
11873 case JS_BOUND_FUNCTION_TYPE: | 11875 case BYTECODE_ARRAY_TYPE: |
11874 case JS_PROXY_TYPE: | 11876 case BYTE_ARRAY_TYPE: |
11875 case JS_GLOBAL_PROXY_TYPE: | 11877 case CELL_TYPE: |
11876 case JS_GLOBAL_OBJECT_TYPE: | 11878 case CODE_TYPE: |
| 11879 case FILLER_TYPE: |
11877 case FIXED_ARRAY_TYPE: | 11880 case FIXED_ARRAY_TYPE: |
11878 case FIXED_DOUBLE_ARRAY_TYPE: | 11881 case FIXED_DOUBLE_ARRAY_TYPE: |
| 11882 case FOREIGN_TYPE: |
| 11883 case FREE_SPACE_TYPE: |
| 11884 case HEAP_NUMBER_TYPE: |
| 11885 case JS_BOUND_FUNCTION_TYPE: |
| 11886 case JS_GLOBAL_OBJECT_TYPE: |
| 11887 case JS_GLOBAL_PROXY_TYPE: |
| 11888 case JS_PROXY_TYPE: |
| 11889 case MAP_TYPE: |
| 11890 case MUTABLE_HEAP_NUMBER_TYPE: |
11879 case ODDBALL_TYPE: | 11891 case ODDBALL_TYPE: |
11880 case FOREIGN_TYPE: | |
11881 case MAP_TYPE: | |
11882 case CODE_TYPE: | |
11883 case CELL_TYPE: | |
11884 case PROPERTY_CELL_TYPE: | 11892 case PROPERTY_CELL_TYPE: |
| 11893 case SHARED_FUNCTION_INFO_TYPE: |
| 11894 case SIMD128_VALUE_TYPE: |
| 11895 case SYMBOL_TYPE: |
11885 case WEAK_CELL_TYPE: | 11896 case WEAK_CELL_TYPE: |
11886 case SYMBOL_TYPE: | |
11887 case BYTECODE_ARRAY_TYPE: | |
11888 case HEAP_NUMBER_TYPE: | |
11889 case MUTABLE_HEAP_NUMBER_TYPE: | |
11890 case SIMD128_VALUE_TYPE: | |
11891 case FILLER_TYPE: | |
11892 case BYTE_ARRAY_TYPE: | |
11893 case FREE_SPACE_TYPE: | |
11894 case SHARED_FUNCTION_INFO_TYPE: | |
11895 | 11897 |
11896 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ | 11898 #define TYPED_ARRAY_CASE(Type, type, TYPE, ctype, size) \ |
11897 case FIXED_##TYPE##_ARRAY_TYPE: | 11899 case FIXED_##TYPE##_ARRAY_TYPE: |
11898 #undef TYPED_ARRAY_CASE | 11900 #undef TYPED_ARRAY_CASE |
11899 | 11901 |
11900 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: | 11902 #define MAKE_STRUCT_CASE(NAME, Name, name) case NAME##_TYPE: |
11901 STRUCT_LIST(MAKE_STRUCT_CASE) | 11903 STRUCT_LIST(MAKE_STRUCT_CASE) |
11902 #undef MAKE_STRUCT_CASE | 11904 #undef MAKE_STRUCT_CASE |
11903 // We must not end up here for these instance types at all. | 11905 // We must not end up here for these instance types at all. |
11904 UNREACHABLE(); | 11906 UNREACHABLE(); |
(...skipping 6353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18258 if (cell->value() != *new_value) { | 18260 if (cell->value() != *new_value) { |
18259 cell->set_value(*new_value); | 18261 cell->set_value(*new_value); |
18260 Isolate* isolate = cell->GetIsolate(); | 18262 Isolate* isolate = cell->GetIsolate(); |
18261 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18263 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
18262 isolate, DependentCode::kPropertyCellChangedGroup); | 18264 isolate, DependentCode::kPropertyCellChangedGroup); |
18263 } | 18265 } |
18264 } | 18266 } |
18265 | 18267 |
18266 } // namespace internal | 18268 } // namespace internal |
18267 } // namespace v8 | 18269 } // namespace v8 |
OLD | NEW |