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

Side by Side Diff: pkg/compiler/lib/src/js_backend/no_such_method_registry.dart

Issue 2595493002: Merge CoreTypes and CoreClasses into CommonElements. (Closed)
Patch Set: Updated cf. comment Created 4 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
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 '../common.dart'; 5 import '../common.dart';
6 import '../common/names.dart' show Identifiers, Names, Selectors; 6 import '../common/names.dart' show Identifiers, Names, Selectors;
7 import '../compiler.dart' show Compiler; 7 import '../compiler.dart' show Compiler;
8 import '../elements/elements.dart'; 8 import '../elements/elements.dart';
9 import '../tree/tree.dart'; 9 import '../tree/tree.dart';
10 import 'backend.dart'; 10 import 'backend.dart';
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 throwingImpls.add(element); 180 throwingImpls.add(element);
181 return NsmCategory.THROWING; 181 return NsmCategory.THROWING;
182 } else { 182 } else {
183 otherImpls.add(element); 183 otherImpls.add(element);
184 return NsmCategory.OTHER; 184 return NsmCategory.OTHER;
185 } 185 }
186 } 186 }
187 187
188 bool isDefaultNoSuchMethodImplementation(FunctionElement element) { 188 bool isDefaultNoSuchMethodImplementation(FunctionElement element) {
189 ClassElement classElement = element.enclosingClass; 189 ClassElement classElement = element.enclosingClass;
190 return classElement == _compiler.coreClasses.objectClass || 190 return classElement == _compiler.commonElements.objectClass ||
191 classElement == _backend.helpers.jsInterceptorClass || 191 classElement == _backend.helpers.jsInterceptorClass ||
192 classElement == _backend.helpers.jsNullClass; 192 classElement == _backend.helpers.jsNullClass;
193 } 193 }
194 194
195 bool _hasForwardingSyntax(FunctionElement element) { 195 bool _hasForwardingSyntax(FunctionElement element) {
196 // At this point we know that this is signature-compatible with 196 // At this point we know that this is signature-compatible with
197 // Object.noSuchMethod, but it may have more than one argument as long as 197 // Object.noSuchMethod, but it may have more than one argument as long as
198 // it only has one required argument. 198 // it only has one required argument.
199 if (!element.hasResolvedAst) { 199 if (!element.hasResolvedAst) {
200 // TODO(johnniwinther): Why do we see unresolved elements here? 200 // TODO(johnniwinther): Why do we see unresolved elements here?
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 return false; 266 return false;
267 } 267 }
268 } 268 }
269 269
270 enum NsmCategory { 270 enum NsmCategory {
271 DEFAULT, 271 DEFAULT,
272 THROWING, 272 THROWING,
273 NOT_APPLICABLE, 273 NOT_APPLICABLE,
274 OTHER, 274 OTHER,
275 } 275 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/namer.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698