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

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

Issue 1024893002: Do not emit stubName for static functions. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebased Created 5 years, 8 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/setup_program_builder.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 /// This class should morph into something that makes it easy to build 7 /// This class should morph into something that makes it easy to build
8 /// JavaScript representations of libraries, class-sides, and instance-sides. 8 /// JavaScript representations of libraries, class-sides, and instance-sides.
9 /// Initially, it is just a placeholder for code that is moved from 9 /// Initially, it is just a placeholder for code that is moved from
10 /// [CodeEmitterTask]. 10 /// [CodeEmitterTask].
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 List tearOffInfo = [new jsAst.LiteralString(callSelectorString)]; 110 List tearOffInfo = [new jsAst.LiteralString(callSelectorString)];
111 111
112 for (ParameterStubMethod stub in method.parameterStubs) { 112 for (ParameterStubMethod stub in method.parameterStubs) {
113 String invocationName = stub.name; 113 String invocationName = stub.name;
114 emitter.interceptorEmitter 114 emitter.interceptorEmitter
115 .recordMangledNameOfMemberMethod(member, invocationName); 115 .recordMangledNameOfMemberMethod(member, invocationName);
116 116
117 expressions.add(stub.code); 117 expressions.add(stub.code);
118 if (member.isInstanceMember) { 118 if (member.isInstanceMember) {
119 expressions.add(js.string(invocationName)); 119 expressions.add(js.string(invocationName));
120 } else {
121 // TOOD(floitsch): Since we know when reading static data versus
122 // instance data, we can eliminate this element.
123 expressions.add(js('null'));
124 } 120 }
125 String callName = stub.callName; 121 String callName = stub.callName;
126 String callSelectorString = (callName == null) ? 'null' : '"$callName"'; 122 String callSelectorString = (callName == null) ? 'null' : '"$callName"';
127 tearOffInfo.add(new jsAst.LiteralString(callSelectorString)); 123 tearOffInfo.add(new jsAst.LiteralString(callSelectorString));
128 } 124 }
129 125
130 expressions 126 expressions
131 ..addAll(tearOffInfo) 127 ..addAll(tearOffInfo)
132 ..add((tearOffName == null || member.isAccessor) 128 ..add((tearOffName == null || member.isAccessor)
133 ? js("null") : js.string(tearOffName)) 129 ? js("null") : js.string(tearOffName))
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 jsAst.ArrayInitializer arrayInit = 172 jsAst.ArrayInitializer arrayInit =
177 new jsAst.ArrayInitializer(expressions.toList()); 173 new jsAst.ArrayInitializer(expressions.toList());
178 compiler.dumpInfoTask.registerElementAst(member, 174 compiler.dumpInfoTask.registerElementAst(member,
179 builder.addProperty(name, arrayInit)); 175 builder.addProperty(name, arrayInit));
180 } 176 }
181 177
182 void addMemberField(Field field, ClassBuilder builder) { 178 void addMemberField(Field field, ClassBuilder builder) {
183 // For now, do nothing. 179 // For now, do nothing.
184 } 180 }
185 } 181 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/setup_program_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698