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

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: simplifications Created 5 years, 1 month 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
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 942 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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
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_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698