| Index: src/hydrogen.h
|
| diff --git a/src/hydrogen.h b/src/hydrogen.h
|
| index 9260b58cd38a2cfa6a89cb0be39bee81f0e45d88..7b5875850403cb96b87e7ea4342fc7e826d829e9 100644
|
| --- a/src/hydrogen.h
|
| +++ b/src/hydrogen.h
|
| @@ -2321,8 +2321,12 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
|
| void EnsureArgumentsArePushedForAccess();
|
| bool TryArgumentsAccess(Property* expr);
|
|
|
| - // Try to optimize fun.apply(receiver, arguments) pattern.
|
| - bool TryCallApply(Call* expr);
|
| + // Shared code for .call and .apply optimizations.
|
| + void HandleIndirectCall(Call* expr, HValue* function, int arguments_count);
|
| + // Try to optimize indirect calls such as fun.apply(receiver, arguments)
|
| + // or fun.call(...).
|
| + bool TryIndirectCall(Call* expr);
|
| + void BuildFunctionCallCall(Call* expr);
|
|
|
| bool TryHandleArrayCall(Call* expr, HValue* function);
|
| bool TryHandleArrayCallNew(CallNew* expr, HValue* function);
|
| @@ -2363,7 +2367,14 @@ class HOptimizedGraphBuilder : public HGraphBuilder, public AstVisitor {
|
| int arguments_count);
|
| bool TryInlineBuiltinMethodCall(Call* expr,
|
| HValue* receiver,
|
| - Handle<Map> receiver_map);
|
| + Handle<Map> receiver_map,
|
| + Handle<JSFunction> function,
|
| + int args_count_no_receiver);
|
| + bool InlineBuiltinMethodCall(Call* expr,
|
| + HValue* receiver,
|
| + Handle<Map> receiver_map,
|
| + BuiltinFunctionId id,
|
| + int args_count_no_receiver);
|
| bool TryInlineBuiltinFunctionCall(Call* expr);
|
| enum ApiCallType {
|
| kCallApiFunction,
|
|
|