Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // BSD-style license that can be found in the LICENSE file. | |
| 4 | |
| 5 library analyzer2dart.dart_backend; | |
| 6 | |
| 7 import 'package:compiler/implementation/elements/elements.dart'; | |
| 8 import 'package:compiler/implementation/dart_backend/dart_backend.dart'; | |
| 9 import 'package:compiler/implementation/dart2jslib.dart'; | |
| 10 | |
| 11 import 'driver.dart'; | |
| 12 import 'converted_world.dart'; | |
| 13 | |
| 14 void compileToDart(Driver driver, ConvertedWorld convertedWorld) { | |
| 15 DartOutputter outputter = new DartOutputter(new Listener(), driver.outputProvi der); | |
|
sigurdm
2014/09/08 14:07:15
Long line
Johnni Winther
2014/09/09 14:21:26
Done.
| |
| 16 outputter.assembleProgram( | |
| 17 libraries: convertedWorld.libraries, | |
| 18 instantiatedClasses: convertedWorld.instantiatedClasses, | |
| 19 resolvedElements: convertedWorld.resolvedElements, | |
| 20 mainFunction: convertedWorld.mainFunction, | |
| 21 computeElementAst: (Element element) { | |
| 22 return DartBackend.createElementAst( | |
| 23 null, null, null, null, convertedWorld.getIr(element)); | |
| 24 }, | |
| 25 shouldOutput: (_) => true, | |
| 26 isSafeToRemoveTypeDeclarations: (_) => false | |
| 27 ); | |
|
sigurdm
2014/09/08 14:07:15
I think this `);` should go to previous line.
Johnni Winther
2014/09/09 14:21:26
Done.
| |
| 28 | |
| 29 } | |
| 30 | |
| 31 class Listener implements DiagnosticListener { | |
| 32 | |
| 33 @override | |
| 34 void internalError(Spannable spannable, message) { | |
| 35 // TODO: implement internalError | |
| 36 } | |
| 37 | |
| 38 @override | |
| 39 void log(message) { | |
| 40 // TODO: implement log | |
| 41 } | |
| 42 | |
| 43 @override | |
| 44 void reportError(Spannable node, MessageKind errorCode, [Map arguments = const {}]) { | |
|
sigurdm
2014/09/08 14:07:15
Long line (several in this file)
Johnni Winther
2014/09/09 14:21:26
Quick fix!! Done.
| |
| 45 // TODO: implement reportError | |
| 46 } | |
| 47 | |
| 48 @override | |
| 49 void reportFatalError(Spannable node, MessageKind errorCode, [Map arguments = const {}]) { | |
| 50 // TODO: implement reportFatalError | |
| 51 } | |
| 52 | |
| 53 @override | |
| 54 void reportHint(Spannable node, MessageKind errorCode, [Map arguments = const {}]) { | |
| 55 // TODO: implement reportHint | |
| 56 } | |
| 57 | |
| 58 @override | |
| 59 void reportInfo(Spannable node, MessageKind errorCode, [Map arguments = const {}]) { | |
| 60 // TODO: implement reportInfo | |
| 61 } | |
| 62 | |
| 63 @override | |
| 64 void reportWarning(Spannable node, MessageKind errorCode, [Map arguments = con st {}]) { | |
| 65 // TODO: implement reportWarning | |
| 66 } | |
| 67 | |
| 68 @override | |
| 69 SourceSpan spanFromSpannable(Spannable node) { | |
| 70 // TODO: implement spanFromSpannable | |
| 71 } | |
| 72 | |
| 73 @override | |
| 74 withCurrentElement(element, f()) { | |
| 75 // TODO: implement withCurrentElement | |
| 76 } | |
| 77 } | |
| OLD | NEW |