Chromium Code Reviews| Index: pkg/compiler/lib/src/universe/universe.dart |
| diff --git a/pkg/compiler/lib/src/universe/universe.dart b/pkg/compiler/lib/src/universe/universe.dart |
| index a7ddbb03bd91dbda5eafd2af2d45e2c0c780f12d..0b8a40896ac3b4c8e459dc01c42445a6a5840b98 100644 |
| --- a/pkg/compiler/lib/src/universe/universe.dart |
| +++ b/pkg/compiler/lib/src/universe/universe.dart |
| @@ -593,6 +593,21 @@ class Selector { |
| return result; |
| } |
| + /// Returns a copy of [compiledArguments] where named arguments occur in |
| + /// normalized order. |
| + List makeDynamicArgumentsList(List compiledArguments) { |
|
karlklose
2015/02/10 09:07:45
I am not happy with having this helper here. Could
asgerf
2015/02/10 09:37:18
I agree.
I put it here because makeArgumentsList
|
| + assert(compiledArguments.length == argumentCount); |
| + List result = []; |
| + for (int i=0; i<positionalArgumentCount; i++) { |
|
karlklose
2015/02/10 09:07:45
Space around binary operators.
asgerf
2015/02/10 09:37:18
Done.
|
| + result.add(compiledArguments[i]); |
| + } |
| + for (String argName in getOrderedNamedArguments()) { |
| + int nameIndex = namedArguments.indexOf(argName); |
| + int translatedIndex = positionalArgumentCount + nameIndex; |
| + result.add(compiledArguments[translatedIndex]); |
| + } |
| + return result; |
| + } |
| /** |
| * Fills [list] with the arguments in the order expected by |