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

Unified Diff: pkg/compiler/lib/src/frontend_strategy.dart

Issue 2841583002: Add FrontEndStrategy, ResolutionFrontEndStrategy and KernelFrontEndStrategy (Closed)
Patch Set: Updated cf. comments Created 3 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/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/frontend_strategy.dart
diff --git a/pkg/compiler/lib/src/frontend_strategy.dart b/pkg/compiler/lib/src/frontend_strategy.dart
new file mode 100644
index 0000000000000000000000000000000000000000..28870a02de44193ebe67f2dad1ad26103033e5f0
--- /dev/null
+++ b/pkg/compiler/lib/src/frontend_strategy.dart
@@ -0,0 +1,48 @@
+// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+library dart2js.frontend_strategy;
+
+import 'common.dart';
+import 'common_elements.dart';
+import 'common/tasks.dart';
+import 'elements/entities.dart';
+import 'environment.dart';
+import 'js_backend/native_data.dart';
+import 'library_loader.dart';
+import 'serialization/task.dart';
+import 'patch_parser.dart';
+import 'resolved_uri_translator.dart';
+
+/// Strategy pattern that defines the connection between the input format and
+/// the resolved element model.
+abstract class FrontEndStrategy {
+ /// Creates library loader task for this strategy.
+ LibraryLoaderTask createLibraryLoader(
+ ResolvedUriTranslator uriTranslator,
+ ScriptLoader scriptLoader,
+ ElementScanner scriptScanner,
+ LibraryDeserializer deserializer,
+ PatchResolverFunction patchResolverFunc,
+ PatchParserTask patchParser,
+ Environment environment,
+ DiagnosticReporter reporter,
+ Measurer measurer);
+
+ /// Returns the [ElementEnvironment] for the element model used in this
+ /// strategy.
+ ElementEnvironment get elementEnvironment;
+
+ /// Returns the [AnnotationProcessor] for this strategy.
+ AnnotationProcessor get annotationProcesser;
+}
+
+/// Class that performs the mechanics to investigate annotations in the code.
+abstract class AnnotationProcessor {
+ void extractNativeAnnotations(
+ LibraryEntity library, NativeBasicDataBuilder nativeBasicDataBuilder);
+
+ void extractJsInteropAnnotations(
+ LibraryEntity library, NativeBasicDataBuilder nativeBasicDataBuilder);
+}
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698