| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dart2js.serialization_model_test; | 5 library dart2js.serialization_model_test; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'package:async_helper/async_helper.dart'; | 8 import 'package:async_helper/async_helper.dart'; |
| 9 import 'package:expect/expect.dart'; | 9 import 'package:expect/expect.dart'; |
| 10 import 'package:compiler/src/closure.dart'; | 10 import 'package:compiler/src/closure.dart'; |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 void checkElements( | 160 void checkElements( |
| 161 Compiler compiler1, Compiler compiler2, Element element1, Element element2, | 161 Compiler compiler1, Compiler compiler2, Element element1, Element element2, |
| 162 {bool verbose: false}) { | 162 {bool verbose: false}) { |
| 163 if (element1.isAbstract) return; | 163 if (element1.isAbstract) return; |
| 164 if (element1.isFunction || | 164 if (element1.isFunction || |
| 165 element1.isConstructor || | 165 element1.isConstructor || |
| 166 (element1.isField && element1.isInstanceMember)) { | 166 (element1.isField && element1.isInstanceMember)) { |
| 167 ClosureRepresentationInfo closureData1 = compiler1 | 167 ClosureRepresentationInfo closureData1 = compiler1 |
| 168 .backendStrategy.closureDataLookup | 168 .backendStrategy.closureDataLookup |
| 169 .getClosureRepresentationInfo(element1); | 169 .getClosureInfoForMember(element1 as MemberElement); |
| 170 ClosureRepresentationInfo closureData2 = compiler2 | 170 ClosureRepresentationInfo closureData2 = compiler2 |
| 171 .backendStrategy.closureDataLookup | 171 .backendStrategy.closureDataLookup |
| 172 .getClosureRepresentationInfo(element2); | 172 .getClosureInfoForMember(element2 as MemberElement); |
| 173 | 173 |
| 174 checkElementIdentities( | 174 checkElementIdentities( |
| 175 closureData1, | 175 closureData1, |
| 176 closureData2, | 176 closureData2, |
| 177 '$element1.closureEntity', | 177 '$element1.closureEntity', |
| 178 closureData1.closureEntity, | 178 closureData1.closureEntity, |
| 179 closureData2.closureEntity); | 179 closureData2.closureEntity); |
| 180 checkElementIdentities( | 180 checkElementIdentities( |
| 181 closureData1, | 181 closureData1, |
| 182 closureData2, | 182 closureData2, |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 293 check(outputUnit1, outputUnit2, 'OutputUnit.isMainOutput $message', | 293 check(outputUnit1, outputUnit2, 'OutputUnit.isMainOutput $message', |
| 294 outputUnit1.isMainOutput, outputUnit2.isMainOutput); | 294 outputUnit1.isMainOutput, outputUnit2.isMainOutput); |
| 295 checkSetEquivalence( | 295 checkSetEquivalence( |
| 296 outputUnit1, | 296 outputUnit1, |
| 297 outputUnit2, | 297 outputUnit2, |
| 298 'OutputUnit.imports $message', | 298 'OutputUnit.imports $message', |
| 299 outputUnit1.imports, | 299 outputUnit1.imports, |
| 300 outputUnit2.imports, | 300 outputUnit2.imports, |
| 301 (a, b) => areElementsEquivalent(a.declaration, b.declaration)); | 301 (a, b) => areElementsEquivalent(a.declaration, b.declaration)); |
| 302 } | 302 } |
| OLD | NEW |