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

Side by Side Diff: lib/compiler/implementation/dart_backend/backend.dart

Issue 10668029: Associate partial source map with each code block in Universe.generatedCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 5 months 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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 /** 5 /**
6 * Visitor to gather conservative estimate of functions which 6 * Visitor to gather conservative estimate of functions which
7 * can be invoked and classes which can be instantiated. 7 * can be invoked and classes which can be instantiated.
8 */ 8 */
9 class ReachabilityVisitor implements Visitor { 9 class ReachabilityVisitor implements Visitor {
10 final Compiler compiler; 10 final Compiler compiler;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 93
94 class DartBackend extends Backend { 94 class DartBackend extends Backend {
95 final List<CompilerTask> tasks = const <CompilerTask>[]; 95 final List<CompilerTask> tasks = const <CompilerTask>[];
96 96
97 DartBackend(Compiler compiler) : super(compiler); 97 DartBackend(Compiler compiler) : super(compiler);
98 98
99 void enqueueHelpers(Enqueuer world) { 99 void enqueueHelpers(Enqueuer world) {
100 // TODO(antonm): Implement this method, if needed. 100 // TODO(antonm): Implement this method, if needed.
101 } 101 }
102 102
103 String codegen(WorkItem work) { 103 CodeBlock codegen(WorkItem work) {
104 // Traverse AST to populate sets of reachable classes and functions. 104 // Traverse AST to populate sets of reachable classes and functions.
105 log('codegen(${work.element})'); 105 log('codegen(${work.element})');
106 FunctionExpression function = work.element.parseNode(compiler); 106 FunctionExpression function = work.element.parseNode(compiler);
107 function.body.accept(new TraversingVisitor( 107 function.body.accept(new TraversingVisitor(
108 new ReachabilityVisitor(compiler, work.resolutionTree))); 108 new ReachabilityVisitor(compiler, work.resolutionTree)));
109 } 109 }
110 110
111 void processNativeClasses(Enqueuer world, 111 void processNativeClasses(Enqueuer world,
112 Collection<LibraryElement> libraries) { 112 Collection<LibraryElement> libraries) {
113 } 113 }
114 114
115 void assembleProgram() { 115 void assembleProgram() {
116 compiler.assembledCode = ''; 116 compiler.assembledCode = '';
117 } 117 }
118 118
119 log(String message) => compiler.log('[DartBackend] $message'); 119 log(String message) => compiler.log('[DartBackend] $message');
120 } 120 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698