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

Side by Side Diff: lib/src/codegen/js_field_storage.dart

Issue 1788973002: Remove code that requires whole-program compile (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merged Created 4 years, 9 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 | « lib/src/codegen/js_codegen.dart ('k') | lib/src/codegen/js_printer.dart » ('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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 import 'dart:collection' show HashMap, HashSet; 5 import 'dart:collection' show HashMap, HashSet;
6 import 'package:analyzer/dart/ast/ast.dart' show Identifier; 6 import 'package:analyzer/dart/ast/ast.dart' show Identifier;
7 import 'package:analyzer/dart/element/element.dart'; 7 import 'package:analyzer/dart/element/element.dart';
8 8
9 import 'js_codegen.dart' show ExtensionTypeSet; 9 import 'js_codegen.dart' show ExtensionTypeSet;
10 import '../info.dart' show LibraryUnit;
11 10
12 /// We use a storage slot for fields that override or can be overridden by 11 /// We use a storage slot for fields that override or can be overridden by
13 /// getter/setter pairs. 12 /// getter/setter pairs.
14 HashSet<FieldElement> findFieldsNeedingStorage( 13 HashSet<FieldElement> findFieldsNeedingStorage(
15 LibraryUnit library, ExtensionTypeSet extensionTypes) { 14 Iterable<CompilationUnitElement> units, ExtensionTypeSet extensionTypes) {
16 var overrides = new HashSet<FieldElement>(); 15 var overrides = new HashSet<FieldElement>();
17 for (var unit in library.partsThenLibrary) { 16 for (var unit in units) {
18 for (var cls in unit.element.types) { 17 for (var cls in unit.types) {
19 var superclasses = getSuperclasses(cls); 18 var superclasses = getSuperclasses(cls);
20 for (var field in cls.fields) { 19 for (var field in cls.fields) {
21 if (!field.isSynthetic && !overrides.contains(field)) { 20 if (!field.isSynthetic && !overrides.contains(field)) {
22 checkForPropertyOverride( 21 checkForPropertyOverride(
23 field, superclasses, overrides, extensionTypes); 22 field, superclasses, overrides, extensionTypes);
24 } 23 }
25 } 24 }
26 } 25 }
27 } 26 }
28 27
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 if (mixin != null) result.add(mixin); 82 if (mixin != null) result.add(mixin);
84 } 83 }
85 var supertype = cls.supertype; 84 var supertype = cls.supertype;
86 if (supertype == null) break; 85 if (supertype == null) break;
87 86
88 cls = supertype.element; 87 cls = supertype.element;
89 result.add(cls); 88 result.add(cls);
90 } 89 }
91 return result; 90 return result;
92 } 91 }
OLDNEW
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | lib/src/codegen/js_printer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698