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

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

Issue 2975433002: Assert that we don't mix K and J elements (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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
index c1950bd91602aa1899ce70bb89093bcd39f56c5a..d4acb34dac8e89bfc67a7734250ce2776aa0b492 100644
--- a/pkg/compiler/lib/src/frontend_strategy.dart
+++ b/pkg/compiler/lib/src/frontend_strategy.dart
@@ -21,6 +21,7 @@ import 'js_backend/native_data.dart';
import 'js_backend/no_such_method_registry.dart';
import 'js_backend/runtime_types.dart';
import 'library_loader.dart';
+import 'native/enqueue.dart' show NativeResolutionEnqueuer;
import 'native/resolver.dart';
import 'serialization/task.dart';
import 'patch_parser.dart';
@@ -57,6 +58,8 @@ abstract class FrontendStrategy {
/// Returns the [AnnotationProcessor] for this strategy.
AnnotationProcessor get annotationProcesser;
+ NativeBasicData get nativeBasicData;
+
/// Creates the [NativeClassFinder] for this strategy.
NativeClassFinder createNativeClassFinder(NativeBasicData nativeBasicData);
@@ -71,6 +74,8 @@ abstract class FrontendStrategy {
NativeDataBuilder nativeDataBuilder,
InterceptorDataBuilder interceptorDataBuilder,
BackendUsageBuilder backendUsageBuilder,
+ RuntimeTypesNeedBuilder rtiNeedBuilder,
+ NativeResolutionEnqueuer nativeResolutionEnqueuer,
SelectorConstraintsStrategy selectorConstraintsStrategy);
/// Creates the [WorkItemBuilder] corresponding to how a resolved model for
@@ -104,12 +109,27 @@ abstract class FrontendStrategy {
/// Class that performs the mechanics to investigate annotations in the code.
abstract class AnnotationProcessor {
- void extractNativeAnnotations(
- LibraryEntity library, NativeBasicDataBuilder nativeBasicDataBuilder);
+ void extractNativeAnnotations(LibraryEntity library);
- void extractJsInteropAnnotations(
- LibraryEntity library, NativeBasicDataBuilder nativeBasicDataBuilder);
+ void extractJsInteropAnnotations(LibraryEntity library);
void processJsInteropAnnotations(
NativeBasicData nativeBasicData, NativeDataBuilder nativeDataBuilder);
}
+
+abstract class FrontendStrategyBase implements FrontendStrategy {
+ final NativeBasicDataBuilderImpl nativeBasicDataBuilder =
+ new NativeBasicDataBuilderImpl();
+ NativeBasicData _nativeBasicData;
+
+ NativeBasicData get nativeBasicData {
+ if (_nativeBasicData == null) {
+ _nativeBasicData = nativeBasicDataBuilder.close(elementEnvironment);
+ assert(
+ _nativeBasicData != null,
+ failedAt(NO_LOCATION_SPANNABLE,
+ "NativeBasicData has not been computed yet."));
+ }
+ return _nativeBasicData;
+ }
+}
« 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