OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 // Patch file for dart:core classes. | 5 // Patch file for dart:core classes. |
6 | 6 |
7 // Patch for 'print' function. | 7 // Patch for 'print' function. |
8 patch void print(var object) { | 8 patch void print(var object) { |
9 if (object is String) { | 9 if (object is String) { |
10 Primitives.printString(object); | 10 Primitives.printString(object); |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 patch class RegExp { | 206 patch class RegExp { |
207 patch factory RegExp(String pattern, | 207 patch factory RegExp(String pattern, |
208 {bool multiLine: false, | 208 {bool multiLine: false, |
209 bool ignoreCase: false}) | 209 bool ignoreCase: false}) |
210 => new JSSyntaxRegExp(pattern, | 210 => new JSSyntaxRegExp(pattern, |
211 multiLine: multiLine, | 211 multiLine: multiLine, |
212 ignoreCase: ignoreCase); | 212 ignoreCase: ignoreCase); |
213 } | 213 } |
214 | 214 |
215 // Patch for 'identical' function. | 215 // Patch for 'identical' function. |
216 // This is very magical: the compiler knows how to optimize a call to | 216 patch bool identical(Object a, Object b) { |
217 // identical, so we can just express identical in terms of itself. | 217 throw new Error('Should not reach the body of identical'); |
218 patch bool identical(Object a, Object b) => identical(a, b); | 218 } |
OLD | NEW |