| OLD | NEW |
| 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 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 /** | 7 /** |
| 8 * A special element for the extra parameter taken by intercepted | 8 * A special element for the extra parameter taken by intercepted |
| 9 * methods. We need to override [Element.computeType] because our | 9 * methods. We need to override [Element.computeType] because our |
| 10 * optimizers may look at its declared type. | 10 * optimizers may look at its declared type. |
| (...skipping 3139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3150 | 3150 |
| 3151 String internalName = backend.namer.instanceMethodInvocationName( | 3151 String internalName = backend.namer.instanceMethodInvocationName( |
| 3152 currentLibrary, name, selector); | 3152 currentLibrary, name, selector); |
| 3153 Constant internalNameConstant = | 3153 Constant internalNameConstant = |
| 3154 constantSystem.createString(new DartString.literal(internalName), node); | 3154 constantSystem.createString(new DartString.literal(internalName), node); |
| 3155 | 3155 |
| 3156 Element createInvocationMirror = | 3156 Element createInvocationMirror = |
| 3157 compiler.findHelper(Compiler.CREATE_INVOCATION_MIRROR); | 3157 compiler.findHelper(Compiler.CREATE_INVOCATION_MIRROR); |
| 3158 | 3158 |
| 3159 var arguments = new List<HInstruction>(); | 3159 var arguments = new List<HInstruction>(); |
| 3160 addGenericSendArgumentsToList(node.arguments, arguments); | 3160 if (node.argumentsNode != null) { |
| 3161 addGenericSendArgumentsToList(node.arguments, arguments); |
| 3162 } |
| 3161 var argumentsInstruction = new HLiteralList(arguments); | 3163 var argumentsInstruction = new HLiteralList(arguments); |
| 3162 add(argumentsInstruction); | 3164 add(argumentsInstruction); |
| 3163 | 3165 |
| 3164 var argumentNames = new List<HInstruction>(); | 3166 var argumentNames = new List<HInstruction>(); |
| 3165 for (SourceString argumentName in selector.namedArguments) { | 3167 for (SourceString argumentName in selector.namedArguments) { |
| 3166 Constant argumentNameConstant = | 3168 Constant argumentNameConstant = |
| 3167 constantSystem.createString(new DartString.literal( | 3169 constantSystem.createString(new DartString.literal( |
| 3168 argumentName.slowToString()), node); | 3170 argumentName.slowToString()), node); |
| 3169 argumentNames.add(graph.addConstant(argumentNameConstant)); | 3171 argumentNames.add(graph.addConstant(argumentNameConstant)); |
| 3170 } | 3172 } |
| (...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5065 new HSubGraphBlockInformation(elseBranch.graph)); | 5067 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5066 | 5068 |
| 5067 HBasicBlock conditionStartBlock = conditionBranch.block; | 5069 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5068 conditionStartBlock.setBlockFlow(info, joinBlock); | 5070 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5069 SubGraph conditionGraph = conditionBranch.graph; | 5071 SubGraph conditionGraph = conditionBranch.graph; |
| 5070 HIf branch = conditionGraph.end.last; | 5072 HIf branch = conditionGraph.end.last; |
| 5071 assert(branch is HIf); | 5073 assert(branch is HIf); |
| 5072 branch.blockInformation = conditionStartBlock.blockFlow; | 5074 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5073 } | 5075 } |
| 5074 } | 5076 } |
| OLD | NEW |