Chromium Code Reviews| 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 | 6 |
| 7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
| 8 #include "platform/utils.h" | 8 #include "platform/utils.h" |
| 9 #include "vm/bootstrap.h" | 9 #include "vm/bootstrap.h" |
| 10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
| (...skipping 7645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 7656 | 7656 |
| 7657 | 7657 |
| 7658 void Parser::EnsureExpressionTemp() { | 7658 void Parser::EnsureExpressionTemp() { |
| 7659 // Temporary used later by the flow_graph_builder. | 7659 // Temporary used later by the flow_graph_builder. |
| 7660 parsed_function()->EnsureExpressionTemp(); | 7660 parsed_function()->EnsureExpressionTemp(); |
| 7661 } | 7661 } |
| 7662 | 7662 |
| 7663 | 7663 |
| 7664 void Parser::EnsureSavedCurrentContext() { | 7664 void Parser::EnsureSavedCurrentContext() { |
| 7665 // Used later by the flow_graph_builder to save current context. | 7665 // Used later by the flow_graph_builder to save current context. |
| 7666 if (parsing_metadata_) { | |
| 7667 return; | |
|
hausner
2014/02/27 18:53:22
Can you please explain in a comment why it is nece
rmacnak
2014/02/27 19:11:27
Hm, actually this is dubious because it relies on
| |
| 7668 } | |
| 7666 if (!parsed_function()->has_saved_current_context_var()) { | 7669 if (!parsed_function()->has_saved_current_context_var()) { |
| 7667 LocalVariable* temp = | 7670 LocalVariable* temp = |
| 7668 new LocalVariable(current_function().token_pos(), | 7671 new LocalVariable(current_function().token_pos(), |
| 7669 Symbols::SavedCurrentContextVar(), | 7672 Symbols::SavedCurrentContextVar(), |
| 7670 Type::ZoneHandle(Type::DynamicType())); | 7673 Type::ZoneHandle(Type::DynamicType())); |
| 7671 ASSERT(temp != NULL); | 7674 ASSERT(temp != NULL); |
| 7672 parsed_function()->set_saved_current_context_var(temp); | 7675 parsed_function()->set_saved_current_context_var(temp); |
| 7673 } | 7676 } |
| 7674 } | 7677 } |
| 7675 | 7678 |
| (...skipping 3102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 10778 void Parser::SkipQualIdent() { | 10781 void Parser::SkipQualIdent() { |
| 10779 ASSERT(IsIdentifier()); | 10782 ASSERT(IsIdentifier()); |
| 10780 ConsumeToken(); | 10783 ConsumeToken(); |
| 10781 if (CurrentToken() == Token::kPERIOD) { | 10784 if (CurrentToken() == Token::kPERIOD) { |
| 10782 ConsumeToken(); // Consume the kPERIOD token. | 10785 ConsumeToken(); // Consume the kPERIOD token. |
| 10783 ExpectIdentifier("identifier expected after '.'"); | 10786 ExpectIdentifier("identifier expected after '.'"); |
| 10784 } | 10787 } |
| 10785 } | 10788 } |
| 10786 | 10789 |
| 10787 } // namespace dart | 10790 } // namespace dart |
| OLD | NEW |