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 3395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3406 // TODO(5347): Try to avoid the need for calling [implementation] before | 3406 // TODO(5347): Try to avoid the need for calling [implementation] before |
3407 // calling [addStaticSendArgumentsToList]. | 3407 // calling [addStaticSendArgumentsToList]. |
3408 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, | 3408 bool succeeded = addStaticSendArgumentsToList(selector, node.arguments, |
3409 element.implementation, | 3409 element.implementation, |
3410 inputs); | 3410 inputs); |
3411 if (!succeeded) { | 3411 if (!succeeded) { |
3412 generateWrongArgumentCountError(node, element, node.arguments); | 3412 generateWrongArgumentCountError(node, element, node.arguments); |
3413 return; | 3413 return; |
3414 } | 3414 } |
3415 | 3415 |
3416 if (element.declaration == compiler.identicalFunction) { | 3416 if (identical(element, compiler.identicalFunction)) { |
3417 pushWithPosition(new HIdentity(target, inputs[1], inputs[2]), node); | 3417 pushWithPosition(new HIdentity(target, inputs[1], inputs[2]), node); |
3418 return; | 3418 return; |
3419 } | 3419 } |
3420 | 3420 |
3421 HInvokeStatic instruction = new HInvokeStatic(inputs); | 3421 HInvokeStatic instruction = new HInvokeStatic(inputs); |
3422 // TODO(ngeoffray): Only do this if knowing the return type is | 3422 // TODO(ngeoffray): Only do this if knowing the return type is |
3423 // useful. | 3423 // useful. |
3424 HType returnType = | 3424 HType returnType = |
3425 builder.backend.optimisticReturnTypesWithRecompilationOnTypeChange( | 3425 builder.backend.optimisticReturnTypesWithRecompilationOnTypeChange( |
3426 work.element, element); | 3426 work.element, element); |
(...skipping 1605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5032 new HSubGraphBlockInformation(elseBranch.graph)); | 5032 new HSubGraphBlockInformation(elseBranch.graph)); |
5033 | 5033 |
5034 HBasicBlock conditionStartBlock = conditionBranch.block; | 5034 HBasicBlock conditionStartBlock = conditionBranch.block; |
5035 conditionStartBlock.setBlockFlow(info, joinBlock); | 5035 conditionStartBlock.setBlockFlow(info, joinBlock); |
5036 SubGraph conditionGraph = conditionBranch.graph; | 5036 SubGraph conditionGraph = conditionBranch.graph; |
5037 HIf branch = conditionGraph.end.last; | 5037 HIf branch = conditionGraph.end.last; |
5038 assert(branch is HIf); | 5038 assert(branch is HIf); |
5039 branch.blockInformation = conditionStartBlock.blockFlow; | 5039 branch.blockInformation = conditionStartBlock.blockFlow; |
5040 } | 5040 } |
5041 } | 5041 } |
OLD | NEW |