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

Side by Side Diff: pkg/compiler/lib/src/js_backend/native_emitter.dart

Issue 819993003: dart2js OldEmitter: inline FinishClasses. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Small fixes. Created 5 years, 11 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 | pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.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 part of js_backend; 5 part of js_backend;
6 6
7 class NativeEmitter { 7 class NativeEmitter {
8 8
9 final Map<Element, ClassBuilder> cachedBuilders; 9 final Map<Element, ClassBuilder> cachedBuilders;
10 10
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 234
235 // Emit the native class interceptors that were actually used. 235 // Emit the native class interceptors that were actually used.
236 for (ClassElement classElement in classes) { 236 for (ClassElement classElement in classes) {
237 if (!classElement.isNative) continue; 237 if (!classElement.isNative) continue;
238 if (neededClasses.contains(classElement)) { 238 if (neededClasses.contains(classElement)) {
239 // Define interceptor class for [classElement]. 239 // Define interceptor class for [classElement].
240 emitterTask.oldEmitter.classEmitter.emitClassBuilderWithReflectionData( 240 emitterTask.oldEmitter.classEmitter.emitClassBuilderWithReflectionData(
241 backend.namer.getNameOfClass(classElement), 241 backend.namer.getNameOfClass(classElement),
242 classElement, builders[classElement], 242 classElement, builders[classElement],
243 emitterTask.oldEmitter.getElementDescriptor(classElement)); 243 emitterTask.oldEmitter.getElementDescriptor(classElement));
244 emitterTask.oldEmitter.needsDefineClass = true; 244 emitterTask.oldEmitter.needsClassSupport = true;
245 } 245 }
246 } 246 }
247 } 247 }
248 248
249 /** 249 /**
250 * Computes the native classes that are extended (subclassed) by non-native 250 * Computes the native classes that are extended (subclassed) by non-native
251 * classes and the set non-mative classes that extend them. (A List is used 251 * classes and the set non-mative classes that extend them. (A List is used
252 * instead of a Set for out stability). 252 * instead of a Set for out stability).
253 */ 253 */
254 Map<ClassElement, List<ClassElement>> computeExtensionPoints( 254 Map<ClassElement, List<ClassElement>> computeExtensionPoints(
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 if (emitterTask.compiler.enableMinification) targetBuffer.write(';'); 473 if (emitterTask.compiler.enableMinification) targetBuffer.write(';');
474 targetBuffer.write(jsAst.prettyPrint( 474 targetBuffer.write(jsAst.prettyPrint(
475 new jsAst.ExpressionStatement(init), compiler)); 475 new jsAst.ExpressionStatement(init), compiler));
476 targetBuffer.write('\n'); 476 targetBuffer.write('\n');
477 } 477 }
478 478
479 targetBuffer.write(nativeBuffer); 479 targetBuffer.write(nativeBuffer);
480 targetBuffer.write('\n'); 480 targetBuffer.write('\n');
481 } 481 }
482 } 482 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/class_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698