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

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

Issue 1584543002: dart2js cps: Support inlining constructors with type arguments. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update status files and unit tests Created 4 years, 11 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/codegen/codegen.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
index bc8ed93511e60d6b00bfbe1c2f38bc95a481ac47..9cb39ed36c73f1589a4bc5b2938e8b83085f7999 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/codegen.dart
@@ -814,12 +814,8 @@ class CodeGenerator extends tree_ir.StatementVisitor
@override
js.Expression visitCreateInstance(tree_ir.CreateInstance node) {
- ClassElement classElement = node.classElement;
- // TODO(asgerf): To allow inlining of InvokeConstructor, CreateInstance must
- // carry a DartType so we can register the instantiated type
- // with its type arguments. Otherwise dataflow analysis is
- // needed to reconstruct the instantiated type.
- registry.registerInstantiation(classElement.rawType);
+ ClassElement classElement = node.dartType.element;
+ registry.registerInstantiation(node.dartType);
if (classElement is ClosureClassElement) {
registry.registerInstantiatedClosure(classElement.methodElement);
}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/scalar_replacement.dart ('k') | pkg/compiler/lib/src/tree_ir/optimization/statement_rewriter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698