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

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

Issue 11304021: Add NativeEnqueuer to work with the Enqueuer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
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 part of dart_backend; 5 part of dart_backend;
6 6
7 // TODO(ahe): This class is simply wrong. This backend should use 7 // TODO(ahe): This class is simply wrong. This backend should use
8 // elements when it can, not AST nodes. Perhaps a [Map<Element, 8 // elements when it can, not AST nodes. Perhaps a [Map<Element,
9 // TreeElements>] is what is needed. 9 // TreeElements>] is what is needed.
10 class ElementAst { 10 class ElementAst {
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 final coreLibrary = compiler.coreLibrary; 207 final coreLibrary = compiler.coreLibrary;
208 for (final name in LITERAL_TYPE_NAMES) { 208 for (final name in LITERAL_TYPE_NAMES) {
209 ClassElement classElement = coreLibrary.findLocal(new SourceString(name)); 209 ClassElement classElement = coreLibrary.findLocal(new SourceString(name));
210 classElement.ensureResolved(compiler); 210 classElement.ensureResolved(compiler);
211 } 211 }
212 } 212 }
213 void codegen(WorkItem work) { } 213 void codegen(WorkItem work) { }
214 void processNativeClasses(Enqueuer world, 214 void processNativeClasses(Enqueuer world,
215 Collection<LibraryElement> libraries) { } 215 Collection<LibraryElement> libraries) { }
216 216
217 // Stub native enqueuers.
218 NativeEnqueuer nativeResolutionEnqueuer(Enqueuer world) => new NativeEnqueuer( );
219 NativeEnqueuer nativeCodegenEnqueuer(Enqueuer world) => new NativeEnqueuer();
220
217 bool isUserLibrary(LibraryElement lib) { 221 bool isUserLibrary(LibraryElement lib) {
218 final INTERNAL_HELPERS = [ 222 final INTERNAL_HELPERS = [
219 compiler.jsHelperLibrary, 223 compiler.jsHelperLibrary,
220 compiler.interceptorsLibrary, 224 compiler.interceptorsLibrary,
221 ]; 225 ];
222 return INTERNAL_HELPERS.indexOf(lib) == -1 && !lib.isPlatformLibrary; 226 return INTERNAL_HELPERS.indexOf(lib) == -1 && !lib.isPlatformLibrary;
223 } 227 }
224 228
225 void assembleProgram() { 229 void assembleProgram() {
226 // Conservatively traverse all platform libraries and collect member names. 230 // Conservatively traverse all platform libraries and collect member names.
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 } 559 }
556 560
557 compareElements(e0, e1) { 561 compareElements(e0, e1) {
558 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1); 562 int result = compareBy((e) => e.getLibrary().uri.toString())(e0, e1);
559 if (result != 0) return result; 563 if (result != 0) return result;
560 return compareBy((e) => e.position().charOffset)(e0, e1); 564 return compareBy((e) => e.position().charOffset)(e0, e1);
561 } 565 }
562 566
563 List<Element> sortElements(Collection<Element> elements) => 567 List<Element> sortElements(Collection<Element> elements) =>
564 sorted(elements, compareElements); 568 sorted(elements, compareElements);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698