Index: src/hydrogen.h |
diff --git a/src/hydrogen.h b/src/hydrogen.h |
index faaffc3fc62fec9e453de9e0fdfe5eaf74fd44c6..4d66aef875874db327f3eaca0c0096d9f3824718 100644 |
--- a/src/hydrogen.h |
+++ b/src/hydrogen.h |
@@ -552,8 +552,16 @@ class HEnvironment: public ZoneObject { |
int arguments, |
FunctionLiteral* function, |
HConstant* undefined, |
- CallKind call_kind, |
- InliningKind inlining_kind) const; |
+ InliningKind inlining_kind, |
+ bool undefined_receiver) const; |
+ |
+ static bool UseUndefinedReceiver(Handle<JSFunction> closure, |
+ FunctionLiteral* function, |
+ CallKind call_kind, |
+ InliningKind inlining_kind) { |
+ return (closure->shared()->native() || !function->is_classic_mode()) && |
+ call_kind == CALL_AS_FUNCTION && inlining_kind != CONSTRUCT_CALL_RETURN; |
+ } |
HEnvironment* DiscardInlined(bool drop_extra) { |
HEnvironment* outer = outer_; |