| 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 /// A synthetic local variable only used with the SSA graph. | 7 /// A synthetic local variable only used with the SSA graph. |
| 8 /// | 8 /// |
| 9 /// For instance used for holding return value of function or the exception of a | 9 /// For instance used for holding return value of function or the exception of a |
| 10 /// try-catch statement. | 10 /// try-catch statement. |
| (...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1755 List<FunctionElement> constructors, | 1755 List<FunctionElement> constructors, |
| 1756 Map<Element, HInstruction> fieldValues) { | 1756 Map<Element, HInstruction> fieldValues) { |
| 1757 assert(invariant(constructor, constructor.isImplementation)); | 1757 assert(invariant(constructor, constructor.isImplementation)); |
| 1758 if (constructor.isSynthesized) { | 1758 if (constructor.isSynthesized) { |
| 1759 List<HInstruction> arguments = <HInstruction>[]; | 1759 List<HInstruction> arguments = <HInstruction>[]; |
| 1760 HInstruction compileArgument(ParameterElement parameter) { | 1760 HInstruction compileArgument(ParameterElement parameter) { |
| 1761 return localsHandler.readLocal(parameter); | 1761 return localsHandler.readLocal(parameter); |
| 1762 } | 1762 } |
| 1763 | 1763 |
| 1764 Element target = constructor.definingConstructor.implementation; | 1764 Element target = constructor.definingConstructor.implementation; |
| 1765 Selector.addForwardingElementArgumentsToList( | 1765 bool match = Selector.addForwardingElementArgumentsToList( |
| 1766 constructor, | 1766 constructor, |
| 1767 arguments, | 1767 arguments, |
| 1768 target, | 1768 target, |
| 1769 compileArgument, | 1769 compileArgument, |
| 1770 handleConstantForOptionalParameter, | 1770 handleConstantForOptionalParameter, |
| 1771 compiler); | 1771 compiler); |
| 1772 if (!match) { |
| 1773 // If this fails, the selector we constructed for the call to a |
| 1774 // forwarding constructor in a mixin application did not match the |
| 1775 // constructor (which, for example, may happen when the libraries are |
| 1776 // not compatible for private names, see issue 20394). |
| 1777 compiler.internalError(constructor, |
| 1778 'forwarding constructor call does not match'); |
| 1779 } |
| 1772 inlineSuperOrRedirect( | 1780 inlineSuperOrRedirect( |
| 1773 target, | 1781 target, |
| 1774 arguments, | 1782 arguments, |
| 1775 constructors, | 1783 constructors, |
| 1776 fieldValues, | 1784 fieldValues, |
| 1777 constructor); | 1785 constructor); |
| 1778 return; | 1786 return; |
| 1779 } | 1787 } |
| 1780 ast.FunctionExpression functionNode = constructor.node; | 1788 ast.FunctionExpression functionNode = constructor.node; |
| 1781 | 1789 |
| (...skipping 4637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6419 if (unaliased is TypedefType) throw 'unable to unalias $type'; | 6427 if (unaliased is TypedefType) throw 'unable to unalias $type'; |
| 6420 unaliased.accept(this, builder); | 6428 unaliased.accept(this, builder); |
| 6421 } | 6429 } |
| 6422 | 6430 |
| 6423 void visitDynamicType(DynamicType type, SsaBuilder builder) { | 6431 void visitDynamicType(DynamicType type, SsaBuilder builder) { |
| 6424 JavaScriptBackend backend = builder.compiler.backend; | 6432 JavaScriptBackend backend = builder.compiler.backend; |
| 6425 ClassElement cls = backend.findHelper('DynamicRuntimeType'); | 6433 ClassElement cls = backend.findHelper('DynamicRuntimeType'); |
| 6426 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); | 6434 builder.push(new HDynamicType(type, new TypeMask.exact(cls))); |
| 6427 } | 6435 } |
| 6428 } | 6436 } |
| OLD | NEW |