| 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 3587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3598 Constant constant = handler.compileNodeWithDefinitions(node, elements); | 3598 Constant constant = handler.compileNodeWithDefinitions(node, elements); |
| 3599 stack.add(graph.addConstant(constant)); | 3599 stack.add(graph.addConstant(constant)); |
| 3600 } else { | 3600 } else { |
| 3601 DartType type = elements.getType(node); | 3601 DartType type = elements.getType(node); |
| 3602 if (compiler.enableTypeAssertions && type.isMalformed) { | 3602 if (compiler.enableTypeAssertions && type.isMalformed) { |
| 3603 String reasons = fetchReasonsFromMalformedType(type); | 3603 String reasons = fetchReasonsFromMalformedType(type); |
| 3604 // TODO(johnniwinther): Change to resemble type errors from bounds check | 3604 // TODO(johnniwinther): Change to resemble type errors from bounds check |
| 3605 // on type arguments. | 3605 // on type arguments. |
| 3606 generateRuntimeError(node, '$type is malformed: $reasons'); | 3606 generateRuntimeError(node, '$type is malformed: $reasons'); |
| 3607 } else { | 3607 } else { |
| 3608 // TODO(karlklose): move this type registration to the codegen. |
| 3609 compiler.codegenWorld.instantiatedTypes.add(type); |
| 3608 visitNewSend(node.send, type); | 3610 visitNewSend(node.send, type); |
| 3609 } | 3611 } |
| 3610 } | 3612 } |
| 3611 } | 3613 } |
| 3612 | 3614 |
| 3613 HInvokeDynamicMethod buildInvokeDynamicWithOneArgument( | 3615 HInvokeDynamicMethod buildInvokeDynamicWithOneArgument( |
| 3614 Node node, Selector selector, HInstruction receiver, HInstruction arg0) { | 3616 Node node, Selector selector, HInstruction receiver, HInstruction arg0) { |
| 3615 Set<ClassElement> interceptedClasses = | 3617 Set<ClassElement> interceptedClasses = |
| 3616 getInterceptedClassesOn(node, selector); | 3618 getInterceptedClassesOn(node, selector); |
| 3617 List<HInstruction> inputs = <HInstruction>[]; | 3619 List<HInstruction> inputs = <HInstruction>[]; |
| (...skipping 1445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5063 new HSubGraphBlockInformation(elseBranch.graph)); | 5065 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5064 | 5066 |
| 5065 HBasicBlock conditionStartBlock = conditionBranch.block; | 5067 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5066 conditionStartBlock.setBlockFlow(info, joinBlock); | 5068 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5067 SubGraph conditionGraph = conditionBranch.graph; | 5069 SubGraph conditionGraph = conditionBranch.graph; |
| 5068 HIf branch = conditionGraph.end.last; | 5070 HIf branch = conditionGraph.end.last; |
| 5069 assert(branch is HIf); | 5071 assert(branch is HIf); |
| 5070 branch.blockInformation = conditionStartBlock.blockFlow; | 5072 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5071 } | 5073 } |
| 5072 } | 5074 } |
| OLD | NEW |