OLD | NEW |
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/src/generated/ast.dart' show Identifier; | 6 import 'package:analyzer/dart/ast/ast.dart' show Identifier; |
7 import 'package:analyzer/src/generated/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; | 10 import '../info.dart' show LibraryUnit; |
11 | 11 |
12 /// We use a storage slot for fields that override or can be overridden by | 12 /// We use a storage slot for fields that override or can be overridden by |
13 /// getter/setter pairs. | 13 /// getter/setter pairs. |
14 HashSet<FieldElement> findFieldsNeedingStorage( | 14 HashSet<FieldElement> findFieldsNeedingStorage( |
15 LibraryUnit library, ExtensionTypeSet extensionTypes) { | 15 LibraryUnit library, ExtensionTypeSet extensionTypes) { |
16 var overrides = new HashSet<FieldElement>(); | 16 var overrides = new HashSet<FieldElement>(); |
17 for (var unit in library.partsThenLibrary) { | 17 for (var unit in library.partsThenLibrary) { |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 if (mixin != null) result.add(mixin); | 83 if (mixin != null) result.add(mixin); |
84 } | 84 } |
85 var supertype = cls.supertype; | 85 var supertype = cls.supertype; |
86 if (supertype == null) break; | 86 if (supertype == null) break; |
87 | 87 |
88 cls = supertype.element; | 88 cls = supertype.element; |
89 result.add(cls); | 89 result.add(cls); |
90 } | 90 } |
91 return result; | 91 return result; |
92 } | 92 } |
OLD | NEW |