| Index: src/hydrogen.h
|
| diff --git a/src/hydrogen.h b/src/hydrogen.h
|
| index 816f386d4fe8bbd2ff59ee177edd24a27e9d9bcd..851ae1527a070cbc3d73c9d3061e8e3b29ab4b9e 100644
|
| --- a/src/hydrogen.h
|
| +++ b/src/hydrogen.h
|
| @@ -135,9 +135,7 @@ class HBasicBlock: public ZoneObject {
|
|
|
| // Add the inlined function exit sequence, adding an HLeaveInlined
|
| // instruction and updating the bailout environment.
|
| - void AddLeaveInlined(HValue* return_value,
|
| - HBasicBlock* target,
|
| - FunctionState* state = NULL);
|
| + void AddLeaveInlined(HValue* return_value, FunctionState* state);
|
|
|
| // If a target block is tagged as an inline function return, all
|
| // predecessors should contain the inlined exit sequence:
|
| @@ -510,7 +508,7 @@ class HEnvironment: public ZoneObject {
|
| FunctionLiteral* function,
|
| HConstant* undefined,
|
| CallKind call_kind,
|
| - bool is_construct) const;
|
| + InliningKind inlining_kind) const;
|
|
|
| void AddIncomingEdge(HBasicBlock* block, HEnvironment* other);
|
|
|
| @@ -707,26 +705,18 @@ class TestContext: public AstContext {
|
| };
|
|
|
|
|
| -enum ReturnHandlingFlag {
|
| - NORMAL_RETURN,
|
| - DROP_EXTRA_ON_RETURN,
|
| - CONSTRUCT_CALL_RETURN
|
| -};
|
| -
|
| -
|
| class FunctionState {
|
| public:
|
| FunctionState(HGraphBuilder* owner,
|
| CompilationInfo* info,
|
| TypeFeedbackOracle* oracle,
|
| - ReturnHandlingFlag return_handling);
|
| + InliningKind inlining_kind);
|
| ~FunctionState();
|
|
|
| CompilationInfo* compilation_info() { return compilation_info_; }
|
| TypeFeedbackOracle* oracle() { return oracle_; }
|
| AstContext* call_context() { return call_context_; }
|
| - bool drop_extra() { return return_handling_ == DROP_EXTRA_ON_RETURN; }
|
| - bool is_construct() { return return_handling_ == CONSTRUCT_CALL_RETURN; }
|
| + InliningKind inlining_kind() const { return inlining_kind_; }
|
| HBasicBlock* function_return() { return function_return_; }
|
| TestContext* test_context() { return test_context_; }
|
| void ClearInlinedTestContext() {
|
| @@ -756,11 +746,8 @@ class FunctionState {
|
| // inlined. NULL when not inlining.
|
| AstContext* call_context_;
|
|
|
| - // Indicate whether we have to perform special handling on return from
|
| - // inlined functions.
|
| - // - DROP_EXTRA_ON_RETURN: Drop an extra value from the environment.
|
| - // - CONSTRUCT_CALL_RETURN: Either use allocated receiver or return value.
|
| - ReturnHandlingFlag return_handling_;
|
| + // The kind of call which is currently being inlined.
|
| + InliningKind inlining_kind_;
|
|
|
| // When inlining in an effect or value context, this is the return block.
|
| // It is NULL otherwise. When inlining in a test context, there are a
|
| @@ -1037,14 +1024,17 @@ class HGraphBuilder: public AstVisitor {
|
| bool TryInline(CallKind call_kind,
|
| Handle<JSFunction> target,
|
| int arguments_count,
|
| - HValue* receiver,
|
| + HValue* implicit_return_value,
|
| BailoutId ast_id,
|
| BailoutId return_id,
|
| - ReturnHandlingFlag return_handling);
|
| + InliningKind inlining_kind);
|
|
|
| bool TryInlineCall(Call* expr, bool drop_extra = false);
|
| - bool TryInlineConstruct(CallNew* expr, HValue* receiver);
|
| + bool TryInlineConstruct(CallNew* expr, HValue* implicit_return_value);
|
| bool TryInlineGetter(Handle<JSFunction> getter, Property* prop);
|
| + bool TryInlineSetter(Handle<JSFunction> setter,
|
| + Assignment* assignment,
|
| + HValue* implicit_return_value);
|
| bool TryInlineBuiltinMethodCall(Call* expr,
|
| HValue* receiver,
|
| Handle<Map> receiver_map,
|
|
|