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

Unified Diff: src/preparser-api.cc

Issue 6759025: Version 3.2.6 (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: 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/profile-generator.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..61e9e7e03549a8da31132c67f6e88026ab5b33ea 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;
+ internal::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/profile-generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698