| Index: src/ast.cc
|
| diff --git a/src/ast.cc b/src/ast.cc
|
| index 2e26999c8cf177d4383d9429f3f51416e4d2d78a..ab37053bc10ae0c52608dbf746752dcda33efb78 100644
|
| --- a/src/ast.cc
|
| +++ b/src/ast.cc
|
| @@ -724,16 +724,6 @@ void CaseClause::RecordTypeFeedback(TypeFeedbackOracle* oracle) {
|
| }
|
|
|
|
|
| -static bool CanCallWithoutIC(Handle<JSFunction> target, int arity) {
|
| - SharedFunctionInfo* info = target->shared();
|
| - // If the number of formal parameters of the target function does
|
| - // not match the number of arguments we're passing, we don't want to
|
| - // deal with it. Otherwise, we can call it directly.
|
| - return !target->NeedsArgumentsAdaption() ||
|
| - info->formal_parameter_count() == arity;
|
| -}
|
| -
|
| -
|
| bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) {
|
| if (check_type_ == RECEIVER_MAP_CHECK) {
|
| // For primitive checks the holder is set up to point to the
|
| @@ -754,7 +744,7 @@ bool Call::ComputeTarget(Handle<Map> type, Handle<String> name) {
|
| type = Handle<Map>(holder()->map());
|
| } else if (lookup.IsProperty() && lookup.type() == CONSTANT_FUNCTION) {
|
| target_ = Handle<JSFunction>(lookup.GetConstantFunctionFromMap(*type));
|
| - return CanCallWithoutIC(target_, arguments()->length());
|
| + return true;
|
| } else {
|
| return false;
|
| }
|
| @@ -774,8 +764,7 @@ bool Call::ComputeGlobalTarget(Handle<GlobalObject> global,
|
| Handle<JSFunction> candidate(JSFunction::cast(cell_->value()));
|
| // If the function is in new space we assume it's more likely to
|
| // change and thus prefer the general IC code.
|
| - if (!HEAP->InNewSpace(*candidate) &&
|
| - CanCallWithoutIC(candidate, arguments()->length())) {
|
| + if (!HEAP->InNewSpace(*candidate)) {
|
| target_ = candidate;
|
| return true;
|
| }
|
|
|