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

Unified Diff: pkg/compiler/lib/src/common/backend_api.dart

Issue 1859343004: dartfmt pkg/compiler (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/common.dart ('k') | pkg/compiler/lib/src/common/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/common/backend_api.dart
diff --git a/pkg/compiler/lib/src/common/backend_api.dart b/pkg/compiler/lib/src/common/backend_api.dart
index d7af0cb49b4a058eea3457e55e3586777b28ff56..71a8c82a6f5bebc94f258bf354152e4a30c5fcad 100644
--- a/pkg/compiler/lib/src/common/backend_api.dart
+++ b/pkg/compiler/lib/src/common/backend_api.dart
@@ -7,77 +7,44 @@ library dart2js.backend_api;
import 'dart:async' show Future;
import '../common.dart';
-import '../common/codegen.dart' show
- CodegenImpact;
-import '../common/resolution.dart' show
- ResolutionImpact;
-import '../compiler.dart' show
- Compiler;
-import '../compile_time_constants.dart' show
- BackendConstantEnvironment,
- ConstantCompilerTask;
-import '../constants/expressions.dart' show
- ConstantExpression;
-import '../constants/constant_system.dart' show
- ConstantSystem;
-import '../constants/values.dart' show
- ConstantValue;
-import '../dart_types.dart' show
- DartType,
- InterfaceType;
-import '../elements/elements.dart' show
- ClassElement,
- ConstructorElement,
- Element,
- FunctionElement,
- LibraryElement,
- MetadataAnnotation,
- MethodElement;
-import '../enqueue.dart' show
- Enqueuer,
- CodegenEnqueuer,
- ResolutionEnqueuer;
-import '../io/code_output.dart' show
- CodeBuffer;
-import '../io/source_information.dart' show
- SourceInformationStrategy;
-import '../js_backend/backend_helpers.dart' as js_backend show
- BackendHelpers;
-import '../js_backend/js_backend.dart' as js_backend show
- JavaScriptBackend;
-import '../library_loader.dart' show
- LibraryLoader,
- LoadedLibraries;
-import '../native/native.dart' as native show
- NativeEnqueuer,
- maybeEnableNative;
-import '../patch_parser.dart' show
- checkNativeAnnotation, checkJsInteropAnnotation;
-import '../resolution/tree_elements.dart' show
- TreeElements;
-import '../serialization/serialization.dart' show
- DeserializerPlugin,
- ObjectDecoder,
- ObjectEncoder,
- SerializerPlugin;
-import '../tree/tree.dart' show
- Node,
- Send;
-import '../universe/call_structure.dart' show
- CallStructure;
-import '../universe/world_impact.dart' show
- ImpactStrategy,
- WorldImpact;
-
-import 'codegen.dart' show
- CodegenWorkItem;
-import 'registry.dart' show
- Registry;
-import 'tasks.dart' show
- CompilerTask;
-import 'work.dart' show
- ItemCompilationContext;
-
+import '../common/codegen.dart' show CodegenImpact;
+import '../common/resolution.dart' show ResolutionImpact;
+import '../compiler.dart' show Compiler;
+import '../compile_time_constants.dart'
+ show BackendConstantEnvironment, ConstantCompilerTask;
+import '../constants/expressions.dart' show ConstantExpression;
+import '../constants/constant_system.dart' show ConstantSystem;
+import '../constants/values.dart' show ConstantValue;
+import '../dart_types.dart' show DartType, InterfaceType;
+import '../elements/elements.dart'
+ show
+ ClassElement,
+ ConstructorElement,
+ Element,
+ FunctionElement,
+ LibraryElement,
+ MetadataAnnotation,
+ MethodElement;
+import '../enqueue.dart' show Enqueuer, CodegenEnqueuer, ResolutionEnqueuer;
+import '../io/code_output.dart' show CodeBuffer;
+import '../io/source_information.dart' show SourceInformationStrategy;
+import '../js_backend/backend_helpers.dart' as js_backend show BackendHelpers;
+import '../js_backend/js_backend.dart' as js_backend show JavaScriptBackend;
+import '../library_loader.dart' show LibraryLoader, LoadedLibraries;
+import '../native/native.dart' as native show NativeEnqueuer, maybeEnableNative;
+import '../patch_parser.dart'
+ show checkNativeAnnotation, checkJsInteropAnnotation;
+import '../resolution/tree_elements.dart' show TreeElements;
+import '../serialization/serialization.dart'
+ show DeserializerPlugin, ObjectDecoder, ObjectEncoder, SerializerPlugin;
+import '../tree/tree.dart' show Node, Send;
+import '../universe/call_structure.dart' show CallStructure;
+import '../universe/world_impact.dart' show ImpactStrategy, WorldImpact;
+
+import 'codegen.dart' show CodegenWorkItem;
+import 'registry.dart' show Registry;
+import 'tasks.dart' show CompilerTask;
+import 'work.dart' show ItemCompilationContext;
abstract class Backend {
final Compiler compiler;
@@ -132,6 +99,7 @@ abstract class Backend {
native.NativeEnqueuer nativeResolutionEnqueuer(world) {
return new native.NativeEnqueuer();
}
+
native.NativeEnqueuer nativeCodegenEnqueuer(world) {
return new native.NativeEnqueuer();
}
@@ -165,52 +133,44 @@ abstract class Backend {
/// Called during resolution when a constant value for [metadata] on
/// [annotatedElement] has been evaluated.
void registerMetadataConstant(MetadataAnnotation metadata,
- Element annotatedElement,
- Registry registry) {}
+ Element annotatedElement, Registry registry) {}
/// Called to notify to the backend that a class is being instantiated.
// TODO(johnniwinther): Remove this. It's only called once for each [cls] and
// only with [Compiler.globalDependencies] as [registry].
- void registerInstantiatedClass(ClassElement cls,
- Enqueuer enqueuer,
- Registry registry) {}
+ void registerInstantiatedClass(
+ ClassElement cls, Enqueuer enqueuer, Registry registry) {}
/// Called to notify to the backend that a class is implemented by an
/// instantiated class.
- void registerImplementedClass(ClassElement cls,
- Enqueuer enqueuer,
- Registry registry) {}
+ void registerImplementedClass(
+ ClassElement cls, Enqueuer enqueuer, Registry registry) {}
/// Called to instruct to the backend register [type] as instantiated on
/// [enqueuer].
- void registerInstantiatedType(InterfaceType type,
- Enqueuer enqueuer,
- Registry registry,
- {bool mirrorUsage: false}) {
+ void registerInstantiatedType(
+ InterfaceType type, Enqueuer enqueuer, Registry registry,
+ {bool mirrorUsage: false}) {
registry.registerDependency(type.element);
enqueuer.registerInstantiatedType(type, mirrorUsage: mirrorUsage);
}
/// Register a runtime type variable bound tests between [typeArgument] and
/// [bound].
- void registerTypeVariableBoundsSubtypeCheck(DartType typeArgument,
- DartType bound) {}
+ void registerTypeVariableBoundsSubtypeCheck(
+ DartType typeArgument, DartType bound) {}
/**
* Call this to register that an instantiated generic class has a call
* method.
*/
void registerCallMethodWithFreeTypeVariables(
- Element callMethod,
- Enqueuer enqueuer,
- Registry registry) {}
+ Element callMethod, Enqueuer enqueuer, Registry registry) {}
/// Called to instruct the backend to register that a closure exists for a
/// function on an instantiated generic class.
void registerClosureWithFreeTypeVariables(
- Element closure,
- Enqueuer enqueuer,
- Registry registry) {
+ Element closure, Enqueuer enqueuer, Registry registry) {
enqueuer.universe.closuresWithFreeTypeVariables.add(closure);
}
@@ -349,9 +309,8 @@ abstract class Backend {
/// Called by [MirrorUsageAnalyzerTask] after it has merged all @MirrorsUsed
/// annotations. The arguments corresponds to the unions of the corresponding
/// fields of the annotations.
- void registerMirrorUsage(Set<String> symbols,
- Set<Element> targets,
- Set<Element> metaTargets) {}
+ void registerMirrorUsage(
+ Set<String> symbols, Set<Element> targets, Set<Element> metaTargets) {}
/// Returns true if this element needs reflection information at runtime.
bool isAccessibleByReflection(Element element) => true;
@@ -419,15 +378,12 @@ abstract class Backend {
void registerMainHasArguments(Enqueuer enqueuer) {}
- void registerAsyncMarker(FunctionElement element,
- Enqueuer enqueuer,
- Registry registry) {}
+ void registerAsyncMarker(
+ FunctionElement element, Enqueuer enqueuer, Registry registry) {}
/// Called when resolving a call to a foreign function.
- void registerForeignCall(Send node,
- Element element,
- CallStructure callStructure,
- ForeignResolver resolver) {}
+ void registerForeignCall(Send node, Element element,
+ CallStructure callStructure, ForeignResolver resolver) {}
/// Returns the location of the patch-file associated with [libraryName]
/// resolved from [plaformConfigUri].
@@ -438,8 +394,8 @@ abstract class Backend {
/// Creates an impact strategy to use for compilation.
ImpactStrategy createImpactStrategy(
{bool supportDeferredLoad: true,
- bool supportDumpInfo: true,
- bool supportSerialization: true}) {
+ bool supportDumpInfo: true,
+ bool supportSerialization: true}) {
return const ImpactStrategy();
}
}
@@ -473,7 +429,7 @@ class ImpactTransformer {
}
/// Interface for serialization of backend specific data.
-class BackendSerialization {
+class BackendSerialization {
const BackendSerialization();
SerializerPlugin get serializer => const SerializerPlugin();
« no previous file with comments | « pkg/compiler/lib/src/common.dart ('k') | pkg/compiler/lib/src/common/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698