| 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 3362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3373 } else if (Elements.isGrowableListConstructorCall( | 3373 } else if (Elements.isGrowableListConstructorCall( |
| 3374 originalElement, send, compiler)) { | 3374 originalElement, send, compiler)) { |
| 3375 isListConstructor = true; | 3375 isListConstructor = true; |
| 3376 HType inferred = | 3376 HType inferred = |
| 3377 new HType.inferredForNode(currentElement, send, compiler); | 3377 new HType.inferredForNode(currentElement, send, compiler); |
| 3378 return inferred.isUnknown() ? backend.extendableArrayType : inferred; | 3378 return inferred.isUnknown() ? backend.extendableArrayType : inferred; |
| 3379 } else if (element.isGenerativeConstructor()) { | 3379 } else if (element.isGenerativeConstructor()) { |
| 3380 ClassElement cls = element.getEnclosingClass(); | 3380 ClassElement cls = element.getEnclosingClass(); |
| 3381 return new HType.nonNullExact(cls.thisType, compiler); | 3381 return new HType.nonNullExact(cls.thisType, compiler); |
| 3382 } else { | 3382 } else { |
| 3383 return new HType.inferredTypeForElement(originalElement, compiler); | 3383 return new HType.inferredReturnTypeForElement( |
| 3384 originalElement, compiler); |
| 3384 } | 3385 } |
| 3385 } | 3386 } |
| 3386 | 3387 |
| 3387 Element constructor = elements[send]; | 3388 Element constructor = elements[send]; |
| 3388 Selector selector = elements.getSelector(send); | 3389 Selector selector = elements.getSelector(send); |
| 3389 if (constructor.isForwardingConstructor) { | 3390 if (constructor.isForwardingConstructor) { |
| 3390 compiler.unimplemented('forwarded constructor in named mixin application', | 3391 compiler.unimplemented('forwarded constructor in named mixin application', |
| 3391 element: constructor.getEnclosingClass()); | 3392 element: constructor.getEnclosingClass()); |
| 3392 } | 3393 } |
| 3393 if (compiler.enqueuer.resolution.getCachedElements(constructor) == null) { | 3394 if (compiler.enqueuer.resolution.getCachedElements(constructor) == null) { |
| (...skipping 2008 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5402 new HSubGraphBlockInformation(elseBranch.graph)); | 5403 new HSubGraphBlockInformation(elseBranch.graph)); |
| 5403 | 5404 |
| 5404 HBasicBlock conditionStartBlock = conditionBranch.block; | 5405 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 5405 conditionStartBlock.setBlockFlow(info, joinBlock); | 5406 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 5406 SubGraph conditionGraph = conditionBranch.graph; | 5407 SubGraph conditionGraph = conditionBranch.graph; |
| 5407 HIf branch = conditionGraph.end.last; | 5408 HIf branch = conditionGraph.end.last; |
| 5408 assert(branch is HIf); | 5409 assert(branch is HIf); |
| 5409 branch.blockInformation = conditionStartBlock.blockFlow; | 5410 branch.blockInformation = conditionStartBlock.blockFlow; |
| 5410 } | 5411 } |
| 5411 } | 5412 } |
| OLD | NEW |