| 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 "vm/bigint_operations.h" | 7 #include "vm/bigint_operations.h" |
| 8 #include "vm/class_finalizer.h" | 8 #include "vm/class_finalizer.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/compiler_stats.h" | 10 #include "vm/compiler_stats.h" |
| (...skipping 6726 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6737 return *expr; | 6737 return *expr; |
| 6738 } | 6738 } |
| 6739 | 6739 |
| 6740 | 6740 |
| 6741 // Ensure that the expression temp is allocated for nodes that may need it. | 6741 // Ensure that the expression temp is allocated for nodes that may need it. |
| 6742 AstNode* Parser::CreateAssignmentNode(AstNode* original, AstNode* rhs) { | 6742 AstNode* Parser::CreateAssignmentNode(AstNode* original, AstNode* rhs) { |
| 6743 AstNode* result = original->MakeAssignmentNode(rhs); | 6743 AstNode* result = original->MakeAssignmentNode(rhs); |
| 6744 if ((result != NULL) && | 6744 if ((result != NULL) && |
| 6745 (result->IsStoreIndexedNode() || | 6745 (result->IsStoreIndexedNode() || |
| 6746 result->IsInstanceSetterNode() || | 6746 result->IsInstanceSetterNode() || |
| 6747 result->IsStaticSetterNode())) { | 6747 result->IsStaticSetterNode() || |
| 6748 result->IsStoreStaticFieldNode() || |
| 6749 result->IsStoreLocalNode())) { |
| 6748 EnsureExpressionTemp(); | 6750 EnsureExpressionTemp(); |
| 6749 } | 6751 } |
| 6750 return result; | 6752 return result; |
| 6751 } | 6753 } |
| 6752 | 6754 |
| 6753 | 6755 |
| 6754 AstNode* Parser::ParseCascades(AstNode* expr) { | 6756 AstNode* Parser::ParseCascades(AstNode* expr) { |
| 6755 intptr_t cascade_pos = TokenPos(); | 6757 intptr_t cascade_pos = TokenPos(); |
| 6756 LocalVariable* cascade_receiver_var = | 6758 LocalVariable* cascade_receiver_var = |
| 6757 CreateTempConstVariable(cascade_pos, "casc"); | 6759 CreateTempConstVariable(cascade_pos, "casc"); |
| (...skipping 2679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9437 void Parser::SkipQualIdent() { | 9439 void Parser::SkipQualIdent() { |
| 9438 ASSERT(IsIdentifier()); | 9440 ASSERT(IsIdentifier()); |
| 9439 ConsumeToken(); | 9441 ConsumeToken(); |
| 9440 if (CurrentToken() == Token::kPERIOD) { | 9442 if (CurrentToken() == Token::kPERIOD) { |
| 9441 ConsumeToken(); // Consume the kPERIOD token. | 9443 ConsumeToken(); // Consume the kPERIOD token. |
| 9442 ExpectIdentifier("identifier expected after '.'"); | 9444 ExpectIdentifier("identifier expected after '.'"); |
| 9443 } | 9445 } |
| 9444 } | 9446 } |
| 9445 | 9447 |
| 9446 } // namespace dart | 9448 } // namespace dart |
| OLD | NEW |