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/native/behavior.dart

Issue 2814453005: Merge CommonElements and BackendHelpers! (Closed)
Patch Set: comments and re-merge, take two 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/kernel/world_builder.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/behavior.dart
diff --git a/pkg/compiler/lib/src/native/behavior.dart b/pkg/compiler/lib/src/native/behavior.dart
index 106fbeafeb29d83e1fe390fe5133f0b6eaa50288..936c8c7dd10f6d7f5b0a9f22b0fbd858682a89d4 100644
--- a/pkg/compiler/lib/src/native/behavior.dart
+++ b/pkg/compiler/lib/src/native/behavior.dart
@@ -15,8 +15,6 @@ import '../elements/entities.dart';
import '../elements/resolution_types.dart';
import '../elements/types.dart';
import '../js/js.dart' as js;
-import '../js_backend/js_backend.dart';
-import '../js_backend/backend_helpers.dart';
import '../tree/tree.dart';
import '../universe/side_effects.dart' show SideEffects;
import '../util/util.dart';
@@ -849,7 +847,6 @@ class NativeBehavior {
abstract class BehaviorBuilder {
CommonElements get commonElements;
BackendClasses get backendClasses;
- BackendHelpers get helpers;
DiagnosticReporter get reporter;
ConstantEnvironment get constants;
bool get trustJSInteropTypeAnnotations;
@@ -863,9 +860,9 @@ abstract class BehaviorBuilder {
if (metadata.isEmpty) return;
List creates =
- _collect(metadata, helpers.annotationCreatesClass, lookupType);
+ _collect(metadata, commonElements.annotationCreatesClass, lookupType);
List returns =
- _collect(metadata, helpers.annotationReturnsClass, lookupType);
+ _collect(metadata, commonElements.annotationReturnsClass, lookupType);
if (creates != null) {
_behavior.typesInstantiated
@@ -965,7 +962,7 @@ abstract class BehaviorBuilder {
// annotations. This means that to some degree we still use the return
// type to decide whether to include native types, even if we don't
// trust the type annotation.
- ClassElement cls = helpers.jsJavaScriptObjectClass;
+ ClassElement cls = commonElements.jsJavaScriptObjectClass;
cls.ensureResolved(resolution);
_behavior.typesInstantiated.add(cls.thisType);
} else {
@@ -1055,12 +1052,6 @@ class ResolverBehaviorBuilder extends BehaviorBuilder {
DiagnosticReporter get reporter => compiler.reporter;
@override
- BackendHelpers get helpers {
- JavaScriptBackend backend = compiler.backend;
- return backend.helpers;
- }
-
- @override
BackendClasses get backendClasses => compiler.backend.backendClasses;
@override
« no previous file with comments | « pkg/compiler/lib/src/kernel/world_builder.dart ('k') | pkg/compiler/lib/src/native/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698