| 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 library dart2js.serialization.native_data_test; | 5 library dart2js.serialization.native_data_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:compiler/src/common/names.dart'; | 9 import 'package:compiler/src/common/names.dart'; |
| 10 import 'package:compiler/src/commandline_options.dart'; | 10 import 'package:compiler/src/commandline_options.dart'; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 print('analyze deserialized: $uri'); | 40 print('analyze deserialized: $uri'); |
| 41 print('------------------------------------------------------------------'); | 41 print('------------------------------------------------------------------'); |
| 42 Compiler compiler2 = compilerFor( | 42 Compiler compiler2 = compilerFor( |
| 43 memorySourceFiles: serializedData.toMemorySourceFiles(), | 43 memorySourceFiles: serializedData.toMemorySourceFiles(), |
| 44 resolutionInputs: serializedData.toUris(), | 44 resolutionInputs: serializedData.toUris(), |
| 45 options: [Flags.analyzeAll]); | 45 options: [Flags.analyzeAll]); |
| 46 await compiler2.run(uri); | 46 await compiler2.run(uri); |
| 47 | 47 |
| 48 JavaScriptBackend backend1 = compiler1.backend; | 48 JavaScriptBackend backend1 = compiler1.backend; |
| 49 JavaScriptBackend backend2 = compiler2.backend; | 49 JavaScriptBackend backend2 = compiler2.backend; |
| 50 NativeData nativeData1 = backend1.nativeData; | 50 NativeDataImpl nativeData1 = backend1.nativeData; |
| 51 NativeData nativeData2 = backend2.nativeData; | 51 NativeDataImpl nativeData2 = backend2.nativeData; |
| 52 | 52 |
| 53 checkMaps(nativeData1.jsInteropNames, nativeData2.jsInteropNames, | 53 checkMaps(nativeData1.jsInteropNames, nativeData2.jsInteropNames, |
| 54 "NativeData.jsInteropNames", areElementsEquivalent, equality, | 54 "NativeData.jsInteropNames", areElementsEquivalent, equality, |
| 55 verbose: verbose); | 55 verbose: verbose); |
| 56 | 56 |
| 57 checkMaps(nativeData1.nativeMemberName, nativeData2.nativeMemberName, | 57 checkMaps(nativeData1.nativeMemberName, nativeData2.nativeMemberName, |
| 58 "NativeData.nativeMemberName", areElementsEquivalent, equality, | 58 "NativeData.nativeMemberName", areElementsEquivalent, equality, |
| 59 verbose: verbose); | 59 verbose: verbose); |
| 60 | 60 |
| 61 checkMaps(nativeData1.nativeClassTagInfo, nativeData2.nativeClassTagInfo, | 61 checkMaps(nativeData1.nativeClassTagInfo, nativeData2.nativeClassTagInfo, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 79 verbose: verbose); | 79 verbose: verbose); |
| 80 | 80 |
| 81 checkMaps( | 81 checkMaps( |
| 82 nativeData1.nativeFieldStoreBehavior, | 82 nativeData1.nativeFieldStoreBehavior, |
| 83 nativeData2.nativeFieldStoreBehavior, | 83 nativeData2.nativeFieldStoreBehavior, |
| 84 "NativeData.nativeFieldStoreBehavior", | 84 "NativeData.nativeFieldStoreBehavior", |
| 85 areElementsEquivalent, | 85 areElementsEquivalent, |
| 86 testNativeBehavior, | 86 testNativeBehavior, |
| 87 verbose: verbose); | 87 verbose: verbose); |
| 88 } | 88 } |
| OLD | NEW |