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

Side by Side Diff: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart

Issue 862703002: Implement constructor bodies and initializers in CPS->JS backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Removed obsolete TODO 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
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.js_emitter; 5 part of dart2js.js_emitter;
6 6
7 const USE_NEW_EMITTER = const bool.fromEnvironment("dart2js.use.new.emitter"); 7 const USE_NEW_EMITTER = const bool.fromEnvironment("dart2js.use.new.emitter");
8 8
9 /** 9 /**
10 * Generates the code for all used classes in the program. Static fields (even 10 * Generates the code for all used classes in the program. Static fields (even
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 return emitter.interceptorClassAccess(e); 113 return emitter.interceptorClassAccess(e);
114 } 114 }
115 115
116 /// Returns the JS expression representing the type [e]. 116 /// Returns the JS expression representing the type [e].
117 /// 117 ///
118 /// The given type [e] might be a Typedef. 118 /// The given type [e] might be a Typedef.
119 jsAst.Expression typeAccess(Element e) { 119 jsAst.Expression typeAccess(Element e) {
120 return emitter.typeAccess(e); 120 return emitter.typeAccess(e);
121 } 121 }
122 122
123 jsAst.Expression closureClassConstructorAccess(ClosureClassElement e) { 123 jsAst.Expression internalConstructorAccess(ClassElement e) {
124 return emitter.closureClassConstructorAccess(e); 124 return emitter.internalConstructorAccess(e);
125 } 125 }
126 126
127 void registerReadTypeVariable(TypeVariableElement element) { 127 void registerReadTypeVariable(TypeVariableElement element) {
128 readTypeVariables.add(element); 128 readTypeVariables.add(element);
129 } 129 }
130 130
131 Set<ClassElement> computeInterceptorsReferencedFromConstants() { 131 Set<ClassElement> computeInterceptorsReferencedFromConstants() {
132 Set<ClassElement> classes = new Set<ClassElement>(); 132 Set<ClassElement> classes = new Set<ClassElement>();
133 JavaScriptConstantCompiler handler = backend.constants; 133 JavaScriptConstantCompiler handler = backend.constants;
134 List<ConstantValue> constants = handler.getConstantsForEmission(); 134 List<ConstantValue> constants = handler.getConstantsForEmission();
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 /// Returns the JS prototype of the given class [e]. 454 /// Returns the JS prototype of the given class [e].
455 jsAst.Expression prototypeAccess(ClassElement e, bool hasBeenInstantiated); 455 jsAst.Expression prototypeAccess(ClassElement e, bool hasBeenInstantiated);
456 456
457 /// Returns the JS constructor of the given interceptor class [e]. 457 /// Returns the JS constructor of the given interceptor class [e].
458 jsAst.Expression interceptorClassAccess(ClassElement e); 458 jsAst.Expression interceptorClassAccess(ClassElement e);
459 459
460 /// Returns the JS expression representing the type [e]. 460 /// Returns the JS expression representing the type [e].
461 jsAst.Expression typeAccess(Element e); 461 jsAst.Expression typeAccess(Element e);
462 462
463 /// Returns the JS constructor for the given closure class [e]. 463 /// Returns the JS constructor for the given closure class [e].
464 jsAst.Expression closureClassConstructorAccess(ClosureClassElement e); 464 jsAst.Expression internalConstructorAccess(ClosureClassElement e);
465 465
466 /// Returns the JS expression representing a function that returns 'null' 466 /// Returns the JS expression representing a function that returns 'null'
467 jsAst.Expression generateFunctionThatReturnsNull(); 467 jsAst.Expression generateFunctionThatReturnsNull();
468 468
469 int compareConstants(ConstantValue a, ConstantValue b); 469 int compareConstants(ConstantValue a, ConstantValue b);
470 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant); 470 bool isConstantInlinedOrAlreadyEmitted(ConstantValue constant);
471 471
472 void invalidateCaches(); 472 void invalidateCaches();
473 } 473 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698