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

Side by Side Diff: runtime/vm/parser_test.cc

Issue 2327693002: Add --parse-all option in order to benchmark and measure the scanner/parser performance. (Closed)
Patch Set: Address review comments. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 5
6 #include "vm/ast_printer.h" 6 #include "vm/ast_printer.h"
7 #include "vm/class_finalizer.h" 7 #include "vm/class_finalizer.h"
8 #include "vm/debugger.h" 8 #include "vm/debugger.h"
9 #include "vm/longjump.h" 9 #include "vm/longjump.h"
10 #include "vm/object.h" 10 #include "vm/object.h"
(...skipping 22 matching lines...) Expand all
33 EXPECT(!cls.IsNull()); 33 EXPECT(!cls.IsNull());
34 Function& function = 34 Function& function =
35 Function::ZoneHandle(cls.LookupStaticFunction(funcname)); 35 Function::ZoneHandle(cls.LookupStaticFunction(funcname));
36 EXPECT(!function.IsNull()); 36 EXPECT(!function.IsNull());
37 ParsedFunction* parsed_function = 37 ParsedFunction* parsed_function =
38 new ParsedFunction(Thread::Current(), function); 38 new ParsedFunction(Thread::Current(), function);
39 Parser::ParseFunction(parsed_function); 39 Parser::ParseFunction(parsed_function);
40 EXPECT(parsed_function->node_sequence() != NULL); 40 EXPECT(parsed_function->node_sequence() != NULL);
41 printf("Class %s function %s:\n", cname, fname); 41 printf("Class %s function %s:\n", cname, fname);
42 if (FLAG_support_ast_printer) { 42 if (FLAG_support_ast_printer) {
43 AstPrinter::PrintFunctionNodes(*parsed_function); 43 AstPrinter ast_printer;
44 ast_printer.PrintFunctionNodes(*parsed_function);
44 } else { 45 } else {
45 OS::Print("AST printer not supported."); 46 OS::Print("AST printer not supported.");
46 } 47 }
47 retval = true; 48 retval = true;
48 } else { 49 } else {
49 retval = false; 50 retval = false;
50 } 51 }
51 EXPECT(retval); 52 EXPECT(retval);
52 } 53 }
53 54
(...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 " name=:current_context_var\n" 571 " name=:current_context_var\n"
571 " 1 ContextLevel level=1 scope=2 begin=3 end=79\n" 572 " 1 ContextLevel level=1 scope=2 begin=3 end=79\n"
572 " 2 ContextVar level=1 begin=9 end=79 name=x\n" 573 " 2 ContextVar level=1 begin=9 end=79 name=x\n"
573 " 3 StackVar scope=2 begin=11 end=79 name=b\n", 574 " 3 StackVar scope=2 begin=11 end=79 name=b\n",
574 CaptureVarsAtLine(lib, "a", 10)); 575 CaptureVarsAtLine(lib, "a", 10));
575 } 576 }
576 577
577 #endif // !PRODUCT 578 #endif // !PRODUCT
578 579
579 } // namespace dart 580 } // namespace dart
OLDNEW
« runtime/vm/compiler.cc ('K') | « runtime/vm/object.cc ('k') | runtime/vm/precompiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698