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

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

Issue 9284022: Operators. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 8 years, 10 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
« no previous file with comments | « no previous file | frog/leg/elements/elements.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) 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 class WorkItem { 5 class WorkItem {
6 final Element element; 6 final Element element;
7 TreeElements resolutionTree; 7 TreeElements resolutionTree;
8 Function run; 8 Function run;
9 Map<int, BailoutInfo> bailouts = null; 9 Map<int, BailoutInfo> bailouts = null;
10 10
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 return true; 127 return true;
128 } 128 }
129 129
130 void scanCoreLibrary() { 130 void scanCoreLibrary() {
131 String fileName = io.join([legDirectory, 'lib', 'core.dart']); 131 String fileName = io.join([legDirectory, 'lib', 'core.dart']);
132 currentElement = new CompilationUnitElement( 132 currentElement = new CompilationUnitElement(
133 readScript(fileName), currentLibrary); 133 readScript(fileName), currentLibrary);
134 scanner.scan(currentElement); 134 scanner.scan(currentElement);
135 // Make our special function a foreign kind. 135 // Make our special function a foreign kind.
136 universe.define(new ForeignElement(const SourceString('JS')), this); 136 universe.define(new ForeignElement(const SourceString('JS')), this);
137 universe.define(new ForeignElement(const SourceString('UNINTERCEPTED')), 137 universe.define(new ForeignElement(
138 this); 138 const SourceString('UNINTERCEPTED')), this);
139 universe.define(new ForeignElement(
140 const SourceString('JS_HAS_EQUALS')), this);
139 // TODO(ngeoffray): Lazily add this method. 141 // TODO(ngeoffray): Lazily add this method.
140 universe.invokedNames[NO_SUCH_METHOD] = new Set<int>.from(<int>[2]); 142 universe.invokedNames[NO_SUCH_METHOD] = new Set<int>.from(<int>[2]);
141 } 143 }
142 144
143 void enqueueInvokedInstanceMethods() { 145 void enqueueInvokedInstanceMethods() {
144 // TODO(floitsch): find a more efficient way of doing this. 146 // TODO(floitsch): find a more efficient way of doing this.
145 // Run through the classes and see if we need to compile methods. 147 // Run through the classes and see if we need to compile methods.
146 for (ClassElement classElement in universe.instantiatedClasses) { 148 for (ClassElement classElement in universe.instantiatedClasses) {
147 for (ClassElement currentClass = classElement; 149 for (ClassElement currentClass = classElement;
148 currentClass !== null; 150 currentClass !== null;
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 309
308 class CompilerCancelledException implements Exception { 310 class CompilerCancelledException implements Exception {
309 final String reason; 311 final String reason;
310 CompilerCancelledException(this.reason); 312 CompilerCancelledException(this.reason);
311 313
312 String toString() { 314 String toString() {
313 String banner = 'compiler cancelled'; 315 String banner = 'compiler cancelled';
314 return (reason !== null) ? '$banner: $reason' : '$banner'; 316 return (reason !== null) ? '$banner: $reason' : '$banner';
315 } 317 }
316 } 318 }
OLDNEW
« no previous file with comments | « no previous file | frog/leg/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698