Upgrade to V8 3.5
Merge V8 3.5.10.24
Simple merge required updates to makefiles only.
Bug: 5688872
Change-Id: I0acdb9a1a53919d84e9a7525308e8371739d2f06
diff --git a/src/preparser.h b/src/preparser.h
index 3d72c97..cd0a530 100644
--- a/src/preparser.h
+++ b/src/preparser.h
@@ -77,6 +77,12 @@
kFunctionScope
};
+ enum VariableDeclarationContext {
+ kSourceElement,
+ kStatement,
+ kForStatement
+ };
+
class Expression;
class Identifier {
@@ -344,7 +350,8 @@
strict_mode_violation_type_(NULL),
stack_overflow_(false),
allow_lazy_(true),
- parenthesized_function_(false) { }
+ parenthesized_function_(false),
+ harmony_block_scoping_(scanner->HarmonyBlockScoping()) { }
// Preparse the program. Only called in PreParseProgram after creating
// the instance.
@@ -377,12 +384,16 @@
// which is set to false if parsing failed; it is unchanged otherwise.
// By making the 'exception handling' explicit, we are forced to check
// for failure at the call sites.
+ Statement ParseSourceElement(bool* ok);
SourceElements ParseSourceElements(int end_token, bool* ok);
Statement ParseStatement(bool* ok);
Statement ParseFunctionDeclaration(bool* ok);
Statement ParseBlock(bool* ok);
- Statement ParseVariableStatement(bool* ok);
- Statement ParseVariableDeclarations(bool accept_IN, int* num_decl, bool* ok);
+ Statement ParseVariableStatement(VariableDeclarationContext var_context,
+ bool* ok);
+ Statement ParseVariableDeclarations(VariableDeclarationContext var_context,
+ int* num_decl,
+ bool* ok);
Statement ParseExpressionOrLabelledStatement(bool* ok);
Statement ParseIfStatement(bool* ok);
Statement ParseContinueStatement(bool* ok);
@@ -496,6 +507,7 @@
bool stack_overflow_;
bool allow_lazy_;
bool parenthesized_function_;
+ bool harmony_block_scoping_;
};
} } // v8::preparser