Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(347)

Side by Side Diff: pkg/analyzer2dart/lib/src/dart_backend.dart

Issue 683803003: Support for loops in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pkg/analyzer2dart/lib/src/cps_generator.dart ('k') | pkg/analyzer2dart/test/end2end_data.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library analyzer2dart.dart_backend; 5 library analyzer2dart.dart_backend;
6 6
7 import 'package:compiler/implementation/elements/elements.dart'; 7 import 'package:compiler/implementation/elements/elements.dart';
8 import 'package:compiler/implementation/dart_backend/dart_backend.dart'; 8 import 'package:compiler/implementation/dart_backend/dart_backend.dart';
9 import 'package:compiler/implementation/dart2jslib.dart'; 9 import 'package:compiler/implementation/dart2jslib.dart';
10 10
11 import 'driver.dart'; 11 import 'driver.dart';
12 import 'converted_world.dart'; 12 import 'converted_world.dart';
13 13
14 void compileToDart(Driver driver, ConvertedWorld convertedWorld) { 14 void compileToDart(Driver driver, ConvertedWorld convertedWorld) {
15 DartOutputter outputter = 15 DartOutputter outputter =
16 new DartOutputter(new Listener(), driver.outputProvider); 16 new DartOutputter(new Listener(), driver.outputProvider);
17 outputter.assembleProgram( 17 outputter.assembleProgram(
18 libraries: convertedWorld.libraries, 18 libraries: convertedWorld.libraries,
19 instantiatedClasses: convertedWorld.instantiatedClasses, 19 instantiatedClasses: convertedWorld.instantiatedClasses,
20 resolvedElements: convertedWorld.resolvedElements, 20 resolvedElements: convertedWorld.resolvedElements,
21 mainFunction: convertedWorld.mainFunction, 21 mainFunction: convertedWorld.mainFunction,
22 computeElementAst: (Element element) { 22 computeElementAst: (Element element) {
23 return DartBackend.createElementAst( 23 return DartBackend.createElementAst(
24 null, null, null, null, convertedWorld.getIr(element)); 24 null, // No compiler.
25 null, // No tracer.
26 DART_CONSTANT_SYSTEM,
27 element,
28 convertedWorld.getIr(element));
25 }, 29 },
26 shouldOutput: (_) => true, 30 shouldOutput: (_) => true,
27 isSafeToRemoveTypeDeclarations: (_) => false); 31 isSafeToRemoveTypeDeclarations: (_) => false);
28 32
29 } 33 }
30 34
31 class Listener implements DiagnosticListener { 35 class Listener implements DiagnosticListener {
32 36
33 @override 37 @override
34 void internalError(Spannable spannable, message) { 38 void internalError(Spannable spannable, message) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 @override 82 @override
79 SourceSpan spanFromSpannable(Spannable node) { 83 SourceSpan spanFromSpannable(Spannable node) {
80 // TODO: implement spanFromSpannable 84 // TODO: implement spanFromSpannable
81 } 85 }
82 86
83 @override 87 @override
84 withCurrentElement(element, f()) { 88 withCurrentElement(element, f()) {
85 // TODO: implement withCurrentElement 89 // TODO: implement withCurrentElement
86 } 90 }
87 } 91 }
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/lib/src/cps_generator.dart ('k') | pkg/analyzer2dart/test/end2end_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698