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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1394213002: Split RuntimesTypes into RuntimeTypes and RuntimeTypesEncoder (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comments. 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
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index bcf70e244520b49af7084ecfaf1cee6dcd485032..a461a3a3478adb61c58c4c6233039df3eca12be0 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1107,6 +1107,7 @@ class SsaBuilder extends ast.Visitor
work.element.implementation);
}
+ RuntimeTypesEncoder get rtiEncoder => backend.rtiEncoder;
DiagnosticReporter get reporter => compiler.reporter;
@@ -3769,7 +3770,8 @@ class SsaBuilder extends ast.Visitor
// inputs that are later used to instantiate it. We do this by starting
// the indexing with the number of inputs from previous sub-templates.
templates.add(
- rti.getTypeRepresentationWithPlaceholders(argument, (variable) {
+ rtiEncoder.getTypeRepresentationWithPlaceholders(
+ argument, (variable) {
HInstruction runtimeType = addTypeVariableReference(variable);
inputs.add(runtimeType);
}, firstPlaceholderIndex: inputs.length));
@@ -4799,9 +4801,7 @@ class SsaBuilder extends ast.Visitor
assert(sourceElement.isInstanceMember);
HInstruction target = localsHandler.readThis();
- HConstant index = graph.addConstantInt(
- RuntimeTypes.getTypeVariableIndex(variable),
- compiler);
+ HConstant index = graph.addConstantInt(variable.index, compiler);
if (needsSubstitutionForTypeVariableAccess(cls)) {
// TODO(ahe): Creating a string here is unfortunate. It is slow (due to
@@ -4916,7 +4916,7 @@ class SsaBuilder extends ast.Visitor
List<HInstruction> inputs = <HInstruction>[];
js.Expression template =
- rti.getTypeRepresentationWithPlaceholders(argument, (variable) {
+ rtiEncoder.getTypeRepresentationWithPlaceholders(argument, (variable) {
inputs.add(addTypeVariableReference(variable));
});
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart ('k') | pkg/compiler/lib/src/ssa/codegen.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698