OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 /** The entry point for the command-line version analyzer2dart. */ | 5 /** The entry point for the command-line version analyzer2dart. */ |
6 library analyzer2dart.cmdline; | 6 library analyzer2dart.cmdline; |
7 | 7 |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 | 9 |
10 import 'package:analyzer/file_system/physical_file_system.dart'; | 10 import 'package:analyzer/file_system/physical_file_system.dart'; |
11 import 'package:analyzer/src/generated/element.dart'; | 11 import 'package:analyzer/src/generated/element.dart'; |
12 import 'package:analyzer/src/generated/sdk.dart'; | 12 import 'package:analyzer/src/generated/sdk.dart'; |
13 import 'package:analyzer/src/generated/sdk_io.dart'; | 13 import 'package:analyzer/src/generated/sdk_io.dart'; |
14 import 'package:analyzer/src/generated/source_io.dart'; | 14 import 'package:analyzer/src/generated/source_io.dart'; |
15 import 'package:compiler/implementation/source_file_provider.dart'; | 15 import 'package:compiler/src/source_file_provider.dart'; |
16 | 16 |
17 import '../lib/src/closed_world.dart'; | 17 import '../lib/src/closed_world.dart'; |
18 import '../lib/src/driver.dart'; | 18 import '../lib/src/driver.dart'; |
19 import '../lib/src/converted_world.dart'; | 19 import '../lib/src/converted_world.dart'; |
20 import '../lib/src/dart_backend.dart'; | 20 import '../lib/src/dart_backend.dart'; |
21 | 21 |
22 void main(List<String> args) { | 22 void main(List<String> args) { |
23 // TODO(paulberry): hacky | 23 // TODO(paulberry): hacky |
24 String path = args[0]; | 24 String path = args[0]; |
25 | 25 |
(...skipping 27 matching lines...) Expand all Loading... |
53 // visiting the ast and invoking the ir builder. | 53 // visiting the ast and invoking the ir builder. |
54 // TODO(johnniwinther): Convert the analyzer element model into the dart2js | 54 // TODO(johnniwinther): Convert the analyzer element model into the dart2js |
55 // element model to fit the needs of the cps encoding above. | 55 // element model to fit the needs of the cps encoding above. |
56 ConvertedWorld convertedWorld = convertWorld(world); | 56 ConvertedWorld convertedWorld = convertWorld(world); |
57 | 57 |
58 // TODO(johnniwinther): Feed the cps ir into the new dart2dart backend to | 58 // TODO(johnniwinther): Feed the cps ir into the new dart2dart backend to |
59 // generate dart file(s). | 59 // generate dart file(s). |
60 compileToDart(analyzer2Dart, convertedWorld); | 60 compileToDart(analyzer2Dart, convertedWorld); |
61 } | 61 } |
62 | 62 |
OLD | NEW |