Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(954)

Side by Side Diff: src/isolate.h

Issue 1409123003: [runtime] Avoid @@isConcatSpreadable lookup for fast path Array.prototype.concat (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fixing tests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 951 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 date_cache_ = date_cache; 962 date_cache_ = date_cache;
963 } 963 }
964 964
965 Map* get_initial_js_array_map(ElementsKind kind); 965 Map* get_initial_js_array_map(ElementsKind kind);
966 966
967 static const int kArrayProtectorValid = 1; 967 static const int kArrayProtectorValid = 1;
968 static const int kArrayProtectorInvalid = 0; 968 static const int kArrayProtectorInvalid = 0;
969 969
970 bool IsFastArrayConstructorPrototypeChainIntact(); 970 bool IsFastArrayConstructorPrototypeChainIntact();
971 bool IsArraySpeciesLookupChainIntact(); 971 bool IsArraySpeciesLookupChainIntact();
972 bool IsArrayIsConcatSpreadableLookupChainIntact();
972 973
973 // On intent to set an element in object, make sure that appropriate 974 // On intent to set an element in object, make sure that appropriate
974 // notifications occur if the set is on the elements of the array or 975 // notifications occur if the set is on the elements of the array or
975 // object prototype. Also ensure that changes to prototype chain between 976 // object prototype. Also ensure that changes to prototype chain between
976 // Array and Object fire notifications. 977 // Array and Object fire notifications.
977 void UpdateArrayProtectorOnSetElement(Handle<JSObject> object); 978 void UpdateArrayProtectorOnSetElement(Handle<JSObject> object);
978 void UpdateArrayProtectorOnSetLength(Handle<JSObject> object) { 979 void UpdateArrayProtectorOnSetLength(Handle<JSObject> object) {
979 UpdateArrayProtectorOnSetElement(object); 980 UpdateArrayProtectorOnSetElement(object);
980 } 981 }
981 void UpdateArrayProtectorOnSetPrototype(Handle<JSObject> object) { 982 void UpdateArrayProtectorOnSetPrototype(Handle<JSObject> object) {
982 UpdateArrayProtectorOnSetElement(object); 983 UpdateArrayProtectorOnSetElement(object);
983 } 984 }
984 void UpdateArrayProtectorOnNormalizeElements(Handle<JSObject> object) { 985 void UpdateArrayProtectorOnNormalizeElements(Handle<JSObject> object) {
985 UpdateArrayProtectorOnSetElement(object); 986 UpdateArrayProtectorOnSetElement(object);
986 } 987 }
987 void InvalidateArraySpeciesProtector(); 988 void InvalidateArraySpeciesProtector();
989 void InvalidateArrayIsConcatSpreadableProtector();
988 990
989 // Returns true if array is the initial array prototype in any native context. 991 // Returns true if array is the initial array prototype in any native context.
990 bool IsAnyInitialArrayPrototype(Handle<JSArray> array); 992 bool IsAnyInitialArrayPrototype(Handle<JSArray> array);
991 993
992 CallInterfaceDescriptorData* call_descriptor_data(int index); 994 CallInterfaceDescriptorData* call_descriptor_data(int index);
993 995
994 void IterateDeferredHandles(ObjectVisitor* visitor); 996 void IterateDeferredHandles(ObjectVisitor* visitor);
995 void LinkDeferredHandles(DeferredHandles* deferred_handles); 997 void LinkDeferredHandles(DeferredHandles* deferred_handles);
996 void UnlinkDeferredHandles(DeferredHandles* deferred_handles); 998 void UnlinkDeferredHandles(DeferredHandles* deferred_handles);
997 999
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1109 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; } 1111 FutexWaitListNode* futex_wait_list_node() { return &futex_wait_list_node_; }
1110 1112
1111 CancelableTaskManager* cancelable_task_manager() { 1113 CancelableTaskManager* cancelable_task_manager() {
1112 return cancelable_task_manager_; 1114 return cancelable_task_manager_;
1113 } 1115 }
1114 1116
1115 interpreter::Interpreter* interpreter() const { return interpreter_; } 1117 interpreter::Interpreter* interpreter() const { return interpreter_; }
1116 1118
1117 base::AccountingAllocator* allocator() { return &allocator_; } 1119 base::AccountingAllocator* allocator() { return &allocator_; }
1118 1120
1121 bool IsInContextIndex(Object* object, uint32_t index);
1122
1119 protected: 1123 protected:
1120 explicit Isolate(bool enable_serializer); 1124 explicit Isolate(bool enable_serializer);
1125 bool IsArrayOrObjectPrototype(Object* object);
1121 1126
1122 private: 1127 private:
1123 friend struct GlobalState; 1128 friend struct GlobalState;
1124 friend struct InitializeGlobalState; 1129 friend struct InitializeGlobalState;
1125 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map, 1130 Handle<JSObject> SetUpSubregistry(Handle<JSObject> registry, Handle<Map> map,
1126 const char* name); 1131 const char* name);
1127 1132
1128 // These fields are accessed through the API, offsets must be kept in sync 1133 // These fields are accessed through the API, offsets must be kept in sync
1129 // with v8::internal::Internals (in include/v8.h) constants. This is also 1134 // with v8::internal::Internals (in include/v8.h) constants. This is also
1130 // verified in Isolate::Init() using runtime checks. 1135 // verified in Isolate::Init() using runtime checks.
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
1588 1593
1589 EmbeddedVector<char, 128> filename_; 1594 EmbeddedVector<char, 128> filename_;
1590 FILE* file_; 1595 FILE* file_;
1591 int scope_depth_; 1596 int scope_depth_;
1592 }; 1597 };
1593 1598
1594 } // namespace internal 1599 } // namespace internal
1595 } // namespace v8 1600 } // namespace v8
1596 1601
1597 #endif // V8_ISOLATE_H_ 1602 #endif // V8_ISOLATE_H_
OLDNEW
« src/builtins.cc ('K') | « src/heap/objects-visiting.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698