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

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

Issue 14986002: Make static tear-off closures a class, like instance tear-off closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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: sdk/lib/_internal/compiler/implementation/ssa/optimize.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (revision 22664)
+++ sdk/lib/_internal/compiler/implementation/ssa/optimize.dart (working copy)
@@ -627,15 +627,15 @@
// Try to recognize the length getter with input
// [:new List(int):].
HInvokeStatic call = node.receiver;
- Element element = call.target.element;
+ Element element = call.element;
// TODO(ngeoffray): checking if the second input is an integer
// should not be necessary but it currently makes it easier for
// other optimizations to reason about a fixed length constructor
// that we know takes an int.
if (element == compiler.unnamedListConstructor
- && call.inputs.length == 2
- && call.inputs[1].isInteger()) {
- return call.inputs[1];
+ && call.inputs.length == 1
+ && call.inputs[0].isInteger()) {
+ return call.inputs[0];
}
} else if (node.receiver.isConstantList() ||
node.receiver.isConstantString()) {

Powered by Google App Engine
This is Rietveld 408576698