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

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

Issue 2814453005: Merge CommonElements and BackendHelpers! (Closed)
Patch Set: merge with head 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
Index: pkg/compiler/lib/src/js_backend/type_variable_handler.dart
diff --git a/pkg/compiler/lib/src/js_backend/type_variable_handler.dart b/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
index 996137d06c718aeb62d93b901c3a6ae9ebfcc1e4..bd2d38404d13c93a93906a5df80012daa541dc8f 100644
--- a/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
+++ b/pkg/compiler/lib/src/js_backend/type_variable_handler.dart
@@ -15,7 +15,6 @@ import '../universe/use.dart' show ConstantUse;
import '../universe/world_impact.dart';
import 'backend.dart';
import 'backend_usage.dart' show BackendUsageBuilder;
-import 'backend_helpers.dart';
import 'backend_impact.dart';
import 'mirrors_data.dart';
@@ -58,7 +57,7 @@ class TypeVariableResolutionAnalysis {
/// Codegen handler that creates TypeVariable constants needed at runtime.
class TypeVariableCodegenAnalysis {
final JavaScriptBackend _backend;
- final BackendHelpers _helpers;
+ final CommonElements _commonElements;
final MirrorsData _mirrorsData;
/**
@@ -79,7 +78,8 @@ class TypeVariableCodegenAnalysis {
final StagedWorldImpactBuilder _impactBuilder =
new StagedWorldImpactBuilder();
- TypeVariableCodegenAnalysis(this._backend, this._helpers, this._mirrorsData);
+ TypeVariableCodegenAnalysis(
+ this._backend, this._commonElements, this._mirrorsData);
CodeEmitterTask get _task => _backend.emitter;
MetadataCollector get _metadataCollector => _task.metadataCollector;
@@ -109,10 +109,10 @@ class TypeVariableCodegenAnalysis {
_metadataCollector.reifyType(typeVariableElement.bound);
ConstantValue boundValue = new SyntheticConstantValue(
SyntheticConstantKind.TYPEVARIABLE_REFERENCE, boundIndex);
- ClassElement typeVariableClass = _helpers.typeVariableClass;
+ ClassElement typeVariableClass = _commonElements.typeVariableClass;
ConstantExpression constant = new ConstructedConstantExpression(
typeVariableClass.thisType,
- _helpers.typeVariableConstructor,
+ _commonElements.typeVariableConstructor,
const CallStructure.unnamed(3), [
new TypeConstantExpression(cls.rawType, cls.name),
new StringConstantExpression(currentTypeVariable.name),

Powered by Google App Engine
This is Rietveld 408576698