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

Unified Diff: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart

Issue 11413139: Put back optimization on fixed-size array. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (revision 15242)
+++ sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (working copy)
@@ -216,12 +216,7 @@
bool isFixedSizeListConstructor(HInvokeStatic node) {
Element element = node.target.element;
- DartType defaultClass = compiler.listClass.defaultClass;
- // TODO(ngeoffray): make sure that the only reason the List class is
- // not resolved is because it's not being used.
- return element.isConstructor()
- && defaultClass != null
- && element.enclosingElement.declaration == defaultClass.element
+ return element.getEnclosingClass() == compiler.listClass
&& node.inputs.length == 2
&& node.inputs[1].isInteger(types);
}
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/backend.dart ('k') | tests/compiler/dart2js/value_range_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698