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

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

Issue 11093015: Implement Function.apply in dart2js. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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
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 EnqueueTask extends CompilerTask { 5 class EnqueueTask extends CompilerTask {
6 final Enqueuer codegen; 6 final Enqueuer codegen;
7 final Enqueuer resolution; 7 final Enqueuer resolution;
8 8
9 String get name => 'Enqueue'; 9 String get name => 'Enqueue';
10 10
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 queue.add(new WorkItem(element, elements, itemCompilationContextCreator())); 96 queue.add(new WorkItem(element, elements, itemCompilationContextCreator()));
97 97
98 // Enable runtime type support if we discover a getter called runtimeType. 98 // Enable runtime type support if we discover a getter called runtimeType.
99 // We have to enable runtime type before hitting the codegen, so 99 // We have to enable runtime type before hitting the codegen, so
100 // that constructors know whether they need to generate code for 100 // that constructors know whether they need to generate code for
101 // runtime type. 101 // runtime type.
102 if (element.isGetter() && element.name == Compiler.RUNTIME_TYPE) { 102 if (element.isGetter() && element.name == Compiler.RUNTIME_TYPE) {
103 compiler.enabledRuntimeType = true; 103 compiler.enabledRuntimeType = true;
104 } 104 }
105 105
106 if (element == compiler.functionApplyMethod) {
kasperl 2012/10/09 11:35:18 else if?
ngeoffray 2012/10/09 11:56:58 Done.
107 compiler.enabledFunctionApply = true;
108 }
109
106 // Enable isolate support if we start using something from the 110 // Enable isolate support if we start using something from the
107 // isolate library. 111 // isolate library.
108 LibraryElement library = element.getLibrary(); 112 LibraryElement library = element.getLibrary();
109 if (!compiler.hasIsolateSupport() 113 if (!compiler.hasIsolateSupport()
110 && library.uri.toString() == 'dart:isolate') { 114 && library.uri.toString() == 'dart:isolate') {
111 compiler.enableIsolateSupport(library); 115 compiler.enableIsolateSupport(library);
112 } 116 }
113 } 117 }
114 118
115 /** 119 /**
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 364
361 String toString() => 'Enqueuer($name)'; 365 String toString() => 'Enqueuer($name)';
362 366
363 registerUsedSelector(Selector selector) { 367 registerUsedSelector(Selector selector) {
364 Element interceptor = compiler.backend.getInterceptor(selector); 368 Element interceptor = compiler.backend.getInterceptor(selector);
365 if (interceptor != null) { 369 if (interceptor != null) {
366 registerStaticUse(interceptor); 370 registerStaticUse(interceptor);
367 } 371 }
368 } 372 }
369 } 373 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698