| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 // Library for creating mock versions of platform and internal libraries. | 5 // Library for creating mock versions of platform and internal libraries. |
| 6 | 6 |
| 7 library mock_libraries; | 7 library mock_libraries; |
| 8 | 8 |
| 9 String buildLibrarySource( | 9 String buildLibrarySource( |
| 10 Map<String, String> elementMap, | 10 Map<String, String> elementMap, |
| (...skipping 329 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 340 operator %(other) => (this is JSInt) ? 42 : 42.2; | 340 operator %(other) => (this is JSInt) ? 42 : 42.2; |
| 341 operator <<(other) => _shlPositive(other); | 341 operator <<(other) => _shlPositive(other); |
| 342 operator >>(other) { | 342 operator >>(other) { |
| 343 return _shrBothPositive(other) + _shrReceiverPositive(other) + | 343 return _shrBothPositive(other) + _shrReceiverPositive(other) + |
| 344 _shrOtherPositive(other); | 344 _shrOtherPositive(other); |
| 345 } | 345 } |
| 346 operator |(other) => 42; | 346 operator |(other) => 42; |
| 347 operator &(other) => 42; | 347 operator &(other) => 42; |
| 348 operator ^(other) => 42; | 348 operator ^(other) => 42; |
| 349 | 349 |
| 350 operator >(other) => !identical(this, other); | 350 operator >(other) => true; |
| 351 operator >=(other) => !identical(this, other); | 351 operator >=(other) => true; |
| 352 operator <(other) => !identical(this, other); | 352 operator <(other) => true; |
| 353 operator <=(other) => !identical(this, other); | 353 operator <=(other) => true; |
| 354 operator ==(other) => identical(this, other); | 354 operator ==(other) => true; |
| 355 get hashCode => throw "JSNumber.hashCode not implemented."; | 355 get hashCode => throw "JSNumber.hashCode not implemented."; |
| 356 | 356 |
| 357 // We force side effects on _tdivFast to mimic the shortcomings of | 357 // We force side effects on _tdivFast to mimic the shortcomings of |
| 358 // the effect analysis: because the `_tdivFast` implementation of | 358 // the effect analysis: because the `_tdivFast` implementation of |
| 359 // the core library has calls that may not already be analyzed, | 359 // the core library has calls that may not already be analyzed, |
| 360 // the analysis will conclude that `_tdivFast` may have side | 360 // the analysis will conclude that `_tdivFast` may have side |
| 361 // effects. | 361 // effects. |
| 362 _tdivFast(other) => new List()..length = 42; | 362 _tdivFast(other) => new List()..length = 42; |
| 363 _shlPositive(other) => 42; | 363 _shlPositive(other) => 42; |
| 364 _shrBothPositive(other) => 42; | 364 _shrBothPositive(other) => 42; |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 | 445 |
| 446 const LookupMap(this._entries, [this._nestedMaps = const []]) | 446 const LookupMap(this._entries, [this._nestedMaps = const []]) |
| 447 : _key = null, _value = null; | 447 : _key = null, _value = null; |
| 448 | 448 |
| 449 const LookupMap.pair(this._key, this._value) | 449 const LookupMap.pair(this._key, this._value) |
| 450 : _entries = const [], _nestedMaps = const []; | 450 : _entries = const [], _nestedMaps = const []; |
| 451 V operator[](K k) => null; | 451 V operator[](K k) => null; |
| 452 }''', | 452 }''', |
| 453 '_version': 'const _version = "0.0.1+1";', | 453 '_version': 'const _version = "0.0.1+1";', |
| 454 }; | 454 }; |
| OLD | NEW |