| 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 import 'dart:async'; | 5 import 'dart:async'; |
| 6 import 'package:expect/expect.dart'; | 6 import 'package:expect/expect.dart'; |
| 7 import 'package:compiler/src/options.dart' show CompilerOptions; | 7 import 'package:compiler/src/options.dart' show CompilerOptions; |
| 8 import 'package:compiler/src/null_compiler_output.dart'; | 8 import 'package:compiler/src/null_compiler_output.dart'; |
| 9 import 'memory_source_file_helper.dart'; | 9 import 'memory_source_file_helper.dart'; |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 handler, | 24 handler, |
| 25 new CompilerOptions.parse( | 25 new CompilerOptions.parse( |
| 26 entryPoint: uri, | 26 entryPoint: uri, |
| 27 libraryRoot: libraryRoot, | 27 libraryRoot: libraryRoot, |
| 28 packageRoot: packageRoot, | 28 packageRoot: packageRoot, |
| 29 options: options)); | 29 options: options)); |
| 30 return compiler.run(uri).then((success) { | 30 return compiler.run(uri).then((success) { |
| 31 Expect.isTrue(success); | 31 Expect.isTrue(success); |
| 32 Map<String, String> result = new Map<String, String>(); | 32 Map<String, String> result = new Map<String, String>(); |
| 33 var backend = compiler.backend; | 33 var backend = compiler.backend; |
| 34 for (var element in backend.generatedCode.keys) { | 34 for (dynamic element in backend.generatedCode.keys) { |
| 35 if (element.compilationUnit.script.readableUri != uri) continue; | 35 if (element.compilationUnit.script.readableUri != uri) continue; |
| 36 var name = element.name; | 36 var name = element.name; |
| 37 var code = backend.getGeneratedCode(element); | 37 var code = backend.getGeneratedCode(element); |
| 38 result[name] = code; | 38 result[name] = code; |
| 39 } | 39 } |
| 40 return result; | 40 return result; |
| 41 }); | 41 }); |
| 42 } | 42 } |
| OLD | NEW |