| 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 3413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3424 // TODO(5347): Try to avoid the need for calling [implementation] before | 3424 // TODO(5347): Try to avoid the need for calling [implementation] before |
| 3425 // calling [addStaticSendArgumentsToList]. | 3425 // calling [addStaticSendArgumentsToList]. |
| 3426 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, | 3426 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, |
| 3427 element.implementation, | 3427 element.implementation, |
| 3428 inputs); | 3428 inputs); |
| 3429 if (!succeeded) { | 3429 if (!succeeded) { |
| 3430 generateWrongArgumentCountError(node, element, node.arguments); | 3430 generateWrongArgumentCountError(node, element, node.arguments); |
| 3431 return; | 3431 return; |
| 3432 } | 3432 } |
| 3433 | 3433 |
| 3434 if (identical(element, compiler.identicalFunction)) { | 3434 if (element.declaration == compiler.identicalFunction) { |
| 3435 pushWithPosition(new HIdentity(target, inputs[1], inputs[2]), node); | 3435 pushWithPosition(new HIdentity(target, inputs[1], inputs[2]), node); |
| 3436 return; | 3436 return; |
| 3437 } | 3437 } |
| 3438 | 3438 |
| 3439 HInvokeStatic instruction = new HInvokeStatic(inputs); | 3439 HInvokeStatic instruction = new HInvokeStatic(inputs); |
| 3440 // TODO(ngeoffray): Only do this if knowing the return type is | 3440 // TODO(ngeoffray): Only do this if knowing the return type is |
| 3441 // useful. | 3441 // useful. |
| 3442 HType returnType = | 3442 HType returnType = |
| 3443 builder.backend.optimisticReturnTypesWithRecompilationOnTypeChange( | 3443 builder.backend.optimisticReturnTypesWithRecompilationOnTypeChange( |
| 3444 work.element, element); | 3444 work.element, element); |
| (...skipping 1618 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5063 new HSubGraphBlockInformation(elseBranch.graph)); | 5063 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5064 | 5064 |
| 5065 HBasicBlock conditionStartBlock = conditionBranch.block; | 5065 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5066 conditionStartBlock.setBlockFlow(info, joinBlock); | 5066 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5067 SubGraph conditionGraph = conditionBranch.graph; | 5067 SubGraph conditionGraph = conditionBranch.graph; |
| 5068 HIf branch = conditionGraph.end.last; | 5068 HIf branch = conditionGraph.end.last; |
| 5069 assert(branch is HIf); | 5069 assert(branch is HIf); |
| 5070 branch.blockInformation = conditionStartBlock.blockFlow; | 5070 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5071 } | 5071 } |
| 5072 } | 5072 } |
| OLD | NEW |