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

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

Issue 35693010: Fix VM issue 1372: super constructor invocation with redirection. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 6
7 #include "lib/invocation_mirror.h" 7 #include "lib/invocation_mirror.h"
8 #include "vm/bigint_operations.h" 8 #include "vm/bigint_operations.h"
9 #include "vm/bootstrap.h" 9 #include "vm/bootstrap.h"
10 #include "vm/class_finalizer.h" 10 #include "vm/class_finalizer.h"
(...skipping 2488 matching lines...) Expand 10 before | Expand all | Expand 10 after
2499 } 2499 }
2500 } 2500 }
2501 2501
2502 if (is_redirecting_constructor) { 2502 if (is_redirecting_constructor) {
2503 ParseConstructorRedirection(cls, receiver); 2503 ParseConstructorRedirection(cls, receiver);
2504 } else { 2504 } else {
2505 ParseInitializers(cls, receiver, &initialized_fields); 2505 ParseInitializers(cls, receiver, &initialized_fields);
2506 } 2506 }
2507 2507
2508 SequenceNode* init_statements = CloseBlock(); 2508 SequenceNode* init_statements = CloseBlock();
2509 if (init_statements->length() > 0) { 2509 if (is_redirecting_constructor) {
2510 current_block_->statements->Add(init_statements);
hausner 2013/10/23 15:50:31 Would be nice to add the description of your chang
Florian Schneider 2013/10/23 16:03:48 Done.
2511 } else if (init_statements->length() > 0) {
2510 // Generate guard around the initializer code. 2512 // Generate guard around the initializer code.
2511 LocalVariable* phase_param = LookupPhaseParameter(); 2513 LocalVariable* phase_param = LookupPhaseParameter();
2512 AstNode* phase_value = new LoadLocalNode(TokenPos(), phase_param); 2514 AstNode* phase_value = new LoadLocalNode(TokenPos(), phase_param);
2513 AstNode* phase_check = new BinaryOpNode( 2515 AstNode* phase_check = new BinaryOpNode(
2514 TokenPos(), Token::kBIT_AND, phase_value, 2516 TokenPos(), Token::kBIT_AND, phase_value,
2515 new LiteralNode(TokenPos(), 2517 new LiteralNode(TokenPos(),
2516 Smi::ZoneHandle(Smi::New(Function::kCtorPhaseInit)))); 2518 Smi::ZoneHandle(Smi::New(Function::kCtorPhaseInit))));
2517 AstNode* comparison = 2519 AstNode* comparison =
2518 new ComparisonNode(TokenPos(), Token::kNE_STRICT, 2520 new ComparisonNode(TokenPos(), Token::kNE_STRICT,
2519 phase_check, 2521 phase_check,
(...skipping 8053 matching lines...) Expand 10 before | Expand all | Expand 10 after
10573 void Parser::SkipQualIdent() { 10575 void Parser::SkipQualIdent() {
10574 ASSERT(IsIdentifier()); 10576 ASSERT(IsIdentifier());
10575 ConsumeToken(); 10577 ConsumeToken();
10576 if (CurrentToken() == Token::kPERIOD) { 10578 if (CurrentToken() == Token::kPERIOD) {
10577 ConsumeToken(); // Consume the kPERIOD token. 10579 ConsumeToken(); // Consume the kPERIOD token.
10578 ExpectIdentifier("identifier expected after '.'"); 10580 ExpectIdentifier("identifier expected after '.'");
10579 } 10581 }
10580 } 10582 }
10581 10583
10582 } // namespace dart 10584 } // namespace dart
OLDNEW
« no previous file with comments | « no previous file | tests/co19/co19-runtime.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698