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

Side by Side Diff: frog/member_set.dart

Issue 9465041: Better mangling in frog for fixing parts of issue 1837. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 10 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 | « frog/member.dart ('k') | no next file » | 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 class MemberSet { 5 class MemberSet {
6 final String name; 6 final String name;
7 final List<Member> members; 7 final List<Member> members;
8 final String jsname; 8 final String jsname;
9 final bool isVar; 9 final bool isVar;
10 10
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 if (name == ':index') { 168 if (name == ':index') {
169 world.gen.corejs.useIndex = true; 169 world.gen.corejs.useIndex = true;
170 } else if (name == ':setindex') { 170 } else if (name == ':setindex') {
171 world.gen.corejs.useSetIndex = true; 171 world.gen.corejs.useSetIndex = true;
172 } 172 }
173 return new Value(returnType, '${target.code}.$jsname($argsString)', 173 return new Value(returnType, '${target.code}.$jsname($argsString)',
174 target.span); 174 target.span);
175 } else { 175 } else {
176 if (argsString.length > 0) argsString = ', $argsString'; 176 if (argsString.length > 0) argsString = ', $argsString';
177 world.gen.corejs.useOperator(name); 177 world.gen.corejs.useOperator(name);
178 return new Value(returnType, '\$$jsname(${target.code}$argsString)', 178 return new Value(returnType, '$jsname\$(${target.code}$argsString)',
179 target.span); 179 target.span);
180 } 180 }
181 } 181 }
182 182
183 Value invokeOnVar(CallingContext context, Node node, Value target, 183 Value invokeOnVar(CallingContext context, Node node, Value target,
184 Arguments args) { 184 Arguments args) {
185 context.counters.dynamicMethodCalls++; 185 context.counters.dynamicMethodCalls++;
186 186
187 var member = getVarMember(context, node, args); 187 var member = getVarMember(context, node, args);
188 return member.invoke(context, node, target, args); 188 return member.invoke(context, node, target, args);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 returnType = world.varType; 290 returnType = world.varType;
291 } 291 }
292 } 292 }
293 } 293 }
294 if (returnType == null) { 294 if (returnType == null) {
295 // TODO(jimhug): Warning here for no match anywhere in the world? 295 // TODO(jimhug): Warning here for no match anywhere in the world?
296 returnType = world.varType; 296 returnType = world.varType;
297 } 297 }
298 } 298 }
299 } 299 }
OLDNEW
« no previous file with comments | « frog/member.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698