Chromium Code Reviews| 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 3940 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3951 }); | 3951 }); |
| 3952 assert(typeVariable.isEmpty); | 3952 assert(typeVariable.isEmpty); |
| 3953 } | 3953 } |
| 3954 | 3954 |
| 3955 addInlinedInstantiation(expectedType); | 3955 addInlinedInstantiation(expectedType); |
| 3956 pushInvokeStatic(node, constructor, inputs, elementType); | 3956 pushInvokeStatic(node, constructor, inputs, elementType); |
| 3957 removeInlinedInstantiation(expectedType); | 3957 removeInlinedInstantiation(expectedType); |
| 3958 } | 3958 } |
| 3959 HInstruction newInstance = stack.last; | 3959 HInstruction newInstance = stack.last; |
| 3960 if (isFixedList) { | 3960 if (isFixedList) { |
| 3961 // Overwrite the element type, in case the allocation site has | |
| 3962 // been inlined. | |
| 3963 newInstance.instructionType = elementType; | |
|
lukas
2013/11/28 13:06:23
I don't understand this part.
ngeoffray
2013/11/28 13:08:58
It's not related to the bug, just something I disc
| |
| 3961 JavaScriptItemCompilationContext context = work.compilationContext; | 3964 JavaScriptItemCompilationContext context = work.compilationContext; |
| 3962 context.allocatedFixedLists.add(newInstance); | 3965 context.allocatedFixedLists.add(newInstance); |
| 3963 } | 3966 } |
| 3964 | 3967 |
| 3965 // The List constructor forwards to a Dart static method that does | 3968 // The List constructor forwards to a Dart static method that does |
| 3966 // not know about the type argument. Therefore we special case | 3969 // not know about the type argument. Therefore we special case |
| 3967 // this constructor to have the setRuntimeTypeInfo called where | 3970 // this constructor to have the setRuntimeTypeInfo called where |
| 3968 // the 'new' is done. | 3971 // the 'new' is done. |
| 3969 if ((isFixedListConstructorCall || isJSArrayTypedConstructor) && | 3972 if ((isFixedListConstructorCall || isJSArrayTypedConstructor) && |
| 3970 backend.classNeedsRti(compiler.listClass)) { | 3973 backend.classNeedsRti(compiler.listClass)) { |
| (...skipping 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5951 new HSubGraphBlockInformation(elseBranch.graph)); | 5954 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5952 | 5955 |
| 5953 HBasicBlock conditionStartBlock = conditionBranch.block; | 5956 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5954 conditionStartBlock.setBlockFlow(info, joinBlock); | 5957 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5955 SubGraph conditionGraph = conditionBranch.graph; | 5958 SubGraph conditionGraph = conditionBranch.graph; |
| 5956 HIf branch = conditionGraph.end.last; | 5959 HIf branch = conditionGraph.end.last; |
| 5957 assert(branch is HIf); | 5960 assert(branch is HIf); |
| 5958 branch.blockInformation = conditionStartBlock.blockFlow; | 5961 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5959 } | 5962 } |
| 5960 } | 5963 } |
| OLD | NEW |