Commit b29040a3 authored by verwaest@chromium.org's avatar verwaest@chromium.org

Get rid of last non-JSReceiver::Lookup usage of LookupOwn

BUG=

Review URL: https://codereview.chromium.org/489063002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23250 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 88ee4324
...@@ -23,6 +23,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED { ...@@ -23,6 +23,7 @@ class LookupIterator V8_FINAL BASE_EMBEDDED {
// Convience combinations of bits. // Convience combinations of bits.
CHECK_PROPERTY = 0, CHECK_PROPERTY = 0,
CHECK_OWN = CHECK_ACCESS_CHECK | CHECK_INTERCEPTOR,
CHECK_HIDDEN_SKIP_INTERCEPTOR = CHECK_HIDDEN_PROPERTY | CHECK_ACCESS_CHECK, CHECK_HIDDEN_SKIP_INTERCEPTOR = CHECK_HIDDEN_PROPERTY | CHECK_ACCESS_CHECK,
CHECK_DERIVED_SKIP_INTERCEPTOR = CHECK_DERIVED_SKIP_INTERCEPTOR =
CHECK_HIDDEN_SKIP_INTERCEPTOR | CHECK_DERIVED_PROPERTY, CHECK_HIDDEN_SKIP_INTERCEPTOR | CHECK_DERIVED_PROPERTY,
......
...@@ -1999,7 +1999,6 @@ class JSReceiver: public HeapObject { ...@@ -1999,7 +1999,6 @@ class JSReceiver: public HeapObject {
// Lookup a property. If found, the result is valid and has // Lookup a property. If found, the result is valid and has
// detailed information. // detailed information.
void LookupOwn(Handle<Name> name, LookupResult* result);
void Lookup(Handle<Name> name, LookupResult* result); void Lookup(Handle<Name> name, LookupResult* result);
enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS }; enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS };
...@@ -2011,6 +2010,7 @@ class JSReceiver: public HeapObject { ...@@ -2011,6 +2010,7 @@ class JSReceiver: public HeapObject {
KeyCollectionType type); KeyCollectionType type);
private: private:
void LookupOwn(Handle<Name> name, LookupResult* result);
DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver); DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver);
}; };
......
...@@ -4870,18 +4870,18 @@ RUNTIME_FUNCTION(Runtime_KeyedGetProperty) { ...@@ -4870,18 +4870,18 @@ RUNTIME_FUNCTION(Runtime_KeyedGetProperty) {
} }
// Lookup cache miss. Perform lookup and update the cache if // Lookup cache miss. Perform lookup and update the cache if
// appropriate. // appropriate.
LookupResult result(isolate); LookupIterator it(receiver, key, LookupIterator::CHECK_OWN);
receiver->LookupOwn(key, &result); if (it.IsFound() && it.state() == LookupIterator::PROPERTY &&
if (result.IsField()) { it.HasProperty() && it.property_details().type() == FIELD) {
FieldIndex field_index = result.GetFieldIndex(); FieldIndex field_index = it.GetFieldIndex();
// Do not track double fields in the keyed lookup cache. Reading // Do not track double fields in the keyed lookup cache. Reading
// double values requires boxing. // double values requires boxing.
if (!result.representation().IsDouble()) { if (!it.representation().IsDouble()) {
keyed_lookup_cache->Update(receiver_map, key, keyed_lookup_cache->Update(receiver_map, key,
field_index.GetKeyedLookupCacheIndex()); field_index.GetKeyedLookupCacheIndex());
} }
AllowHeapAllocation allow_allocation; AllowHeapAllocation allow_allocation;
return *JSObject::FastPropertyAt(receiver, result.representation(), return *JSObject::FastPropertyAt(receiver, it.representation(),
field_index); field_index);
} }
} else { } else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment