| Index: src/parser.cc
|
| diff --git a/src/parser.cc b/src/parser.cc
|
| index 11acc934fc6146794ae0f4a4d4505ef8c79ffdfe..e53352d26c1d459dd732567c55b18373897ac7ee 100644
|
| --- a/src/parser.cc
|
| +++ b/src/parser.cc
|
| @@ -912,6 +912,7 @@ Parser::Parser(ParseInfo* info)
|
| set_allow_natives(FLAG_allow_natives_syntax || info->is_native());
|
| set_allow_harmony_arrow_functions(FLAG_harmony_arrow_functions);
|
| set_allow_harmony_sloppy(FLAG_harmony_sloppy);
|
| + set_allow_harmony_sloppy_function(FLAG_harmony_sloppy_function);
|
| set_allow_harmony_sloppy_let(FLAG_harmony_sloppy_let);
|
| set_allow_harmony_rest_parameters(FLAG_harmony_rest_parameters);
|
| set_allow_harmony_spreadcalls(FLAG_harmony_spreadcalls);
|
| @@ -2224,8 +2225,10 @@ Statement* Parser::ParseFunctionDeclaration(
|
| VariableMode mode =
|
| is_strong(language_mode())
|
| ? CONST
|
| - : (is_strict(language_mode()) || allow_harmony_sloppy()) &&
|
| - !scope_->is_declaration_scope() ? LET : VAR;
|
| + : (is_strict(language_mode()) || allow_harmony_sloppy_function()) &&
|
| + !scope_->is_declaration_scope()
|
| + ? LET
|
| + : VAR;
|
| VariableProxy* proxy = NewUnresolved(name, mode);
|
| Declaration* declaration =
|
| factory()->NewFunctionDeclaration(proxy, mode, fun, scope_, pos);
|
|
|