Reviewers: Yang,
Description:
Follow-up fix for r18135 in TryCallApply.
[email protected]
BUG=chromium:323942
TEST=mjsunit/regress/regress-crbug-323942
Please review this at https://codereview.chromium.org/95583002/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+3, -9 lines):
M src/hydrogen.cc
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index
e2c92300d262454b55814b554d37e16e546832a4..424c25714bd2ff11639a5c5ac92a817c19af990b
100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -7560,12 +7560,6 @@ bool HOptimizedGraphBuilder::TryCallApply(Call*
expr) {
// 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 @@ bool HOptimizedGraphBuilder::TryCallApply(Call*
expr) {
}
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.