Revision: 23250
Author:   [email protected]
Date:     Wed Aug 20 16:25:40 2014 UTC
Log:      Get rid of last non-JSReceiver::Lookup usage of LookupOwn

BUG=

Review URL: https://codereview.chromium.org/489063002
http://code.google.com/p/v8/source/detail?r=23250

Modified:
 /branches/bleeding_edge/src/lookup.h
 /branches/bleeding_edge/src/objects.h
 /branches/bleeding_edge/src/runtime.cc

=======================================
--- /branches/bleeding_edge/src/lookup.h        Tue Aug 19 17:02:04 2014 UTC
+++ /branches/bleeding_edge/src/lookup.h        Wed Aug 20 16:25:40 2014 UTC
@@ -23,6 +23,7 @@

     // Convience combinations of bits.
     CHECK_PROPERTY = 0,
+    CHECK_OWN = CHECK_ACCESS_CHECK | CHECK_INTERCEPTOR,
CHECK_HIDDEN_SKIP_INTERCEPTOR = CHECK_HIDDEN_PROPERTY | CHECK_ACCESS_CHECK,
     CHECK_DERIVED_SKIP_INTERCEPTOR =
         CHECK_HIDDEN_SKIP_INTERCEPTOR | CHECK_DERIVED_PROPERTY,
=======================================
--- /branches/bleeding_edge/src/objects.h       Wed Aug 20 10:37:23 2014 UTC
+++ /branches/bleeding_edge/src/objects.h       Wed Aug 20 16:25:40 2014 UTC
@@ -1999,7 +1999,6 @@

   // Lookup a property.  If found, the result is valid and has
   // detailed information.
-  void LookupOwn(Handle<Name> name, LookupResult* result);
   void Lookup(Handle<Name> name, LookupResult* result);

   enum KeyCollectionType { OWN_ONLY, INCLUDE_PROTOS };
@@ -2011,6 +2010,7 @@
       KeyCollectionType type);

  private:
+  void LookupOwn(Handle<Name> name, LookupResult* result);
   DISALLOW_IMPLICIT_CONSTRUCTORS(JSReceiver);
 };

=======================================
--- /branches/bleeding_edge/src/runtime.cc      Tue Aug 19 17:02:04 2014 UTC
+++ /branches/bleeding_edge/src/runtime.cc      Wed Aug 20 16:25:40 2014 UTC
@@ -4870,18 +4870,18 @@
         }
         // Lookup cache miss.  Perform lookup and update the cache if
         // appropriate.
-        LookupResult result(isolate);
-        receiver->LookupOwn(key, &result);
-        if (result.IsField()) {
-          FieldIndex field_index = result.GetFieldIndex();
+        LookupIterator it(receiver, key, LookupIterator::CHECK_OWN);
+        if (it.IsFound() && it.state() == LookupIterator::PROPERTY &&
+            it.HasProperty() && it.property_details().type() == FIELD) {
+          FieldIndex field_index = it.GetFieldIndex();
           // Do not track double fields in the keyed lookup cache. Reading
           // double values requires boxing.
-          if (!result.representation().IsDouble()) {
+          if (!it.representation().IsDouble()) {
             keyed_lookup_cache->Update(receiver_map, key,
                 field_index.GetKeyedLookupCacheIndex());
           }
           AllowHeapAllocation allow_allocation;
- return *JSObject::FastPropertyAt(receiver, result.representation(),
+          return *JSObject::FastPropertyAt(receiver, it.representation(),
                                            field_index);
         }
       } else {

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to