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

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

Issue 9359039: Source in most stuff. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: rebased 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 | dart/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 bool allowSpeculativeOptimization = true; 10 bool allowSpeculativeOptimization = true;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 library.define(new ForeignElement( 155 library.define(new ForeignElement(
156 const SourceString('JS'), library), this); 156 const SourceString('JS'), library), this);
157 library.define(new ForeignElement( 157 library.define(new ForeignElement(
158 const SourceString('UNINTERCEPTED'), library), this); 158 const SourceString('UNINTERCEPTED'), library), this);
159 library.define(new ForeignElement( 159 library.define(new ForeignElement(
160 const SourceString('JS_HAS_EQUALS'), library), this); 160 const SourceString('JS_HAS_EQUALS'), library), this);
161 return library; 161 return library;
162 } 162 }
163 163
164 void scanBuiltinLibraries() { 164 void scanBuiltinLibraries() {
165 coreLibrary = scanBuiltinLibrary('core.dart');
166 coreImplLibrary = scanBuiltinLibrary('coreimpl.dart'); 165 coreImplLibrary = scanBuiltinLibrary('coreimpl.dart');
167 jsHelperLibrary = scanBuiltinLibrary('js_helper.dart'); 166 jsHelperLibrary = scanBuiltinLibrary('js_helper.dart');
167 coreLibrary = scanBuiltinLibrary('core.dart');
168 // Since the three libraries "core", "coreimpl", and "js_helper"
169 // coreLibrary is null when they are being built. So we add the
170 // implicit import of coreLibrary now. This can be cleaned up when
171 // we have proper support for "dart:core".
172 // TODO(ahe): Clean this up as described above.
173 scanner.importLibrary(coreImplLibrary, coreLibrary, null);
174 scanner.importLibrary(jsHelperLibrary, coreLibrary, null);
168 // TODO(ngeoffray): Lazily add this method. 175 // TODO(ngeoffray): Lazily add this method.
169 universe.invokedNames[NO_SUCH_METHOD] = 176 universe.invokedNames[NO_SUCH_METHOD] =
170 new Set<Invocation>.from(<Invocation>[new Invocation(2)]); 177 new Set<Invocation>.from(<Invocation>[new Invocation(2)]);
171 } 178 }
172 179
173 void enqueueInvokedInstanceMethods() { 180 void enqueueInvokedInstanceMethods() {
174 // TODO(floitsch): find a more efficient way of doing this. 181 // TODO(floitsch): find a more efficient way of doing this.
175 // Run through the classes and see if we need to compile methods. 182 // Run through the classes and see if we need to compile methods.
176 for (ClassElement classElement in universe.instantiatedClasses) { 183 for (ClassElement classElement in universe.instantiatedClasses) {
177 for (ClassElement currentClass = classElement; 184 for (ClassElement currentClass = classElement;
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 362
356 class CompilerCancelledException implements Exception { 363 class CompilerCancelledException implements Exception {
357 final String reason; 364 final String reason;
358 CompilerCancelledException(this.reason); 365 CompilerCancelledException(this.reason);
359 366
360 String toString() { 367 String toString() {
361 String banner = 'compiler cancelled'; 368 String banner = 'compiler cancelled';
362 return (reason !== null) ? '$banner: $reason' : '$banner'; 369 return (reason !== null) ? '$banner: $reason' : '$banner';
363 } 370 }
364 } 371 }
OLDNEW
« no previous file with comments | « no previous file | dart/frog/leg/elements/elements.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698