OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #ifndef V8_ISOLATE_H_ | 5 #ifndef V8_ISOLATE_H_ |
6 #define V8_ISOLATE_H_ | 6 #define V8_ISOLATE_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 950 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
961 | 961 |
962 void set_date_cache(DateCache* date_cache) { | 962 void set_date_cache(DateCache* date_cache) { |
963 if (date_cache != date_cache_) { | 963 if (date_cache != date_cache_) { |
964 delete date_cache_; | 964 delete date_cache_; |
965 } | 965 } |
966 date_cache_ = date_cache; | 966 date_cache_ = date_cache; |
967 } | 967 } |
968 | 968 |
969 Map* get_initial_js_array_map(ElementsKind kind); | 969 Map* get_initial_js_array_map(ElementsKind kind); |
970 | 970 |
| 971 // Valid if @@isConcatSpreadable is not present on the Array prototype. chain. |
| 972 static const int kArrayIsConcatSpreadableProtectorValid = 1; |
| 973 static const int kArrayIsConcatSpreadableProtectorInvalid = 0; |
| 974 bool IsArrayIsConcatSpreadableSet(); |
| 975 |
| 976 void UpdateArrayIsConcatSpreadableProtectorOnAddProperty( |
| 977 Handle<JSObject> object, Handle<Name> name); |
| 978 |
| 979 // The elements protector is valid if there are no additional elements |
| 980 // on the Array prototype chain. |
971 static const int kArrayProtectorValid = 1; | 981 static const int kArrayProtectorValid = 1; |
972 static const int kArrayProtectorInvalid = 0; | 982 static const int kArrayProtectorInvalid = 0; |
973 | |
974 bool IsFastArrayConstructorPrototypeChainIntact(); | 983 bool IsFastArrayConstructorPrototypeChainIntact(); |
975 bool IsArraySpeciesLookupChainIntact(); | 984 bool IsArraySpeciesLookupChainIntact(); |
976 | 985 |
977 // On intent to set an element in object, make sure that appropriate | 986 // On intent to set an element in object, make sure that appropriate |
978 // notifications occur if the set is on the elements of the array or | 987 // notifications occur if the set is on the elements of the array or |
979 // object prototype. Also ensure that changes to prototype chain between | 988 // object prototype. Also ensure that changes to prototype chain between |
980 // Array and Object fire notifications. | 989 // Array and Object fire notifications. |
981 void UpdateArrayProtectorOnSetElement(Handle<JSObject> object); | 990 void UpdateArrayProtectorOnSetElement(Handle<JSObject> object); |
982 void UpdateArrayProtectorOnSetLength(Handle<JSObject> object) { | 991 void UpdateArrayProtectorOnSetLength(Handle<JSObject> object) { |
983 UpdateArrayProtectorOnSetElement(object); | 992 UpdateArrayProtectorOnSetElement(object); |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1115 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; } | 1124 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; } |
1116 | 1125 |
1117 CancelableTaskManager* cancelable_task_manager() { | 1126 CancelableTaskManager* cancelable_task_manager() { |
1118 return cancelable_task_manager_; | 1127 return cancelable_task_manager_; |
1119 } | 1128 } |
1120 | 1129 |
1121 interpreter::Interpreter* interpreter() const { return interpreter_; } | 1130 interpreter::Interpreter* interpreter() const { return interpreter_; } |
1122 | 1131 |
1123 protected: | 1132 protected: |
1124 explicit Isolate(bool enable_serializer); | 1133 explicit Isolate(bool enable_serializer); |
| 1134 Context* ContextForArrayOrObjectPrototype(Handle<JSObject> object); |
1125 | 1135 |
1126 private: | 1136 private: |
1127 friend struct GlobalState; | 1137 friend struct GlobalState; |
1128 friend struct InitializeGlobalState; | 1138 friend struct InitializeGlobalState; |
1129 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, | 1139 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, |
1130 const char* name); | 1140 const char* name); |
1131 | 1141 |
1132 // These fields are accessed through the API, offsets must be kept in sync | 1142 // These fields are accessed through the API, offsets must be kept in sync |
1133 // with v8::internal::Internals (in include/v8.h) constants. This is also | 1143 // with v8::internal::Internals (in include/v8.h) constants. This is also |
1134 // verified in Isolate::Init() using runtime checks. | 1144 // verified in Isolate::Init() using runtime checks. |
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1595 | 1605 |
1596 EmbeddedVector<char, 128> filename_; | 1606 EmbeddedVector<char, 128> filename_; |
1597 FILE* file_; | 1607 FILE* file_; |
1598 int scope_depth_; | 1608 int scope_depth_; |
1599 }; | 1609 }; |
1600 | 1610 |
1601 } // namespace internal | 1611 } // namespace internal |
1602 } // namespace v8 | 1612 } // namespace v8 |
1603 | 1613 |
1604 #endif // V8_ISOLATE_H_ | 1614 #endif // V8_ISOLATE_H_ |
OLD | NEW |