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 "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 6452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6463 return left_node; | 6463 return left_node; |
| 6464 } | 6464 } |
| 6465 return *expr; | 6465 return *expr; |
| 6466 } | 6466 } |
| 6467 | 6467 |
| 6468 | 6468 |
| 6469 // Ensure that the expression temp is allocated for nodes that may need it. | 6469 // Ensure that the expression temp is allocated for nodes that may need it. |
| 6470 AstNode* Parser::CreateAssignmentNode(AstNode* original, AstNode* rhs) { | 6470 AstNode* Parser::CreateAssignmentNode(AstNode* original, AstNode* rhs) { |
| 6471 AstNode* result = original->MakeAssignmentNode(rhs); | 6471 AstNode* result = original->MakeAssignmentNode(rhs); |
| 6472 if ((result != NULL) && | 6472 if ((result != NULL) && |
| 6473 (result->IsStoreIndexedNode() || result->IsInstanceSetterNode())) { | 6473 (result->IsStoreIndexedNode() || |
| 6474 result->IsInstanceSetterNode() || | |
| 6475 result->IsStaticSetterNode())) { | |
|
hausner
2012/08/03 22:32:52
FWIW, I don't think that for static setters you ne
Florian Schneider
2012/08/06 09:06:25
We still need to preserve the value if the setter
| |
| 6474 EnsureExpressionTemp(); | 6476 EnsureExpressionTemp(); |
| 6475 } | 6477 } |
| 6476 return result; | 6478 return result; |
| 6477 } | 6479 } |
| 6478 | 6480 |
| 6479 | 6481 |
| 6480 AstNode* Parser::ParseCascades(AstNode* expr) { | 6482 AstNode* Parser::ParseCascades(AstNode* expr) { |
| 6481 intptr_t cascade_pos = TokenPos(); | 6483 intptr_t cascade_pos = TokenPos(); |
| 6482 LocalVariable* cascade_receiver_var = | 6484 LocalVariable* cascade_receiver_var = |
| 6483 CreateTempConstVariable(cascade_pos, expr->id(), "casc"); | 6485 CreateTempConstVariable(cascade_pos, expr->id(), "casc"); |
| (...skipping 2476 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 8960 void Parser::SkipQualIdent() { | 8962 void Parser::SkipQualIdent() { |
| 8961 ASSERT(IsIdentifier()); | 8963 ASSERT(IsIdentifier()); |
| 8962 ConsumeToken(); | 8964 ConsumeToken(); |
| 8963 if (CurrentToken() == Token::kPERIOD) { | 8965 if (CurrentToken() == Token::kPERIOD) { |
| 8964 ConsumeToken(); // Consume the kPERIOD token. | 8966 ConsumeToken(); // Consume the kPERIOD token. |
| 8965 ExpectIdentifier("identifier expected after '.'"); | 8967 ExpectIdentifier("identifier expected after '.'"); |
| 8966 } | 8968 } |
| 8967 } | 8969 } |
| 8968 | 8970 |
| 8969 } // namespace dart | 8971 } // namespace dart |
| OLD | NEW |