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

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

Issue 1952023002: Minor cleanup based on profiler output of CompileParseFunction. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 #include "vm/parser.h" 5 #include "vm/parser.h"
6 #include "vm/flags.h" 6 #include "vm/flags.h"
7 7
8 #ifndef DART_PRECOMPILED_RUNTIME 8 #ifndef DART_PRECOMPILED_RUNTIME
9 9
10 #include "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
357 357
358 void Parser::TryStack::AddNodeForFinallyInlining(AstNode* node) { 358 void Parser::TryStack::AddNodeForFinallyInlining(AstNode* node) {
359 inlined_finally_nodes_.Add(node); 359 inlined_finally_nodes_.Add(node);
360 } 360 }
361 361
362 362
363 // For parsing a compilation unit. 363 // For parsing a compilation unit.
364 Parser::Parser(const Script& script, 364 Parser::Parser(const Script& script,
365 const Library& library, 365 const Library& library,
366 TokenPosition token_pos) 366 TokenPosition token_pos)
367 : isolate_(Thread::Current()->isolate()), 367 : thread_(Thread::Current()),
368 thread_(Thread::Current()), 368 isolate_(thread()->isolate()),
369 script_(Script::Handle(zone(), script.raw())), 369 script_(Script::Handle(zone(), script.raw())),
370 tokens_iterator_(TokenStream::Handle(zone(), script.tokens()), 370 tokens_iterator_(zone(),
371 TokenStream::Handle(zone(), script.tokens()),
371 token_pos), 372 token_pos),
372 token_kind_(Token::kILLEGAL), 373 token_kind_(Token::kILLEGAL),
373 current_block_(NULL), 374 current_block_(NULL),
374 is_top_level_(false), 375 is_top_level_(false),
375 await_is_keyword_(false), 376 await_is_keyword_(false),
376 current_member_(NULL), 377 current_member_(NULL),
377 allow_function_literals_(true), 378 allow_function_literals_(true),
378 parsed_function_(NULL), 379 parsed_function_(NULL),
379 innermost_function_(Function::Handle(zone())), 380 innermost_function_(Function::Handle(zone())),
380 literal_token_(LiteralToken::Handle(zone())), 381 literal_token_(LiteralToken::Handle(zone())),
381 current_class_(Class::Handle(zone())), 382 current_class_(Class::Handle(zone())),
382 library_(Library::Handle(zone(), library.raw())), 383 library_(Library::Handle(zone(), library.raw())),
383 try_stack_(NULL), 384 try_stack_(NULL),
384 last_used_try_index_(0), 385 last_used_try_index_(0),
385 unregister_pending_function_(false), 386 unregister_pending_function_(false),
386 async_temp_scope_(NULL), 387 async_temp_scope_(NULL),
387 trace_indent_(0), 388 trace_indent_(0),
388 recursion_counter_(0) { 389 recursion_counter_(0) {
389 ASSERT(tokens_iterator_.IsValid()); 390 ASSERT(tokens_iterator_.IsValid());
390 ASSERT(!library.IsNull()); 391 ASSERT(!library.IsNull());
391 } 392 }
392 393
393 394
394 // For parsing a function. 395 // For parsing a function.
395 Parser::Parser(const Script& script, 396 Parser::Parser(const Script& script,
396 ParsedFunction* parsed_function, 397 ParsedFunction* parsed_function,
397 TokenPosition token_pos) 398 TokenPosition token_pos)
398 : isolate_(Thread::Current()->isolate()), 399 : thread_(Thread::Current()),
399 thread_(Thread::Current()), 400 isolate_(thread()->isolate()),
400 script_(Script::Handle(zone(), script.raw())), 401 script_(Script::Handle(zone(), script.raw())),
401 tokens_iterator_(TokenStream::Handle(zone(), script.tokens()), 402 tokens_iterator_(zone(),
403 TokenStream::Handle(zone(), script.tokens()),
402 token_pos), 404 token_pos),
403 token_kind_(Token::kILLEGAL), 405 token_kind_(Token::kILLEGAL),
404 current_block_(NULL), 406 current_block_(NULL),
405 is_top_level_(false), 407 is_top_level_(false),
406 await_is_keyword_(false), 408 await_is_keyword_(false),
407 current_member_(NULL), 409 current_member_(NULL),
408 allow_function_literals_(true), 410 allow_function_literals_(true),
409 parsed_function_(parsed_function), 411 parsed_function_(parsed_function),
410 innermost_function_(Function::Handle(zone(), 412 innermost_function_(Function::Handle(zone(),
411 parsed_function->function().raw())), 413 parsed_function->function().raw())),
(...skipping 14071 matching lines...) Expand 10 before | Expand all | Expand 10 after
14483 const ArgumentListNode& function_args, 14485 const ArgumentListNode& function_args,
14484 const LocalVariable* temp_for_last_arg, 14486 const LocalVariable* temp_for_last_arg,
14485 bool is_super_invocation) { 14487 bool is_super_invocation) {
14486 UNREACHABLE(); 14488 UNREACHABLE();
14487 return NULL; 14489 return NULL;
14488 } 14490 }
14489 14491
14490 } // namespace dart 14492 } // namespace dart
14491 14493
14492 #endif // DART_PRECOMPILED_RUNTIME 14494 #endif // DART_PRECOMPILED_RUNTIME
OLDNEW
« no previous file with comments | « runtime/vm/parser.h ('k') | runtime/vm/profiler_service.cc » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698