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

Unified 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: adding more 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/heap/objects-visiting.cc ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index a91ec93187def11a2f18a31f86e9f0ef893e3e4d..026db34e348e656a546412eae00da1395e8a34a5 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -968,11 +968,13 @@ class Isolate {
Map* get_initial_js_array_map(ElementsKind kind);
+ // The elements protector is valid if there are no additional elements
+ // on the Array prototype chain.
static const int kArrayProtectorValid = 1;
static const int kArrayProtectorInvalid = 0;
-
bool IsFastArrayConstructorPrototypeChainIntact();
bool IsArraySpeciesLookupChainIntact();
+ bool IsArrayIsConcatSpreadableLookupChainIntact();
// On intent to set an element in object, make sure that appropriate
// notifications occur if the set is on the elements of the array or
@@ -989,6 +991,7 @@ class Isolate {
UpdateArrayProtectorOnSetElement(object);
}
void InvalidateArraySpeciesProtector();
+ void InvalidateArrayIsConcatSpreadableProtector();
// Returns true if array is the initial array prototype in any native context.
bool IsAnyInitialArrayPrototype(Handle<JSArray> array);
@@ -1118,8 +1121,11 @@ class Isolate {
interpreter::Interpreter* interpreter() const { return interpreter_; }
+ bool IsInContextIndex(Object* object, uint32_t index);
+
protected:
explicit Isolate(bool enable_serializer);
+ bool ArrayOrObjectPrototypeIsInContext(Object* object);
private:
friend struct GlobalState;
« no previous file with comments | « src/heap/objects-visiting.cc ('k') | src/isolate.cc » ('j') | src/isolate.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698