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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
953 date_cache_ = date_cache; | 953 date_cache_ = date_cache; |
954 } | 954 } |
955 | 955 |
956 ErrorToStringHelper* error_tostring_helper() { | 956 ErrorToStringHelper* error_tostring_helper() { |
957 return &error_tostring_helper_; | 957 return &error_tostring_helper_; |
958 } | 958 } |
959 | 959 |
960 Map* get_initial_js_array_map(ElementsKind kind, | 960 Map* get_initial_js_array_map(ElementsKind kind, |
961 Strength strength = Strength::WEAK); | 961 Strength strength = Strength::WEAK); |
962 | 962 |
963 static const int kArrayProtectorValid = 1; | 963 // The isConcatSpreadable protector is valid if there this property is |
Toon Verwaest
2015/11/02 12:32:45
valid if @@isConcatSpreadable is not present on ..
| |
964 static const int kArrayProtectorInvalid = 0; | 964 // not present on the Array prototype chain. |
965 static const int kArrayIsConcatSpreadableProtectorValid = 1; | |
966 static const int kArrayIsConcatSpreadableProtectorInvalid = 0; | |
967 bool IsArrayIsConcatSpreadableSet(); | |
965 | 968 |
969 void UpdateArrayIsConcatSpreadableProtectorOnAddProperty( | |
970 Handle<JSObject> object, Handle<Name> name); | |
971 | |
972 // The elements protector is valid if there are not additional elements | |
Toon Verwaest
2015/11/02 12:32:45
not -> no
| |
973 // on the Array prototype chain. | |
974 static const int kArrayElementsProtectorValid = 1; | |
975 static const int kArrayElementsProtectorInvalid = 0; | |
966 bool IsFastArrayConstructorPrototypeChainIntact(); | 976 bool IsFastArrayConstructorPrototypeChainIntact(); |
967 | 977 |
968 // On intent to set an element in object, make sure that appropriate | 978 // On intent to set an element in object, make sure that appropriate |
969 // notifications occur if the set is on the elements of the array or | 979 // notifications occur if the set is on the elements of the array or |
970 // object prototype. Also ensure that changes to prototype chain between | 980 // object prototype. Also ensure that changes to prototype chain between |
971 // Array and Object fire notifications. | 981 // Array and Object fire notifications. |
972 void UpdateArrayProtectorOnSetElement(Handle<JSObject> object); | 982 void UpdateArrayProtectorOnSetElement(Handle<JSObject> object); |
973 void UpdateArrayProtectorOnSetLength(Handle<JSObject> object) { | 983 void UpdateArrayProtectorOnSetLength(Handle<JSObject> object) { |
974 UpdateArrayProtectorOnSetElement(object); | 984 UpdateArrayProtectorOnSetElement(object); |
975 } | 985 } |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1087 | 1097 |
1088 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; } | 1098 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; } |
1089 | 1099 |
1090 void RegisterCancelableTask(Cancelable* task); | 1100 void RegisterCancelableTask(Cancelable* task); |
1091 void RemoveCancelableTask(Cancelable* task); | 1101 void RemoveCancelableTask(Cancelable* task); |
1092 | 1102 |
1093 interpreter::Interpreter* interpreter() const { return interpreter_; } | 1103 interpreter::Interpreter* interpreter() const { return interpreter_; } |
1094 | 1104 |
1095 protected: | 1105 protected: |
1096 explicit Isolate(bool enable_serializer); | 1106 explicit Isolate(bool enable_serializer); |
1107 Context* ContextForArrayOrObjectPrototype(Handle<JSObject> object); | |
1097 | 1108 |
1098 private: | 1109 private: |
1099 friend struct GlobalState; | 1110 friend struct GlobalState; |
1100 friend struct InitializeGlobalState; | 1111 friend struct InitializeGlobalState; |
1101 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, | 1112 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, |
1102 const char* name); | 1113 const char* name); |
1103 | 1114 |
1104 // These fields are accessed through the API, offsets must be kept in sync | 1115 // These fields are accessed through the API, offsets must be kept in sync |
1105 // with v8::internal::Internals (in include/v8.h) constants. This is also | 1116 // with v8::internal::Internals (in include/v8.h) constants. This is also |
1106 // verified in Isolate::Init() using runtime checks. | 1117 // verified in Isolate::Init() using runtime checks. |
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1556 | 1567 |
1557 EmbeddedVector<char, 128> filename_; | 1568 EmbeddedVector<char, 128> filename_; |
1558 FILE* file_; | 1569 FILE* file_; |
1559 int scope_depth_; | 1570 int scope_depth_; |
1560 }; | 1571 }; |
1561 | 1572 |
1562 } // namespace internal | 1573 } // namespace internal |
1563 } // namespace v8 | 1574 } // namespace v8 |
1564 | 1575 |
1565 #endif // V8_ISOLATE_H_ | 1576 #endif // V8_ISOLATE_H_ |
OLD | NEW |