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

Unified Diff: src/lookup.h

Issue 992913002: handle the special snowflakes that are Integer Indexed Exotic objects (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/ic/ic.cc ('k') | src/lookup.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lookup.h
diff --git a/src/lookup.h b/src/lookup.h
index a114bc5c0745d8fd42884dc9cd503244e119085d..c6bbb66f72240bba0cd3fd34457b2954f8746b04 100644
--- a/src/lookup.h
+++ b/src/lookup.h
@@ -31,6 +31,7 @@ class LookupIterator FINAL BASE_EMBEDDED {
enum State {
ACCESS_CHECK,
+ INTEGER_INDEXED_EXOTIC,
INTERCEPTOR,
JSPROXY,
NOT_FOUND,
@@ -46,6 +47,7 @@ class LookupIterator FINAL BASE_EMBEDDED {
Configuration configuration = PROTOTYPE_CHAIN)
: configuration_(ComputeConfiguration(configuration, name)),
state_(NOT_FOUND),
+ exotic_index_state_(ExoticIndexState::kUninitialized),
property_details_(NONE, v8::internal::DATA, 0),
isolate_(name->GetIsolate()),
name_(name),
@@ -61,6 +63,7 @@ class LookupIterator FINAL BASE_EMBEDDED {
Configuration configuration = PROTOTYPE_CHAIN)
: configuration_(ComputeConfiguration(configuration, name)),
state_(NOT_FOUND),
+ exotic_index_state_(ExoticIndexState::kUninitialized),
property_details_(NONE, v8::internal::DATA, 0),
isolate_(name->GetIsolate()),
name_(name),
@@ -140,11 +143,6 @@ class LookupIterator FINAL BASE_EMBEDDED {
// Usually returns the value that was passed in, but may perform
// non-observable modifications on it, such as internalize strings.
Handle<Object> WriteDataValue(Handle<Object> value);
-
- // Checks whether the receiver is an indexed exotic object
- // and name is a special numeric index.
- bool IsSpecialNumericIndex() const;
-
void InternalizeName();
private:
@@ -185,11 +183,15 @@ class LookupIterator FINAL BASE_EMBEDDED {
}
}
+ enum class ExoticIndexState { kUninitialized, kNoIndex, kIndex };
+ bool IsIntegerIndexedExotic(JSReceiver* holder);
+
// If configuration_ becomes mutable, update
// HolderIsReceiverOrHiddenPrototype.
Configuration configuration_;
State state_;
bool has_property_;
+ ExoticIndexState exotic_index_state_;
PropertyDetails property_details_;
Isolate* isolate_;
Handle<Name> name_;
« no previous file with comments | « src/ic/ic.cc ('k') | src/lookup.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698