Index: src/preparser-api.cc |
diff --git a/src/preparser-api.cc b/src/preparser-api.cc |
index 6ed8e36dc672de128dd7dc9e4a3f2f69126c0db4..111a8b738e852e6f4626d31481d9d0261a7f3f77 100644 |
--- a/src/preparser-api.cc |
+++ b/src/preparser-api.cc |
@@ -27,8 +27,6 @@ |
#include "../include/v8-preparser.h" |
-#include "v8.h" |
- |
#include "globals.h" |
#include "checks.h" |
#include "allocation.h" |
@@ -161,8 +159,8 @@ class InputStreamUTF16Buffer : public UC16CharacterStream { |
class StandAloneJavaScriptScanner : public JavaScriptScanner { |
public: |
- StandAloneJavaScriptScanner() |
- : JavaScriptScanner(Isolate::Current()) { } |
+ explicit StandAloneJavaScriptScanner(ScannerConstants* scanner_constants) |
+ : JavaScriptScanner(scanner_constants) { } |
void Initialize(UC16CharacterStream* source) { |
source_ = source; |
@@ -176,7 +174,8 @@ class StandAloneJavaScriptScanner : public JavaScriptScanner { |
}; |
-// Functions declared by allocation.h |
+// Functions declared by allocation.h and implemented in both api.cc (for v8) |
+// or here (for a stand-alone preparser). |
void FatalProcessOutOfMemory(const char* reason) { |
V8_Fatal(__FILE__, __LINE__, reason); |
@@ -193,7 +192,8 @@ UnicodeInputStream::~UnicodeInputStream() { } |
PreParserData Preparse(UnicodeInputStream* input, size_t max_stack) { |
internal::InputStreamUTF16Buffer buffer(input); |
uintptr_t stack_limit = reinterpret_cast<uintptr_t>(&buffer) - max_stack; |
- internal::StandAloneJavaScriptScanner scanner; |
+ ScannerConstants scanner_constants; |
+ internal::StandAloneJavaScriptScanner scanner(&scanner_constants); |
scanner.Initialize(&buffer); |
internal::CompleteParserRecorder recorder; |
preparser::PreParser::PreParseResult result = |