| OLD | NEW |
| 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 | 8 #ifndef DART_PRECOMPILED |
| 9 | 9 |
| 10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 const Script& script) { | 451 const Script& script) { |
| 452 Thread* thread = Thread::Current(); | 452 Thread* thread = Thread::Current(); |
| 453 ASSERT(thread->long_jump_base()->IsSafeToJump()); | 453 ASSERT(thread->long_jump_base()->IsSafeToJump()); |
| 454 CSTAT_TIMER_SCOPE(thread, parser_timer); | 454 CSTAT_TIMER_SCOPE(thread, parser_timer); |
| 455 VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId); | 455 VMTagScope tagScope(thread, VMTag::kCompileTopLevelTagId); |
| 456 TimelineDurationScope tds(thread, | 456 TimelineDurationScope tds(thread, |
| 457 thread->isolate()->GetCompilerStream(), | 457 thread->isolate()->GetCompilerStream(), |
| 458 "CompileTopLevel"); | 458 "CompileTopLevel"); |
| 459 if (tds.enabled()) { | 459 if (tds.enabled()) { |
| 460 tds.SetNumArguments(1); | 460 tds.SetNumArguments(1); |
| 461 tds.CopyArgument( | 461 tds.CopyArgument(0, "script", String::Handle(script.url()).ToCString()); |
| 462 0, | |
| 463 "script", | |
| 464 const_cast<char*>(String::Handle(script.url()).ToCString())); | |
| 465 } | 462 } |
| 466 | 463 |
| 467 Parser parser(script, library, 0); | 464 Parser parser(script, library, 0); |
| 468 parser.ParseTopLevel(); | 465 parser.ParseTopLevel(); |
| 469 } | 466 } |
| 470 | 467 |
| 471 | 468 |
| 472 void Parser::ComputeCurrentToken() { | 469 void Parser::ComputeCurrentToken() { |
| 473 ASSERT(token_kind_ == Token::kILLEGAL); | 470 ASSERT(token_kind_ == Token::kILLEGAL); |
| 474 token_kind_ = tokens_iterator_.CurrentTokenKind(); | 471 token_kind_ = tokens_iterator_.CurrentTokenKind(); |
| (...skipping 13988 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 14463 const ArgumentListNode& function_args, | 14460 const ArgumentListNode& function_args, |
| 14464 const LocalVariable* temp_for_last_arg, | 14461 const LocalVariable* temp_for_last_arg, |
| 14465 bool is_super_invocation) { | 14462 bool is_super_invocation) { |
| 14466 UNREACHABLE(); | 14463 UNREACHABLE(); |
| 14467 return NULL; | 14464 return NULL; |
| 14468 } | 14465 } |
| 14469 | 14466 |
| 14470 } // namespace dart | 14467 } // namespace dart |
| 14471 | 14468 |
| 14472 #endif // DART_PRECOMPILED | 14469 #endif // DART_PRECOMPILED |
| OLD | NEW |