Index: src/preparser.h |
diff --git a/src/preparser.h b/src/preparser.h |
index cb1d5fb4eb7baa65ef4d8c8973cb067796e9ce6d..0f5ad7e28e5508e4e54b3dcfbf9ded6cfc7765c5 100644 |
--- a/src/preparser.h |
+++ b/src/preparser.h |
@@ -118,9 +118,12 @@ class PreParser { |
// during parsing. |
static PreParseResult PreParseProgram(i::JavaScriptScanner* scanner, |
i::ParserRecorder* log, |
- bool allow_lazy, |
+ int flags, |
uintptr_t stack_limit) { |
- return PreParser(scanner, log, stack_limit, allow_lazy).PreParse(); |
+ bool allow_lazy = (flags & i::kAllowLazy) != 0; |
+ bool allow_natives_syntax = (flags & i::kAllowNativesSyntax) != 0; |
+ return PreParser(scanner, log, stack_limit, |
+ allow_lazy, allow_natives_syntax).PreParse(); |
} |
private: |
@@ -437,7 +440,8 @@ class PreParser { |
PreParser(i::JavaScriptScanner* scanner, |
i::ParserRecorder* log, |
uintptr_t stack_limit, |
- bool allow_lazy) |
+ bool allow_lazy, |
+ bool allow_natives_syntax) |
: scanner_(scanner), |
log_(log), |
scope_(NULL), |
@@ -445,7 +449,8 @@ class PreParser { |
strict_mode_violation_location_(i::Scanner::Location::invalid()), |
strict_mode_violation_type_(NULL), |
stack_overflow_(false), |
- allow_lazy_(true), |
+ allow_lazy_(allow_lazy), |
+ allow_natives_syntax_(allow_natives_syntax), |
parenthesized_function_(false), |
harmony_scoping_(scanner->HarmonyScoping()) { } |
@@ -607,6 +612,7 @@ class PreParser { |
const char* strict_mode_violation_type_; |
bool stack_overflow_; |
bool allow_lazy_; |
+ bool allow_natives_syntax_; |
bool parenthesized_function_; |
bool harmony_scoping_; |
}; |