Reviewers: Toon Verwaest,

Message:
PTAL.

Description:
Fix polymorphic keyed loads for SLOPPY_ARGUMENTS_ELEMENTS

BUG=chromium:350867
LOG=y

Please review this at https://codereview.chromium.org/203303010/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+2, -2 lines):
  M src/ic.cc
  M src/stub-cache.cc


Index: src/ic.cc
diff --git a/src/ic.cc b/src/ic.cc
index 399be0e9658aceeba6a1d2203c63f736b1037cfb..4924dbb8d7e2959dd781953b2b826019be356f6d 100644
--- a/src/ic.cc
+++ b/src/ic.cc
@@ -1096,7 +1096,6 @@ MaybeObject* KeyedLoadIC::Load(Handle<Object> object, Handle<Object> key) {
     maybe_object = LoadIC::Load(object, Handle<String>::cast(key));
     if (maybe_object->IsFailure()) return maybe_object;
   } else if (FLAG_use_ic && !object->IsAccessCheckNeeded()) {
-    ASSERT(!object->IsAccessCheckNeeded());
     if (object->IsString() && key->IsNumber()) {
       if (state() == UNINITIALIZED) stub = string_stub();
     } else if (object->IsJSObject()) {
@@ -1117,7 +1116,6 @@ MaybeObject* KeyedLoadIC::Load(Handle<Object> object, Handle<Object> key) {
     if (*stub == *generic_stub()) {
       TRACE_GENERIC_IC(isolate(), "KeyedLoadIC", "set generic");
     }
-    ASSERT(!stub.is_null());
     set_target(*stub);
     TRACE_IC("LoadIC", key);
   }
Index: src/stub-cache.cc
diff --git a/src/stub-cache.cc b/src/stub-cache.cc
index d52d424095699f2f23bc547a175592e63d9a9549..092eaa33d4cab16f04c5c46c11d354e88216f79f 100644
--- a/src/stub-cache.cc
+++ b/src/stub-cache.cc
@@ -1306,6 +1306,8 @@ void KeyedLoadStubCompiler::CompileElementHandlers(MapHandleList* receiver_maps,
         cached_stub =
             KeyedLoadFastElementStub(is_js_array,
                                      elements_kind).GetCode(isolate());
+      } else if (elements_kind == SLOPPY_ARGUMENTS_ELEMENTS) {
+        cached_stub = isolate()->builtins()->KeyedLoadIC_SloppyArguments();
       } else {
         ASSERT(elements_kind == DICTIONARY_ELEMENTS);
         cached_stub = KeyedLoadDictionaryElementStub().GetCode(isolate());


--
--
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