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

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

Issue 2884233002: Use entities in runtime_types (Closed)
Patch Set: Updated cf. comments Created 3 years, 7 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/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index bc6d023ba0b1d20465328ec5c154582c0b5b8fdb..fd7f6ae002c9c4c816df941bfe0e43b937229307 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -27,7 +27,7 @@ import '../elements/types.dart';
import '../io/source_information.dart';
import '../js/js.dart' as js;
import '../js_backend/backend.dart' show JavaScriptBackend;
-import '../js_backend/js_backend.dart';
+import '../js_backend/runtime_types.dart';
import '../js_emitter/js_emitter.dart' show CodeEmitterTask, NativeEmitter;
import '../native/native.dart' as native;
import '../resolution/semantic_visitor.dart';
@@ -1378,11 +1378,10 @@ class SsaBuilder extends ast.Visitor
// Add the type parameters of the class as parameters of this method. This
// must be done before adding the normal parameters, because their types
// may contain references to type variables.
- var enclosing = element.enclosingElement;
+ ClassElement cls = element.enclosingClass;
if ((element.isConstructor || element.isGenerativeConstructorBody) &&
- rtiNeed.classNeedsRti(enclosing.declaration)) {
- enclosing.typeVariables
- .forEach((ResolutionTypeVariableType typeVariable) {
+ rtiNeed.classNeedsRti(cls)) {
+ cls.typeVariables.forEach((ResolutionTypeVariableType typeVariable) {
HParameterValue param =
addParameter(typeVariable.element, commonMasks.nonNullType);
localsHandler.directLocals[
« no previous file with comments | « pkg/compiler/lib/src/resolution/resolution_strategy.dart ('k') | pkg/compiler/lib/src/ssa/builder_kernel.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698