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

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

Issue 1498933002: Delete patch classes once they are applied (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Now it works Created 5 years 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
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | 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 #include "vm/flags.h" 6 #include "vm/flags.h"
7 7
8 #ifndef DART_PRECOMPILED 8 #ifndef DART_PRECOMPILED
9 9
10 #include "lib/invocation_mirror.h" 10 #include "lib/invocation_mirror.h"
(...skipping 4626 matching lines...) Expand 10 before | Expand all | Expand 10 after
4637 } 4637 }
4638 } 4638 }
4639 ASSERT(!super_type.IsNull() || cls.IsObjectClass()); 4639 ASSERT(!super_type.IsNull() || cls.IsObjectClass());
4640 cls.set_super_type(super_type); 4640 cls.set_super_type(super_type);
4641 4641
4642 if (CurrentToken() == Token::kIMPLEMENTS) { 4642 if (CurrentToken() == Token::kIMPLEMENTS) {
4643 ParseInterfaceList(cls); 4643 ParseInterfaceList(cls);
4644 } 4644 }
4645 4645
4646 if (is_patch) { 4646 if (is_patch) {
4647 cls.set_is_patch();
4647 // Apply the changes to the patched class looked up above. 4648 // Apply the changes to the patched class looked up above.
4648 ASSERT(obj.raw() == library_.LookupLocalObject(class_name)); 4649 ASSERT(obj.raw() == library_.LookupLocalObject(class_name));
4649 // The patched class must not be finalized yet. 4650 // The patched class must not be finalized yet.
4650 const Class& orig_class = Class::Cast(obj); 4651 ASSERT(!Class::Cast(obj).is_finalized());
4651 ASSERT(!orig_class.is_finalized()); 4652 library_.AddPatchClass(cls);
4652 orig_class.SetPatchClass(cls);
4653 cls.set_is_patch();
4654 } 4653 }
4655 pending_classes.Add(cls, Heap::kOld); 4654 pending_classes.Add(cls, Heap::kOld);
4656 4655
4657 if (is_mixin_declaration) { 4656 if (is_mixin_declaration) {
4658 ExpectSemicolon(); 4657 ExpectSemicolon();
4659 } else { 4658 } else {
4660 CheckToken(Token::kLBRACE); 4659 CheckToken(Token::kLBRACE);
4661 SkipBlock(); 4660 SkipBlock();
4662 ExpectToken(Token::kRBRACE); 4661 ExpectToken(Token::kRBRACE);
4663 } 4662 }
(...skipping 9787 matching lines...) Expand 10 before | Expand all | Expand 10 after
14451 const ArgumentListNode& function_args, 14450 const ArgumentListNode& function_args,
14452 const LocalVariable* temp_for_last_arg, 14451 const LocalVariable* temp_for_last_arg,
14453 bool is_super_invocation) { 14452 bool is_super_invocation) {
14454 UNREACHABLE(); 14453 UNREACHABLE();
14455 return NULL; 14454 return NULL;
14456 } 14455 }
14457 14456
14458 } // namespace dart 14457 } // namespace dart
14459 14458
14460 #endif // DART_PRECOMPILED 14459 #endif // DART_PRECOMPILED
OLDNEW
« runtime/vm/object.cc ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698