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 import 'dart:_interceptors'; | 6 import 'dart:_interceptors'; |
7 import 'dart:_js_helper' show checkNull, | 7 import 'dart:_js_helper' show checkNull, |
8 getRuntimeTypeString, | 8 getRuntimeTypeString, |
9 isJsArray, | 9 isJsArray, |
10 JSSyntaxRegExp, | 10 JSSyntaxRegExp, |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
282 String formalParameters = sb.toString(); | 282 String formalParameters = sb.toString(); |
283 return "NoSuchMethodError: incorrect number of arguments passed to " | 283 return "NoSuchMethodError: incorrect number of arguments passed to " |
284 "method named '$_memberName'\n" | 284 "method named '$_memberName'\n" |
285 "Receiver: ${Error.safeToString(_receiver)}\n" | 285 "Receiver: ${Error.safeToString(_receiver)}\n" |
286 "Tried calling: $_memberName($actualParameters)\n" | 286 "Tried calling: $_memberName($actualParameters)\n" |
287 "Found: $_memberName($formalParameters)"; | 287 "Found: $_memberName($formalParameters)"; |
288 } | 288 } |
289 } | 289 } |
290 } | 290 } |
291 | 291 |
292 patch class StackTrace { | |
293 patch String get fullStackTrace { | |
294 throw new UnsupportedError('fullStackTrace'); | |
295 } | |
296 | |
297 patch String get stackTrace { | |
298 throw new UnsupportedError('stackTrace'); | |
299 } | |
300 } | |
301 | |
302 patch class Symbol { | 292 patch class Symbol { |
303 final String _name; | 293 final String _name; |
304 | 294 |
305 patch const Symbol(String name) : | 295 patch const Symbol(String name) : |
306 this._name = name; | 296 this._name = name; |
307 | 297 |
308 patch bool operator ==(other) { | 298 patch bool operator ==(other) { |
309 return other is Symbol && _name == other._name; | 299 return other is Symbol && _name == other._name; |
310 } | 300 } |
311 | 301 |
312 patch int get hashCode { | 302 patch int get hashCode { |
313 const arbitraryPrime = 664597; | 303 const arbitraryPrime = 664597; |
314 return 0x1fffffff & (arbitraryPrime * _name.hashCode); | 304 return 0x1fffffff & (arbitraryPrime * _name.hashCode); |
315 } | 305 } |
316 } | 306 } |
OLD | NEW |