| Index: src/hydrogen.h
|
| diff --git a/src/hydrogen.h b/src/hydrogen.h
|
| index 278a298435e56de0d7b0440d5d9e60e21f731349..4ea3777b40e9003be449839d2102849a1a92008a 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;
|
| + ReturnHandlingFlag return_handling) const;
|
|
|
| void AddIncomingEdge(HBasicBlock* block, HEnvironment* other);
|
|
|
| @@ -703,13 +701,6 @@ class TestContext: public AstContext {
|
| };
|
|
|
|
|
| -enum ReturnHandlingFlag {
|
| - NORMAL_RETURN,
|
| - DROP_EXTRA_ON_RETURN,
|
| - CONSTRUCT_CALL_RETURN
|
| -};
|
| -
|
| -
|
| class FunctionState {
|
| public:
|
| FunctionState(HGraphBuilder* owner,
|
| @@ -721,8 +712,7 @@ class 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; }
|
| + ReturnHandlingFlag return_handling() const { return return_handling_; }
|
| HBasicBlock* function_return() { return function_return_; }
|
| TestContext* test_context() { return test_context_; }
|
| void ClearInlinedTestContext() {
|
| @@ -752,10 +742,6 @@ 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_;
|
|
|
| // When inlining in an effect or value context, this is the return block.
|
| @@ -1033,7 +1019,7 @@ 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);
|
| @@ -1041,6 +1027,9 @@ class HGraphBuilder: public AstVisitor {
|
| bool TryInlineCall(Call* expr, bool drop_extra = false);
|
| bool TryInlineConstruct(CallNew* expr, HValue* receiver);
|
| 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,
|
|
|