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

Side by Side Diff: pkg/compiler/lib/src/world.dart

Issue 1967073002: Check closure data for serialization (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. Created 4 years, 7 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
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 library dart2js.world; 5 library dart2js.world;
6 6
7 import 'closure.dart' show SynthesizedCallMethodElementX; 7 import 'closure.dart' show SynthesizedCallMethodElementX;
8 import 'common.dart'; 8 import 'common.dart';
9 import 'common/backend_api.dart' show Backend; 9 import 'common/backend_api.dart' show Backend;
10 import 'compiler.dart' show Compiler; 10 import 'compiler.dart' show Compiler;
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 getClassHierarchyNode(coreClasses.objectClass) 689 getClassHierarchyNode(coreClasses.objectClass)
690 .printOn(sb, ' ', instantiatedOnly: cls == null, withRespectTo: cls); 690 .printOn(sb, ' ', instantiatedOnly: cls == null, withRespectTo: cls);
691 return sb.toString(); 691 return sb.toString();
692 } 692 }
693 693
694 void registerMixinUse( 694 void registerMixinUse(
695 MixinApplicationElement mixinApplication, ClassElement mixin) { 695 MixinApplicationElement mixinApplication, ClassElement mixin) {
696 // TODO(johnniwinther): Add map restricted to live classes. 696 // TODO(johnniwinther): Add map restricted to live classes.
697 // We don't support patch classes as mixin. 697 // We don't support patch classes as mixin.
698 assert(mixin.isDeclaration); 698 assert(mixin.isDeclaration);
699 Set<MixinApplicationElement> users = _mixinUses.putIfAbsent( 699 Set<MixinApplicationElement> users =
700 mixin, () => new Set<MixinApplicationElement>()); 700 _mixinUses.putIfAbsent(mixin, () => new Set<MixinApplicationElement>());
701 users.add(mixinApplication); 701 users.add(mixinApplication);
702 } 702 }
703 703
704 bool hasAnyUserDefinedGetter(Selector selector, ti.TypeMask mask) { 704 bool hasAnyUserDefinedGetter(Selector selector, ti.TypeMask mask) {
705 return allFunctions.filter(selector, mask).any((each) => each.isGetter); 705 return allFunctions.filter(selector, mask).any((each) => each.isGetter);
706 } 706 }
707 707
708 void registerUsedElement(Element element) { 708 void registerUsedElement(Element element) {
709 if (element.isInstanceMember && !element.isAbstract) { 709 if (element.isInstanceMember && !element.isAbstract) {
710 allFunctions.add(element); 710 allFunctions.add(element);
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
826 // function expressions's element. 826 // function expressions's element.
827 // TODO(herhut): Generate classes for function expressions earlier. 827 // TODO(herhut): Generate classes for function expressions earlier.
828 if (element is SynthesizedCallMethodElementX) { 828 if (element is SynthesizedCallMethodElementX) {
829 return getMightBePassedToApply(element.expression); 829 return getMightBePassedToApply(element.expression);
830 } 830 }
831 return functionsThatMightBePassedToApply.contains(element); 831 return functionsThatMightBePassedToApply.contains(element);
832 } 832 }
833 833
834 bool get hasClosedWorldAssumption => !compiler.options.hasIncrementalSupport; 834 bool get hasClosedWorldAssumption => !compiler.options.hasIncrementalSupport;
835 } 835 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | tests/compiler/dart2js/serialization/compilation_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698