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

Side by Side Diff: frog/member.dart

Issue 8567016: Fix a spurious warning in Frog selfhost (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: updated Created 9 years, 1 month 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/frogsh ('k') | frog/value.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) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 /** A formal parameter to a [Method]. */ 5 /** A formal parameter to a [Method]. */
6 class Parameter { 6 class Parameter {
7 FormalNode definition; 7 FormalNode definition;
8 8
9 String name; 9 String name;
10 Type type; 10 Type type;
(...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after
1462 return members[0].invoke(context, node, target, args, isDynamic); 1462 return members[0].invoke(context, node, target, args, isDynamic);
1463 } 1463 }
1464 final targets = members.filter((m) => m.canInvoke(context, args)); 1464 final targets = members.filter((m) => m.canInvoke(context, args));
1465 if (targets.length == 1) { 1465 if (targets.length == 1) {
1466 return targets[0].invoke(context, node, target, args, isDynamic); 1466 return targets[0].invoke(context, node, target, args, isDynamic);
1467 } 1467 }
1468 1468
1469 Value returnValue = null; 1469 Value returnValue = null;
1470 for (var member in targets) { 1470 for (var member in targets) {
1471 final res = member.invoke(context, node, target, args, isDynamic:true); 1471 final res = member.invoke(context, node, target, args, isDynamic:true);
1472 // TODO(jmesserly): If the code has different type checks, it will fail to
1473 // unify and go through a dynamic stub. Good so far. However, we'll end
1474 // up with a bogus unused temp generated (usually "var $0"). We need a way
1475 // to throw away temps when we throw away the code.
1472 returnValue = _tryUnion(returnValue, res, node); 1476 returnValue = _tryUnion(returnValue, res, node);
1473 } 1477 }
1474 1478
1475 if (returnValue == null) { 1479 if (returnValue == null) {
1476 return _makeError(node, target, 'method'); 1480 return _makeError(node, target, 'method');
1477 } 1481 }
1478 1482
1479 if (returnValue.code == null) { 1483 if (returnValue.code == null) {
1480 // TODO(jmesserly): make operators less special. 1484 // TODO(jmesserly): make operators less special.
1481 if (isOperator) { 1485 if (isOperator) {
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 } 1619 }
1616 1620
1617 void forEach(void f(Member member)) { 1621 void forEach(void f(Member member)) {
1618 factories.forEach((_, Map constructors) { 1622 factories.forEach((_, Map constructors) {
1619 constructors.forEach((_, Member member) { 1623 constructors.forEach((_, Member member) {
1620 f(member); 1624 f(member);
1621 }); 1625 });
1622 }); 1626 });
1623 } 1627 }
1624 } 1628 }
OLDNEW
« no previous file with comments | « frog/frogsh ('k') | frog/value.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698