Index: src/parser.cc |
diff --git a/src/parser.cc b/src/parser.cc |
index b1d427e2529f4ec23a4ac702094ba4f874657443..446bf169e28109659801f183439f2f5f0765c2c9 100644 |
--- a/src/parser.cc |
+++ b/src/parser.cc |
@@ -511,6 +511,11 @@ bool ParserTraits::ShortcutNumericLiteralBinaryExpression( |
*x = factory->NewNumberLiteral(value, pos); |
return true; |
} |
+ case Token::EXP: { |
+ double value = power_helper(x_val, y_val); |
+ *x = factory->NewNumberLiteral(value, pos); |
+ return true; |
+ } |
default: |
break; |
} |
@@ -815,6 +820,7 @@ Parser::Parser(CompilationInfo* info, uintptr_t stack_limit, uint32_t hash_seed, |
set_allow_harmony_computed_property_names( |
FLAG_harmony_computed_property_names); |
set_allow_harmony_rest_params(FLAG_harmony_rest_parameters); |
+ set_allow_harmony_exponentiation(FLAG_harmony_exponentiation); |
set_allow_strong_mode(FLAG_strong_mode); |
for (int feature = 0; feature < v8::Isolate::kUseCounterFeatureCount; |
++feature) { |
@@ -4059,6 +4065,8 @@ PreParser::PreParseResult Parser::ParseLazyFunctionBodyWithPreParser( |
allow_harmony_computed_property_names()); |
reusable_preparser_->set_allow_harmony_rest_params( |
allow_harmony_rest_params()); |
+ reusable_preparser_->set_allow_harmony_exponentiation( |
+ allow_harmony_exponentiation()); |
reusable_preparser_->set_allow_strong_mode(allow_strong_mode()); |
} |
PreParser::PreParseResult result = reusable_preparser_->PreParseLazyFunction( |