Reviewers: fschneider,
Description:
Fix a pair of compilation failure bugs in test files due to r5576.
1. parser.h depends on ast.h, but only gets it included implicitly
everywhere parser.h is included (except for tests). Include ast.h in
parser.h.
2. Regular expression tests test the free functions that have just been
moved into class Parser.
[email protected]
Please review this at http://codereview.chromium.org/3602007/show
Affected files:
M src/parser.h
M test/cctest/test-regexp.cc
Index: src/parser.h
diff --git a/src/parser.h b/src/parser.h
index
9dfb2ec7fa488882e9ed10084fa170b37ffb0f1f..99ed22a2f8a0c176cbc216726c576ec34b318aad
100644
--- a/src/parser.h
+++ b/src/parser.h
@@ -29,6 +29,7 @@
#define V8_PARSER_H_
#include "allocation.h"
+#include "ast.h"
#include "scanner.h"
namespace v8 {
Index: test/cctest/test-regexp.cc
diff --git a/test/cctest/test-regexp.cc b/test/cctest/test-regexp.cc
index
186350be3d0bf9d7c3dcefed4c89932328008c0a..11a808e3699fb3f29f3ad59fdc80914c46266fb1
100644
--- a/test/cctest/test-regexp.cc
+++ b/test/cctest/test-regexp.cc
@@ -64,7 +64,7 @@ static bool CheckParse(const char* input) {
ZoneScope zone_scope(DELETE_ON_EXIT);
FlatStringReader reader(CStrVector(input));
RegExpCompileData result;
- return v8::internal::ParseRegExp(&reader, false, &result);
+ return v8::internal::Parser::ParseRegExp(&reader, false, &result);
}
@@ -74,7 +74,7 @@ static SmartPointer<const char> Parse(const char* input) {
ZoneScope zone_scope(DELETE_ON_EXIT);
FlatStringReader reader(CStrVector(input));
RegExpCompileData result;
- CHECK(v8::internal::ParseRegExp(&reader, false, &result));
+ CHECK(v8::internal::Parser::ParseRegExp(&reader, false, &result));
CHECK(result.tree != NULL);
CHECK(result.error.is_null());
SmartPointer<const char> output = result.tree->ToString();
@@ -88,7 +88,7 @@ static bool CheckSimple(const char* input) {
ZoneScope zone_scope(DELETE_ON_EXIT);
FlatStringReader reader(CStrVector(input));
RegExpCompileData result;
- CHECK(v8::internal::ParseRegExp(&reader, false, &result));
+ CHECK(v8::internal::Parser::ParseRegExp(&reader, false, &result));
CHECK(result.tree != NULL);
CHECK(result.error.is_null());
return result.simple;
@@ -106,7 +106,7 @@ static MinMaxPair CheckMinMaxMatch(const char* input) {
ZoneScope zone_scope(DELETE_ON_EXIT);
FlatStringReader reader(CStrVector(input));
RegExpCompileData result;
- CHECK(v8::internal::ParseRegExp(&reader, false, &result));
+ CHECK(v8::internal::Parser::ParseRegExp(&reader, false, &result));
CHECK(result.tree != NULL);
CHECK(result.error.is_null());
int min_match = result.tree->min_match();
@@ -365,7 +365,7 @@ static void ExpectError(const char* input,
ZoneScope zone_scope(DELETE_ON_EXIT);
FlatStringReader reader(CStrVector(input));
RegExpCompileData result;
- CHECK_EQ(false, v8::internal::ParseRegExp(&reader, false, &result));
+ CHECK_EQ(false, v8::internal::Parser::ParseRegExp(&reader, false,
&result));
CHECK(result.tree == NULL);
CHECK(!result.error.is_null());
SmartPointer<char> str = result.error->ToCString(ALLOW_NULLS);
@@ -473,7 +473,7 @@ static RegExpNode* Compile(const char* input, bool
multiline, bool is_ascii) {
V8::Initialize(NULL);
FlatStringReader reader(CStrVector(input));
RegExpCompileData compile_data;
- if (!v8::internal::ParseRegExp(&reader, multiline, &compile_data))
+ if (!v8::internal::Parser::ParseRegExp(&reader, multiline,
&compile_data))
return NULL;
Handle<String> pattern = Factory::NewStringFromUtf8(CStrVector(input));
RegExpEngine::Compile(&compile_data, false, multiline, pattern,
is_ascii);
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev