| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 /// Functions for asserting equivalence across serialization. | 5 /// Functions for asserting equivalence across serialization. |
| 6 | 6 |
| 7 library dart2js.serialization.equivalence; | 7 library dart2js.serialization.equivalence; |
| 8 | 8 |
| 9 import '../common/resolution.dart'; | 9 import '../common/resolution.dart'; |
| 10 import '../constants/expressions.dart'; | 10 import '../constants/expressions.dart'; |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 return checkMembers(element1, element2); | 292 return checkMembers(element1, element2); |
| 293 } | 293 } |
| 294 | 294 |
| 295 @override | 295 @override |
| 296 bool visitLocalFunctionElement(LocalFunctionElement element1, | 296 bool visitLocalFunctionElement(LocalFunctionElement element1, |
| 297 LocalFunctionElement element2) { | 297 LocalFunctionElement element2) { |
| 298 // TODO(johnniwinther): Define an equivalence on locals. | 298 // TODO(johnniwinther): Define an equivalence on locals. |
| 299 return checkMembers(element1.memberContext, element2.memberContext); | 299 return checkMembers(element1.memberContext, element2.memberContext); |
| 300 } | 300 } |
| 301 | 301 |
| 302 @override |
| 303 bool visitLocalVariableElement(LocalVariableElement element1, |
| 304 LocalVariableElement element2) { |
| 305 // TODO(johnniwinther): Define an equivalence on locals. |
| 306 return checkMembers(element1.memberContext, element2.memberContext); |
| 307 } |
| 308 |
| 302 bool visitAbstractFieldElement(AbstractFieldElement element1, | 309 bool visitAbstractFieldElement(AbstractFieldElement element1, |
| 303 AbstractFieldElement element2) { | 310 AbstractFieldElement element2) { |
| 304 return checkMembers(element1, element2); | 311 return checkMembers(element1, element2); |
| 305 } | 312 } |
| 306 | 313 |
| 307 @override | 314 @override |
| 308 bool visitTypeVariableElement(TypeVariableElement element1, | 315 bool visitTypeVariableElement(TypeVariableElement element1, |
| 309 TypeVariableElement element2) { | 316 TypeVariableElement element2) { |
| 310 return | 317 return |
| 311 strategy.test( | 318 strategy.test( |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 areMapLiteralUsesEquivalent) && | 698 areMapLiteralUsesEquivalent) && |
| 692 strategy.testSets( | 699 strategy.testSets( |
| 693 impact1, impact2, 'staticUses', | 700 impact1, impact2, 'staticUses', |
| 694 impact1.staticUses, impact2.staticUses, | 701 impact1.staticUses, impact2.staticUses, |
| 695 areStaticUsesEquivalent) && | 702 areStaticUsesEquivalent) && |
| 696 strategy.testSets( | 703 strategy.testSets( |
| 697 impact1, impact2, 'typeUses', | 704 impact1, impact2, 'typeUses', |
| 698 impact1.typeUses, impact2.typeUses, | 705 impact1.typeUses, impact2.typeUses, |
| 699 areTypeUsesEquivalent); | 706 areTypeUsesEquivalent); |
| 700 } | 707 } |
| OLD | NEW |