Revision: 18152
Author:   [email protected]
Date:     Fri Nov 29 09:59:35 2013 UTC
Log:      Follow-up fix for r18135 in TryCallApply.

[email protected]
BUG=chromium:323942
TEST=mjsunit/regress/regress-crbug-323942
LOG=N

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

Modified:
 /branches/bleeding_edge/src/hydrogen.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Thu Nov 28 15:50:54 2013 UTC
+++ /branches/bleeding_edge/src/hydrogen.cc     Fri Nov 29 09:59:35 2013 UTC
@@ -7560,12 +7560,6 @@
   // Found pattern f.apply(receiver, arguments).
   CHECK_ALIVE_OR_RETURN(VisitForValue(prop->obj()), true);
   HValue* function = Top();
-  // The function get here may be an undefined constant if lookup fails.
-  if (function->IsConstant() &&
-      !HConstant::cast(function)->handle(isolate())->IsJSFunction()) {
-    Drop(1);
-    return false;
-  }

   AddCheckConstantFunction(expr->holder(), function, function_map);
   Drop(1);
@@ -7597,10 +7591,10 @@
     }

     Handle<JSFunction> known_function;
-    if (function->IsConstant()) {
-      HConstant* constant_function = HConstant::cast(function);
+    if (function->IsConstant() &&
+        HConstant::cast(function)->handle(isolate())->IsJSFunction()) {
       known_function = Handle<JSFunction>::cast(
-          constant_function->handle(isolate()));
+          HConstant::cast(function)->handle(isolate()));
       int args_count = arguments_count - 1;  // Excluding receiver.
       if (TryInlineApply(known_function, expr, args_count)) return true;
     }

--
--
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/groups/opt_out.

Reply via email to