Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(893)

Unified Diff: src/preparser-api.cc

Issue 6749029: Make the preparser standalone library and process build in debug mode. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comment. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/preparser.cc ('k') | src/scanner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 =
« no previous file with comments | « src/preparser.cc ('k') | src/scanner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698