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

Side by Side Diff: lib/compiler/implementation/enqueue.dart

Issue 10942028: Support class and typedef literals as expressions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add a test for literals. 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 dart2js; 5 part of dart2js;
6 6
7 class EnqueueTask extends CompilerTask { 7 class EnqueueTask extends CompilerTask {
8 final Enqueuer codegen; 8 final Enqueuer codegen;
9 final Enqueuer resolution; 9 final Enqueuer resolution;
10 10
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 compiler.world.registerUsedElement(element); 95 compiler.world.registerUsedElement(element);
96 } 96 }
97 97
98 queue.add(new WorkItem(element, elements, itemCompilationContextCreator())); 98 queue.add(new WorkItem(element, elements, itemCompilationContextCreator()));
99 99
100 // Enable runtime type support if we discover a getter called runtimeType. 100 // Enable runtime type support if we discover a getter called runtimeType.
101 // We have to enable runtime type before hitting the codegen, so 101 // We have to enable runtime type before hitting the codegen, so
102 // that constructors know whether they need to generate code for 102 // that constructors know whether they need to generate code for
103 // runtime type. 103 // runtime type.
104 if (element.isGetter() && element.name == Compiler.RUNTIME_TYPE) { 104 if (element.isGetter() && element.name == Compiler.RUNTIME_TYPE) {
105 compiler.enabledRuntimeType = true; 105 compiler.enableRuntimeTypeFunction();
106 } else if (element == compiler.functionApplyMethod) { 106 } else if (element == compiler.functionApplyMethod) {
107 compiler.enabledFunctionApply = true; 107 compiler.enabledFunctionApply = true;
108 } 108 }
109 109
110 // Enable isolate support if we start using something from the 110 // Enable isolate support if we start using something from the
111 // isolate library. 111 // isolate library.
112 LibraryElement library = element.getLibrary(); 112 LibraryElement library = element.getLibrary();
113 if (!compiler.hasIsolateSupport() 113 if (!compiler.hasIsolateSupport()
114 && library.uri.toString() == 'dart:isolate') { 114 && library.uri.toString() == 'dart:isolate') {
115 compiler.enableIsolateSupport(library); 115 compiler.enableIsolateSupport(library);
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 364
365 String toString() => 'Enqueuer($name)'; 365 String toString() => 'Enqueuer($name)';
366 366
367 registerUsedSelector(Selector selector) { 367 registerUsedSelector(Selector selector) {
368 Element interceptor = compiler.backend.getInterceptor(selector); 368 Element interceptor = compiler.backend.getInterceptor(selector);
369 if (interceptor != null) { 369 if (interceptor != null) {
370 registerStaticUse(interceptor); 370 registerStaticUse(interceptor);
371 } 371 }
372 } 372 }
373 } 373 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698