| 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 /// Test that the dart2js copy of [KernelVisitor] generates the expected IR as | 5 /// Test that the dart2js copy of [KernelVisitor] generates the expected IR as |
| 6 /// defined by kernel spec-mode test files. | 6 /// defined by kernel spec-mode test files. |
| 7 | 7 |
| 8 import 'dart:io'; | 8 import 'dart:io'; |
| 9 import 'dart:async'; | 9 import 'dart:async'; |
| 10 import 'package:compiler/src/compiler.dart' show Compiler; | 10 import 'package:compiler/src/compiler.dart' show Compiler; |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 | 73 |
| 74 Future<Compiler> newCompiler() async { | 74 Future<Compiler> newCompiler() async { |
| 75 var compiler = compilerFor( | 75 var compiler = compilerFor( |
| 76 options: [Flags.analyzeOnly, Flags.analyzeAll, Flags.useKernel]); | 76 options: [Flags.analyzeOnly, Flags.analyzeAll, Flags.useKernel]); |
| 77 await compiler.setupSdk(); | 77 await compiler.setupSdk(); |
| 78 | 78 |
| 79 // The visitor no longer enqueues elements that are not reachable from the | 79 // The visitor no longer enqueues elements that are not reachable from the |
| 80 // program. The mixin-full resolution transform run by the test expects to | 80 // program. The mixin-full resolution transform run by the test expects to |
| 81 // find dart.core::Iterator. | 81 // find dart.core::Iterator. |
| 82 var core = await compiler.libraryLoader.loadLibrary(Uri.parse('dart:core')); | 82 var core = await compiler.libraryLoader.loadLibrary(Uri.parse('dart:core')); |
| 83 compiler.startResolution(); |
| 83 var cls = core.implementation.localLookup('Iterator'); | 84 var cls = core.implementation.localLookup('Iterator'); |
| 84 cls.ensureResolved(compiler.resolution); | 85 cls.ensureResolved(compiler.resolution); |
| 85 return compiler; | 86 return compiler; |
| 86 } | 87 } |
| OLD | NEW |