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

Unified Diff: runtime/vm/parser_test.cc

Issue 1678203002: Remove more feature in product mode (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | « runtime/vm/parser.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser_test.cc
diff --git a/runtime/vm/parser_test.cc b/runtime/vm/parser_test.cc
index c7328ace5d74cee92752d3d9e690e9f655374e61..58892279a18bdc217fecd241d558ea0cfd3e356e 100644
--- a/runtime/vm/parser_test.cc
+++ b/runtime/vm/parser_test.cc
@@ -18,7 +18,9 @@ namespace dart {
DECLARE_FLAG(bool, show_invisible_frames);
-void DumpFunction(const Library& lib, const char* cname, const char* fname) {
+static void DumpFunction(const Library& lib,
+ const char* cname,
+ const char* fname) {
const String& classname = String::Handle(Symbols::New(cname));
String& funcname = String::Handle(String::New(fname));
@@ -36,7 +38,11 @@ void DumpFunction(const Library& lib, const char* cname, const char* fname) {
Parser::ParseFunction(parsed_function);
EXPECT(parsed_function->node_sequence() != NULL);
printf("Class %s function %s:\n", cname, fname);
- AstPrinter::PrintFunctionNodes(*parsed_function);
+ if (FLAG_support_ast_printer) {
+ AstPrinter::PrintFunctionNodes(*parsed_function);
+ } else {
+ OS::Print("AST printer not supported.");
+ }
retval = true;
} else {
retval = false;
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698