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

Side by Side Diff: dart/frog/leg/compiler.dart

Issue 8993009: Implement string interpolation up to SSA. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address (some) review comments and update status file Created 9 years 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 | « no previous file | dart/frog/leg/resolver.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 class WorkElement { 5 class WorkElement {
6 final Element element; 6 final Element element;
7 TreeElements resolutionTree; 7 TreeElements resolutionTree;
8 Function run; 8 Function run;
9 9
10 WorkElement.toCompile(this.element) : resolutionTree = null { 10 WorkElement.toCompile(this.element) : resolutionTree = null {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 generator = new SsaCodeGeneratorTask(this); 63 generator = new SsaCodeGeneratorTask(this);
64 emitter = new CodeEmitterTask(this); 64 emitter = new CodeEmitterTask(this);
65 tasks = [scanner, parser, resolver, checker, builder, optimizer, generator, 65 tasks = [scanner, parser, resolver, checker, builder, optimizer, generator,
66 emitter]; 66 emitter];
67 } 67 }
68 68
69 void ensure(bool condition) { 69 void ensure(bool condition) {
70 if (!condition) cancel('failed assertion in leg'); 70 if (!condition) cancel('failed assertion in leg');
71 } 71 }
72 72
73 void unimplemented(String methodName) { 73 void unimplemented(String methodName,
74 cancel("$methodName not implemented"); 74 [Node node, Token token, HInstruction instruction]) {
75 cancel("$methodName not implemented", node, token, instruction);
75 } 76 }
76 77
77 void cancel([String reason, Node node, Token token, 78 void cancel([String reason, Node node, Token token,
78 HInstruction instruction]) { 79 HInstruction instruction]) {
79 throw new CompilerCancelledException(reason); 80 throw new CompilerCancelledException(reason);
80 } 81 }
81 82
82 void log(message) { 83 void log(message) {
83 // Do nothing. 84 // Do nothing.
84 } 85 }
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 233
233 class CompilerCancelledException { 234 class CompilerCancelledException {
234 final String reason; 235 final String reason;
235 CompilerCancelledException(this.reason); 236 CompilerCancelledException(this.reason);
236 237
237 String toString() { 238 String toString() {
238 String banner = 'compiler cancelled'; 239 String banner = 'compiler cancelled';
239 return (reason !== null) ? '$banner: $reason' : '$banner'; 240 return (reason !== null) ? '$banner: $reason' : '$banner';
240 } 241 }
241 } 242 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/resolver.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698