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

Side by Side Diff: frog/member_set.dart

Issue 9290007: Fixes isolate issue #1329 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: merged Created 8 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 | « client/tests/client/client.status ('k') | frog/minfrog » ('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 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 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 void addMembers(List<Member> members, CallingContext context, Value target, 257 void addMembers(List<Member> members, CallingContext context, Value target,
258 Arguments args) { 258 Arguments args) {
259 // TODO(jimhug): In checked mode include parameter types to determine 259 // TODO(jimhug): In checked mode include parameter types to determine
260 // need for varCall. 260 // need for varCall.
261 for (var member in members) { 261 for (var member in members) {
262 // check that this is a "perfect" match - or require a var call 262 // check that this is a "perfect" match - or require a var call
263 // TODO(jimhug): Add support of "perfect matches" even with names 263 // TODO(jimhug): Add support of "perfect matches" even with names
264 if (!(member.parameters.length == bareArgs && namedArgs == null)) { 264 if (!(member.parameters.length == bareArgs && namedArgs == null)) {
265 needsVarCall = true; 265 needsVarCall = true;
266 } 266 }
267 // TODO(jimhug): Egregious hack for isolates + DOM - see
268 // Value._maybeWrapFunction for more details.
269 if (member.library == world.dom) {
270 for (var p in member.parameters) {
271 if (p.type.getCallMethod() != null) {
272 needsVarCall = true;
273 }
274 }
275 }
276
267 // TODO(jimhug): Should create a less specific version of args. 277 // TODO(jimhug): Should create a less specific version of args.
268 if (member.canInvoke(context, args)) { 278 if (member.canInvoke(context, args)) {
269 if (member.isMethod) { 279 if (member.isMethod) {
270 returnType = MemberSet.unionTypes(returnType, member.returnType); 280 returnType = MemberSet.unionTypes(returnType, member.returnType);
271 member.declaringType.genMethod(member); 281 member.declaringType.genMethod(member);
272 } else { 282 } else {
273 needsVarCall = true; 283 needsVarCall = true;
274 returnType = world.varType; 284 returnType = world.varType;
275 } 285 }
276 } 286 }
277 } 287 }
278 if (returnType == null) { 288 if (returnType == null) {
279 // TODO(jimhug): Warning here for no match anywhere in the world? 289 // TODO(jimhug): Warning here for no match anywhere in the world?
280 returnType = world.varType; 290 returnType = world.varType;
281 } 291 }
282 } 292 }
283 } 293 }
OLDNEW
« no previous file with comments | « client/tests/client/client.status ('k') | frog/minfrog » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698