Chromium Code Reviews| Index: lib/compiler/implementation/lib/interceptors.dart |
| diff --git a/lib/compiler/implementation/lib/interceptors.dart b/lib/compiler/implementation/lib/interceptors.dart |
| index ffbd1d9d76b99e85cf27a00f26399fdf6debc4cf..ea48aa8b5bbcfdb838d714a04d3aa766c768870b 100644 |
| --- a/lib/compiler/implementation/lib/interceptors.dart |
| +++ b/lib/compiler/implementation/lib/interceptors.dart |
| @@ -358,9 +358,14 @@ every(receiver, f) { |
| } |
| } |
| -sort(receiver, compare) { |
| - if (!isJsArray(receiver)) return UNINTERCEPTED(receiver.sort(compare)); |
| +sort$0(receiver) { |
| + if (!isJsArray(receiver)) return UNINTERCEPTED(receiver.sort()); |
| + checkMutable(receiver, 'sort'); |
| + DualPivotQuicksort.sort(receiver, Comparable.compare); |
| +} |
| +sort$1(receiver, compare) { |
|
ngeoffray
2012/10/15 14:17:12
Why can't you have just one function with an optio
Lasse Reichstein Nielsen
2012/10/17 07:37:28
I don't think it works with how we handle receiver
|
| + if (!isJsArray(receiver)) return UNINTERCEPTED(receiver.sort(compare)); |
| checkMutable(receiver, 'sort'); |
| DualPivotQuicksort.sort(receiver, compare); |
| } |