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

Unified Diff: pkg/compiler/lib/src/native/resolver.dart

Issue 2935663002: Remove Compiler.commonElements (Closed)
Patch Set: Remove Compiler._commonElements Created 3 years, 6 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/native/behavior.dart ('k') | pkg/compiler/lib/src/patch_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/resolver.dart
diff --git a/pkg/compiler/lib/src/native/resolver.dart b/pkg/compiler/lib/src/native/resolver.dart
index ede4fe1ea73c8a0ab026476e861e475af58a6e0d..b8ef149875daf9ee3d30e822ad793867e2f465fe 100644
--- a/pkg/compiler/lib/src/native/resolver.dart
+++ b/pkg/compiler/lib/src/native/resolver.dart
@@ -218,7 +218,7 @@ class NativeDataResolverImpl extends NativeMemberResolverBase
JavaScriptBackend get _backend => _compiler.backend;
DiagnosticReporter get _reporter => _compiler.reporter;
ElementEnvironment get elementEnvironment => _compiler.elementEnvironment;
- CommonElements get commonElements => _compiler.commonElements;
+ CommonElements get commonElements => _compiler.resolution.commonElements;
NativeBasicData get nativeBasicData => _backend.nativeBasicData;
NativeDataBuilder get nativeDataBuilder => _backend.nativeDataBuilder;
@@ -293,21 +293,21 @@ class NativeDataResolverImpl extends NativeMemberResolverBase
@override
NativeBehavior resolveJsCall(Send node, ForeignResolver resolver) {
- return NativeBehavior.ofJsCallSend(node, _reporter,
- _compiler.parsingContext, _compiler.commonElements, resolver);
+ return NativeBehavior.ofJsCallSend(
+ node, _reporter, _compiler.parsingContext, commonElements, resolver);
}
@override
NativeBehavior resolveJsEmbeddedGlobalCall(
Send node, ForeignResolver resolver) {
return NativeBehavior.ofJsEmbeddedGlobalCallSend(
- node, _reporter, _compiler.commonElements, resolver);
+ node, _reporter, commonElements, resolver);
}
@override
NativeBehavior resolveJsBuiltinCall(Send node, ForeignResolver resolver) {
return NativeBehavior.ofJsBuiltinCallSend(
- node, _reporter, _compiler.commonElements, resolver);
+ node, _reporter, commonElements, resolver);
}
}
@@ -347,9 +347,9 @@ class NativeAnnotationHandler extends EagerAnnotationHandler<String> {
void validate(Compiler compiler, Element element,
MetadataAnnotation annotation, ConstantValue constant) {
ResolutionDartType annotationType =
- constant.getType(compiler.commonElements);
+ constant.getType(compiler.resolution.commonElements);
if (annotationType.element !=
- compiler.commonElements.nativeAnnotationClass) {
+ compiler.resolution.commonElements.nativeAnnotationClass) {
DiagnosticReporter reporter = compiler.reporter;
reporter.internalError(annotation, 'Invalid @Native(...) annotation.');
}
@@ -383,8 +383,9 @@ class JsInteropAnnotationHandler implements EagerAnnotationHandler<bool> {
@override
void validate(Compiler compiler, Element element,
MetadataAnnotation annotation, ConstantValue constant) {
- ResolutionDartType type = constant.getType(compiler.commonElements);
- if (type.element != compiler.commonElements.jsAnnotationClass) {
+ ResolutionDartType type =
+ constant.getType(compiler.resolution.commonElements);
+ if (type.element != compiler.resolution.commonElements.jsAnnotationClass) {
compiler.reporter
.internalError(annotation, 'Invalid @JS(...) annotation.');
}
« no previous file with comments | « pkg/compiler/lib/src/native/behavior.dart ('k') | pkg/compiler/lib/src/patch_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698