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

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

Issue 1407533005: Eliminate RawClass::patch_class_ field (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('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 "platform/utils.h" 8 #include "platform/utils.h"
9 #include "vm/ast_transformer.h" 9 #include "vm/ast_transformer.h"
10 #include "vm/bootstrap.h" 10 #include "vm/bootstrap.h"
(...skipping 4617 matching lines...) Expand 10 before | Expand all | Expand 10 after
4628 if (CurrentToken() == Token::kIMPLEMENTS) { 4628 if (CurrentToken() == Token::kIMPLEMENTS) {
4629 ParseInterfaceList(cls); 4629 ParseInterfaceList(cls);
4630 } 4630 }
4631 4631
4632 if (is_patch) { 4632 if (is_patch) {
4633 // Apply the changes to the patched class looked up above. 4633 // Apply the changes to the patched class looked up above.
4634 ASSERT(obj.raw() == library_.LookupLocalObject(class_name)); 4634 ASSERT(obj.raw() == library_.LookupLocalObject(class_name));
4635 // The patched class must not be finalized yet. 4635 // The patched class must not be finalized yet.
4636 const Class& orig_class = Class::Cast(obj); 4636 const Class& orig_class = Class::Cast(obj);
4637 ASSERT(!orig_class.is_finalized()); 4637 ASSERT(!orig_class.is_finalized());
4638 orig_class.set_patch_class(cls); 4638 orig_class.SetPatchClass(cls);
4639 cls.set_is_patch(); 4639 cls.set_is_patch();
4640 } 4640 }
4641 pending_classes.Add(cls, Heap::kOld); 4641 pending_classes.Add(cls, Heap::kOld);
4642 4642
4643 if (is_mixin_declaration) { 4643 if (is_mixin_declaration) {
4644 ExpectSemicolon(); 4644 ExpectSemicolon();
4645 } else { 4645 } else {
4646 CheckToken(Token::kLBRACE); 4646 CheckToken(Token::kLBRACE);
4647 SkipBlock(); 4647 SkipBlock();
4648 ExpectToken(Token::kRBRACE); 4648 ExpectToken(Token::kRBRACE);
(...skipping 9655 matching lines...) Expand 10 before | Expand all | Expand 10 after
14304 void Parser::SkipQualIdent() { 14304 void Parser::SkipQualIdent() {
14305 ASSERT(IsIdentifier()); 14305 ASSERT(IsIdentifier());
14306 ConsumeToken(); 14306 ConsumeToken();
14307 if (CurrentToken() == Token::kPERIOD) { 14307 if (CurrentToken() == Token::kPERIOD) {
14308 ConsumeToken(); // Consume the kPERIOD token. 14308 ConsumeToken(); // Consume the kPERIOD token.
14309 ExpectIdentifier("identifier expected after '.'"); 14309 ExpectIdentifier("identifier expected after '.'");
14310 } 14310 }
14311 } 14311 }
14312 14312
14313 } // namespace dart 14313 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/raw_object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698