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

Unified Diff: pkg/compiler/lib/src/js_backend/runtime_types.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
Index: pkg/compiler/lib/src/js_backend/runtime_types.dart
diff --git a/pkg/compiler/lib/src/js_backend/runtime_types.dart b/pkg/compiler/lib/src/js_backend/runtime_types.dart
index 3101e8d617b8045e74e18b75ac7a311bf68b2a7c..923148ad7a4c1a7f1494d8ce3e49aeef6f37bf59 100644
--- a/pkg/compiler/lib/src/js_backend/runtime_types.dart
+++ b/pkg/compiler/lib/src/js_backend/runtime_types.dart
@@ -52,7 +52,6 @@ abstract class RuntimeTypesNeedBuilder {
ClosedWorld closedWorld,
DartTypes types,
CommonElements commonElements,
- BackendHelpers helpers,
BackendUsage backendUsage,
{bool enableTypeAssertions});
}
@@ -266,7 +265,6 @@ class _RuntimeTypesNeedBuilder extends _RuntimeTypesBase
ClosedWorld closedWorld,
DartTypes types,
CommonElements commonElements,
- BackendHelpers helpers,
BackendUsage backendUsage,
{bool enableTypeAssertions}) {
Set<ClassElement> classesNeedingRti = new Set<ClassElement>();
@@ -319,9 +317,9 @@ class _RuntimeTypesNeedBuilder extends _RuntimeTypesBase
// the calls of the list constructor whenever we determine that
// JSArray needs type arguments.
// TODO(karlklose): make this dependency visible from code.
- if (helpers.jsArrayClass != null) {
+ if (commonElements.jsArrayClass != null) {
ClassElement listClass = commonElements.listClass;
- registerRtiDependency(helpers.jsArrayClass, listClass);
+ registerRtiDependency(commonElements.jsArrayClass, listClass);
}
// Check local functions and closurized members.
@@ -694,10 +692,10 @@ class _RuntimeTypes extends _RuntimeTypesBase
class _RuntimeTypesEncoder implements RuntimeTypesEncoder {
final Namer namer;
final CodeEmitterTask emitter;
- final BackendHelpers helpers;
+ final CommonElements commonElements;
final TypeRepresentationGenerator representationGenerator;
- _RuntimeTypesEncoder(this.namer, this.emitter, this.helpers)
+ _RuntimeTypesEncoder(this.namer, this.emitter, this.commonElements)
: representationGenerator =
new TypeRepresentationGenerator(namer, emitter);
@@ -776,7 +774,7 @@ class _RuntimeTypesEncoder implements RuntimeTypesEncoder {
if (contextClass != null) {
jsAst.Name contextName = namer.className(contextClass);
return js('function () { return #(#, #, #); }', [
- emitter.staticFunctionAccess(helpers.computeSignature),
+ emitter.staticFunctionAccess(commonElements.computeSignature),
encoding,
this_,
js.quoteName(contextName)
« no previous file with comments | « pkg/compiler/lib/src/js_backend/resolution_listener.dart ('k') | pkg/compiler/lib/src/js_backend/type_variable_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698