Remove preparser library; link preparser executable against full V8

Review URL: https://codereview.chromium.org/13880018

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@14244 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 4a9c3d4a
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include "../include/v8.h"
#include "../include/v8stdint.h" #include "../include/v8stdint.h"
#include "../include/v8-preparser.h" #include "../include/v8-preparser.h"
...@@ -37,8 +38,7 @@ ...@@ -37,8 +38,7 @@
namespace i = v8::internal; namespace i = v8::internal;
// This file is only used for testing the stand-alone preparser // This file is only used for testing the preparser.
// library.
// The first argument must be the path of a JavaScript source file, or // The first argument must be the path of a JavaScript source file, or
// the flags "-e" and the next argument is then the source of a JavaScript // the flags "-e" and the next argument is then the source of a JavaScript
// program. // program.
...@@ -320,6 +320,8 @@ int main(int argc, const char* argv[]) { ...@@ -320,6 +320,8 @@ int main(int argc, const char* argv[]) {
ExceptionExpectation expects = ExceptionExpectation expects =
ParseExpectation(argc - arg_index, argv + arg_index); ParseExpectation(argc - arg_index, argv + arg_index);
v8::V8::Initialize();
ScopedPointer<uint8_t> buffer; ScopedPointer<uint8_t> buffer;
size_t length; size_t length;
......
...@@ -31,11 +31,22 @@ ...@@ -31,11 +31,22 @@
{ {
'target_name': 'preparser', 'target_name': 'preparser',
'type': 'executable', 'type': 'executable',
'dependencies': [ 'conditions': [
'../tools/gyp/v8.gyp:preparser_lib', # preparser can't link against a shared library, so link against
# the underlying static targets.
['v8_use_snapshot=="true"', {
'dependencies': ['../tools/gyp/v8.gyp:v8_snapshot'],
}, {
'dependencies': ['../tools/gyp/v8.gyp:v8_nosnapshot'],
}],
],
'include_dirs+': [
'../src',
], ],
'sources': [ 'sources': [
'preparser-process.cc', 'preparser-process.cc',
'../include/v8-preparser.h',
'../src/preparser-api.cc',
], ],
}, },
], ],
......
...@@ -168,16 +168,6 @@ class InputStreamUtf16Buffer : public Utf16CharacterStream { ...@@ -168,16 +168,6 @@ class InputStreamUtf16Buffer : public Utf16CharacterStream {
unsigned pushback_buffer_backing_size_; unsigned pushback_buffer_backing_size_;
}; };
// 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);
}
bool EnableSlowAsserts() { return true; }
} // namespace internal. } // namespace internal.
...@@ -204,9 +194,3 @@ PreParserData Preparse(UnicodeInputStream* input, size_t max_stack) { ...@@ -204,9 +194,3 @@ PreParserData Preparse(UnicodeInputStream* input, size_t max_stack) {
} }
} // namespace v8. } // namespace v8.
// Used by ASSERT macros and other immediate exits.
extern "C" void V8_Fatal(const char* file, int line, const char* format, ...) {
exit(EXIT_FAILURE);
}
...@@ -927,73 +927,6 @@ ...@@ -927,73 +927,6 @@
}], }],
], ],
}, },
{
'target_name': 'preparser_lib',
'type': 'static_library',
'include_dirs+': [
'../../src',
],
'sources': [
'../../include/v8-preparser.h',
'../../include/v8stdint.h',
'../../src/allocation.cc',
'../../src/allocation.h',
'../../src/atomicops.h',
'../../src/atomicops_internals_x86_gcc.cc',
'../../src/bignum.cc',
'../../src/bignum.h',
'../../src/bignum-dtoa.cc',
'../../src/bignum-dtoa.h',
'../../src/cached-powers.cc',
'../../src/cached-powers.h',
'../../src/char-predicates-inl.h',
'../../src/char-predicates.h',
'../../src/checks.h',
'../../src/conversions-inl.h',
'../../src/conversions.cc',
'../../src/conversions.h',
'../../src/diy-fp.cc',
'../../src/diy-fp.h',
'../../src/double.h',
'../../src/dtoa.cc',
'../../src/dtoa.h',
'../../src/fast-dtoa.cc',
'../../src/fast-dtoa.h',
'../../src/fixed-dtoa.cc',
'../../src/fixed-dtoa.h',
'../../src/globals.h',
'../../src/hashmap.h',
'../../src/list-inl.h',
'../../src/list.h',
'../../src/once.cc',
'../../src/once.h',
'../../src/preparse-data-format.h',
'../../src/preparse-data.cc',
'../../src/preparse-data.h',
'../../src/preparser.cc',
'../../src/preparser.h',
'../../src/preparser-api.cc',
'../../src/scanner.cc',
'../../src/scanner.h',
'../../src/strtod.cc',
'../../src/strtod.h',
'../../src/token.cc',
'../../src/token.h',
'../../src/unicode-inl.h',
'../../src/unicode.cc',
'../../src/unicode.h',
'../../src/utils-inl.h',
'../../src/utils.cc',
'../../src/utils.h',
],
'conditions': [
['OS=="win"', {
'sources': [
'../../src/win32-math.cc',
'../../src/win32-math.h',
]}],
],
},
], ],
}, { # use_system_v8 != 0 }, { # use_system_v8 != 0
'targets': [ 'targets': [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment