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

Unified Diff: test/cctest/test-parsing.cc

Issue 24104006: Limit entry points into the parser API. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 3 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/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index e6b536771a14ba453d9058e10ea94c8ba6bce8b6..8d52fe5999dab1258e88565cfe3fd3715b2c3d53 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -1027,11 +1027,11 @@ TEST(ScopePositions) {
parser.set_allow_harmony_scoping(true);
info.MarkAsGlobal();
info.SetLanguageMode(source_data[i].language_mode);
- i::FunctionLiteral* function = parser.ParseProgram();
- CHECK(function != NULL);
+ parser.Parse();
+ CHECK(info.function() != NULL);
// Check scope types and positions.
- i::Scope* scope = function->scope();
+ i::Scope* scope = info.function()->scope();
CHECK(scope->is_global_scope());
CHECK_EQ(scope->start_position(), 0);
CHECK_EQ(scope->end_position(), kProgramSize);
@@ -1137,7 +1137,8 @@ void TestParserSyncWithFlags(i::Handle<i::String> source, unsigned flags) {
i::Parser parser(&info);
SET_PARSER_FLAGS(parser, flags);
info.MarkAsGlobal();
- function = parser.ParseProgram();
+ parser.Parse();
+ function = info.function();
}
// Check that preparsing fails iff parsing fails.
« no previous file with comments | « src/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698