Reviewers: ,

Message:
I get the following build error since the preparser got into
SConscript/SConstruct (http://codereview.chromium.org/6772002):

g++ -o obj/release/preparser-api.o -c -Wall -Werror -W -Wno-unused-parameter
-Wnon-virtual-dtor -pedantic -m32 -O3 -fomit-frame-pointer -fdata-sections
-ffunction-sections -ansi -fno-rtti -fno-exceptions -fvisibility=hidden -Wall
-Werror -W -Wno-unused-parameter -Wnon-virtual-dtor -pedantic -m32 -O3
-fomit-frame-pointer -fdata-sections -ffunction-sections -ansi
-DV8_TARGET_ARCH_IA32 -DV8_FAST_TLS -DENABLE_DEBUGGER_SUPPORT
-DENABLE_VMSTATE_TRACKING -DENABLE_LOGGING_AND_PROFILING -Isrc
src/preparser-api.cc
cc1plus: warnings being treated as errors
In file included from src/preparser-api.cc:28:0:
src/../include/v8-preparser.h: In static member function 'static
v8::PreParserData v8::PreParserData::StackOverflow()':
src/../include/v8-preparser.h:76:70: error: passing NULL to non-pointer argument
1 of 'v8::PreParserData::PreParserData(size_t, const uint8_t*)'
src/preparser-api.cc: In function 'v8::PreParserData
v8::Preparse(v8::UnicodeInputStream*, size_t)':
src/preparser-api.cc:195:3: error: 'ScannerConstants' was not declared in this
scope
src/preparser-api.cc:195:20: error: expected ';' before 'scanner_constants'
src/preparser-api.cc:196:50: error: 'scanner_constants' was not declared in this
scope
scons: *** [obj/release/preparser-api.o] Error 1
scons: building terminated because of errors.

I use gcc-4.5.2 on linux system.


Description:
PreParser build fix

Patch from Peter Varga <pva...@inf.u-szeged.hu>.

BUG=none
TEST=none


Please review this at http://codereview.chromium.org/6773009/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files:
  M include/v8-preparser.h
  M src/preparser-api.cc


Index: include/v8-preparser.h
diff --git a/include/v8-preparser.h b/include/v8-preparser.h
index 9425f7d46725a1b64dda1b622cbe9b5634b082a7..87aa140da12c512574f06b16f9dd722509d80c01 100644
--- a/include/v8-preparser.h
+++ b/include/v8-preparser.h
@@ -73,7 +73,7 @@ class PreParserData {
       : data_(data), size_(size) { }

   // Create a PreParserData value where stack_overflow reports true.
-  static PreParserData StackOverflow() { return PreParserData(NULL, 0); }
+  static PreParserData StackOverflow() { return PreParserData(0, 0); }
   // Whether the pre-parser stopped due to a stack overflow.
   // If this is the case, size() and data() should not be used.

Index: src/preparser-api.cc
diff --git a/src/preparser-api.cc b/src/preparser-api.cc
index 111a8b738e852e6f4626d31481d9d0261a7f3f77..5bdb917bb2449177ca33da2bfcd0e978f5272bee 100644
--- a/src/preparser-api.cc
+++ b/src/preparser-api.cc
@@ -192,7 +192,7 @@ 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;
-  ScannerConstants scanner_constants;
+  v8::internal::ScannerConstants scanner_constants;
   internal::StandAloneJavaScriptScanner scanner(&scanner_constants);
   scanner.Initialize(&buffer);
   internal::CompleteParserRecorder recorder;


--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev

Reply via email to