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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/emitter_no_eval.dart

Issue 23504003: Do not do global optimizations on fields and parameters when invokeOn is enabled. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 js_backend; 5 part of js_backend;
6 6
7 class CodeEmitterNoEvalTask extends CodeEmitterTask { 7 class CodeEmitterNoEvalTask extends CodeEmitterTask {
8 CodeEmitterNoEvalTask(Compiler compiler, 8 CodeEmitterNoEvalTask(Compiler compiler,
9 Namer namer, 9 Namer namer,
10 bool generateSourceMap) 10 bool generateSourceMap)
(...skipping 16 matching lines...) Expand all
27 27
28 void emitClosureClassHeader(String mangledName, 28 void emitClosureClassHeader(String mangledName,
29 String superName, 29 String superName,
30 List<String> fieldNames, 30 List<String> fieldNames,
31 ClassBuilder builder) { 31 ClassBuilder builder) {
32 builder.addProperty('', buildConstructor(mangledName, fieldNames)); 32 builder.addProperty('', buildConstructor(mangledName, fieldNames));
33 emitSuper(superName, builder); 33 emitSuper(superName, builder);
34 } 34 }
35 35
36 36
37 bool emitFields(ClassElement classElement, 37 bool emitFields(Element element,
38 ClassBuilder builder, 38 ClassBuilder builder,
39 String superName, 39 String superName,
40 { bool classIsNative: false, 40 { bool classIsNative: false,
41 bool emitStatics: false, 41 bool emitStatics: false,
42 bool onlyForRti: false }) { 42 bool onlyForRti: false }) {
43 // Class fields are dynamically generated so they have to be 43 // Class and library fields are dynamically generated so they have to be
44 // emitted using getters and setters instead. 44 // emitted using getters and setters instead.
45 return false; 45 return false;
46 } 46 }
47 47
48 void emitClassConstructor(ClassElement classElement, ClassBuilder builder) { 48 void emitClassConstructor(ClassElement classElement, ClassBuilder builder) {
49 // Say we have a class A with fields b, c and d, where c needs a getter and 49 // Say we have a class A with fields b, c and d, where c needs a getter and
50 // d needs both a getter and a setter. Then we produce: 50 // d needs both a getter and a setter. Then we produce:
51 // - a constructor (directly into the given [buffer]): 51 // - a constructor (directly into the given [buffer]):
52 // function A(b, c, d) { this.b = b, this.c = c, this.d = d; } 52 // function A(b, c, d) { this.b = b, this.c = c, this.d = d; }
53 // - getters and setters (stored in the [explicitGettersSetters] list): 53 // - getters and setters (stored in the [explicitGettersSetters] list):
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 new jsAst.VariableDeclaration('ForceEfficientMap'), 148 new jsAst.VariableDeclaration('ForceEfficientMap'),
149 js.fun([], [])), 149 js.fun([], [])),
150 js('ForceEfficientMap.prototype = this'), 150 js('ForceEfficientMap.prototype = this'),
151 js('new ForceEfficientMap()')])), 151 js('new ForceEfficientMap()')])),
152 js('Isolate.prototype = oldIsolate.prototype'), 152 js('Isolate.prototype = oldIsolate.prototype'),
153 js('Isolate.prototype.constructor = Isolate'), 153 js('Isolate.prototype.constructor = Isolate'),
154 js('Isolate.${namer.isolatePropertiesName} = isolateProperties'), 154 js('Isolate.${namer.isolatePropertiesName} = isolateProperties'),
155 js.return_('Isolate')]); 155 js.return_('Isolate')]);
156 } 156 }
157 } 157 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/js_backend/emitter.dart ('k') | sdk/lib/_internal/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698