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

Side by Side Diff: pkg/compiler/lib/src/common/backend_api.dart

Issue 2000663002: Handle resolvedAst for forwarding constructors and callType on unnamed mixin applications. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix test. 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
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/common/resolution.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) 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.backend_api; 5 library dart2js.backend_api;
6 6
7 import 'dart:async' show Future; 7 import 'dart:async' show Future;
8 8
9 import '../common.dart'; 9 import '../common.dart';
10 import '../common/codegen.dart' show CodegenImpact; 10 import '../common/codegen.dart' show CodegenImpact;
11 import '../common/resolution.dart' show ResolutionImpact, Frontend; 11 import '../common/resolution.dart' show ResolutionImpact, Frontend, Target;
12 import '../compile_time_constants.dart' 12 import '../compile_time_constants.dart'
13 show BackendConstantEnvironment, ConstantCompilerTask; 13 show BackendConstantEnvironment, ConstantCompilerTask;
14 import '../compiler.dart' show Compiler; 14 import '../compiler.dart' show Compiler;
15 import '../constants/constant_system.dart' show ConstantSystem; 15 import '../constants/constant_system.dart' show ConstantSystem;
16 import '../constants/expressions.dart' show ConstantExpression; 16 import '../constants/expressions.dart' show ConstantExpression;
17 import '../constants/values.dart' show ConstantValue; 17 import '../constants/values.dart' show ConstantValue;
18 import '../dart_types.dart' show DartType, InterfaceType; 18 import '../dart_types.dart' show DartType, InterfaceType;
19 import '../elements/elements.dart' 19 import '../elements/elements.dart'
20 show 20 show
21 ClassElement, 21 ClassElement,
(...skipping 15 matching lines...) Expand all
37 import '../serialization/serialization.dart' 37 import '../serialization/serialization.dart'
38 show DeserializerPlugin, SerializerPlugin; 38 show DeserializerPlugin, SerializerPlugin;
39 import '../tree/tree.dart' show Node, Send; 39 import '../tree/tree.dart' show Node, Send;
40 import '../universe/call_structure.dart' show CallStructure; 40 import '../universe/call_structure.dart' show CallStructure;
41 import '../universe/world_impact.dart' show ImpactStrategy, WorldImpact; 41 import '../universe/world_impact.dart' show ImpactStrategy, WorldImpact;
42 import 'codegen.dart' show CodegenWorkItem; 42 import 'codegen.dart' show CodegenWorkItem;
43 import 'registry.dart' show Registry; 43 import 'registry.dart' show Registry;
44 import 'tasks.dart' show CompilerTask; 44 import 'tasks.dart' show CompilerTask;
45 import 'work.dart' show ItemCompilationContext; 45 import 'work.dart' show ItemCompilationContext;
46 46
47 abstract class Backend { 47 abstract class Backend implements Target {
48 final Compiler compiler; 48 final Compiler compiler;
49 49
50 Backend(this.compiler); 50 Backend(this.compiler);
51 51
52 /// Returns true if the backend supports reflection. 52 /// Returns true if the backend supports reflection.
53 bool get supportsReflection; 53 bool get supportsReflection;
54 54
55 /// Returns true if the backend supports reflection. 55 /// Returns true if the backend supports reflection.
56 bool get supportsAsyncAwait; 56 bool get supportsAsyncAwait;
57 57
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 /// Returns `true` if the `native` pseudo keyword is supported for [library]. 249 /// Returns `true` if the `native` pseudo keyword is supported for [library].
250 bool canLibraryUseNative(LibraryElement library) { 250 bool canLibraryUseNative(LibraryElement library) {
251 // TODO(johnniwinther): Move this to [JavaScriptBackend]. 251 // TODO(johnniwinther): Move this to [JavaScriptBackend].
252 return native.maybeEnableNative(compiler, library); 252 return native.maybeEnableNative(compiler, library);
253 } 253 }
254 254
255 /// Processes [element] for resolution and returns the [MethodElement] that 255 /// Processes [element] for resolution and returns the [MethodElement] that
256 /// defines the implementation of [element]. 256 /// defines the implementation of [element].
257 MethodElement resolveExternalFunction(MethodElement element) => element; 257 MethodElement resolveExternalFunction(MethodElement element) => element;
258 258
259 /// Returns `true` if [library] is a backend specific library whose members 259 @override
260 /// have special treatment, such as being allowed to extends blacklisted 260 bool isTargetSpecificLibrary(LibraryElement library) {
261 /// classes or member being eagerly resolved.
262 bool isBackendLibrary(LibraryElement library) {
263 // TODO(johnniwinther): Remove this when patching is only done by the 261 // TODO(johnniwinther): Remove this when patching is only done by the
264 // JavaScript backend. 262 // JavaScript backend.
265 Uri canonicalUri = library.canonicalUri; 263 Uri canonicalUri = library.canonicalUri;
266 if (canonicalUri == js_backend.BackendHelpers.DART_JS_HELPER || 264 if (canonicalUri == js_backend.BackendHelpers.DART_JS_HELPER ||
267 canonicalUri == js_backend.BackendHelpers.DART_INTERCEPTORS) { 265 canonicalUri == js_backend.BackendHelpers.DART_INTERCEPTORS) {
268 return true; 266 return true;
269 } 267 }
270 return false; 268 return false;
271 } 269 }
272 270
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 } 432 }
435 } 433 }
436 434
437 /// Interface for serialization of backend specific data. 435 /// Interface for serialization of backend specific data.
438 class BackendSerialization { 436 class BackendSerialization {
439 const BackendSerialization(); 437 const BackendSerialization();
440 438
441 SerializerPlugin get serializer => const SerializerPlugin(); 439 SerializerPlugin get serializer => const SerializerPlugin();
442 DeserializerPlugin get deserializer => const DeserializerPlugin(); 440 DeserializerPlugin get deserializer => const DeserializerPlugin();
443 } 441 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/closure.dart ('k') | pkg/compiler/lib/src/common/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698