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

Unified Diff: pkg/compiler/lib/src/js_backend/js_interop_analysis.dart

Issue 1413213004: Move remaining helpers to BackendHelpers (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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
Index: pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
diff --git a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
index e5c9b2543ea77f17e49255888113f95b769cd977..15916f90251c72b06ad98013aa606395eb009d3c 100644
--- a/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
+++ b/pkg/compiler/lib/src/js_backend/js_interop_analysis.dart
@@ -30,6 +30,7 @@ import '../js/js.dart' show js;
import '../universe/selector.dart' show Selector;
import '../universe/universe.dart' show SelectorConstraints;
+import 'backend_helpers.dart' show BackendHelpers;
import 'js_backend.dart' show JavaScriptBackend;
class JsInteropAnalysis {
@@ -44,11 +45,13 @@ class JsInteropAnalysis {
JsInteropAnalysis(this.backend);
+ BackendHelpers get helpers => backend.helpers;
+
void onQueueClosed() {
if (_inCodegen) return;
- if (backend.jsAnnotationClass != null) {
- nameField = backend.jsAnnotationClass.lookupMember('name');
+ if (helpers.jsAnnotationClass != null) {
+ nameField = helpers.jsAnnotationClass.lookupMember('name');
backend.compiler.libraryLoader.libraries
.forEach(processJsInteropAnnotationsInLibrary);
}
@@ -64,7 +67,7 @@ class JsInteropAnalysis {
annotation.constant);
if (constant == null || constant is! ConstructedConstantValue) continue;
ConstructedConstantValue constructedConstant = constant;
- if (constructedConstant.type.element == backend.jsAnnotationClass) {
+ if (constructedConstant.type.element == helpers.jsAnnotationClass) {
ConstantValue value = constructedConstant.fields[nameField];
if (value.isString) {
StringConstantValue stringValue = value;
@@ -89,7 +92,7 @@ class JsInteropAnalysis {
ClassElement classElement = element;
if (!classElement
- .implementsInterface(backend.jsJavaScriptObjectClass)) {
+ .implementsInterface(helpers.jsJavaScriptObjectClass)) {
backend.reporter.reportErrorMessage(classElement,
MessageKind.JS_INTEROP_CLASS_CANNOT_EXTEND_DART_CLASS, {
'cls': classElement.name,

Powered by Google App Engine
This is Rietveld 408576698