| 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 class Interceptors { | 5 class Interceptors { |
| 6 Compiler compiler; | 6 Compiler compiler; |
| 7 Interceptors(Compiler this.compiler); | 7 Interceptors(Compiler this.compiler); |
| 8 | 8 |
| 9 SourceString mapOperatorToMethodName(Operator op) { | 9 SourceString mapOperatorToMethodName(Operator op) { |
| 10 String name = op.source.stringValue; | 10 String name = op.source.stringValue; |
| (...skipping 970 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 981 } | 981 } |
| 982 } | 982 } |
| 983 | 983 |
| 984 if (!foundSuperOrRedirect) { | 984 if (!foundSuperOrRedirect) { |
| 985 // No super initializer found. Try to find the default constructor if | 985 // No super initializer found. Try to find the default constructor if |
| 986 // the class is not Object. | 986 // the class is not Object. |
| 987 ClassElement enclosingClass = constructor.getEnclosingClass(); | 987 ClassElement enclosingClass = constructor.getEnclosingClass(); |
| 988 ClassElement superClass = enclosingClass.superclass; | 988 ClassElement superClass = enclosingClass.superclass; |
| 989 if (enclosingClass != compiler.objectClass) { | 989 if (enclosingClass != compiler.objectClass) { |
| 990 assert(superClass !== null); | 990 assert(superClass !== null); |
| 991 assert(superClass.isResolved); | 991 assert(superClass.resolutionState == ClassElement.STATE_DONE); |
| 992 FunctionElement target = superClass.lookupConstructor(superClass.name); | 992 FunctionElement target = superClass.lookupConstructor(superClass.name); |
| 993 if (target === null) { | 993 if (target === null) { |
| 994 compiler.internalError("no default constructor available"); | 994 compiler.internalError("no default constructor available"); |
| 995 } | 995 } |
| 996 inlineSuperOrRedirect(target, | 996 inlineSuperOrRedirect(target, |
| 997 Selector.INVOCATION_0, | 997 Selector.INVOCATION_0, |
| 998 const EmptyLink<Node>(), | 998 const EmptyLink<Node>(), |
| 999 constructors, | 999 constructors, |
| 1000 fieldValues); | 1000 fieldValues); |
| 1001 } | 1001 } |
| (...skipping 2612 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3614 new HSubGraphBlockInformation(elseBranch.graph)); | 3614 new HSubGraphBlockInformation(elseBranch.graph)); |
| 3615 | 3615 |
| 3616 HBasicBlock conditionStartBlock = conditionBranch.block; | 3616 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 3617 conditionStartBlock.setBlockFlow(info, joinBlock); | 3617 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 3618 SubGraph conditionGraph = conditionBranch.graph; | 3618 SubGraph conditionGraph = conditionBranch.graph; |
| 3619 HIf branch = conditionGraph.end.last; | 3619 HIf branch = conditionGraph.end.last; |
| 3620 assert(branch is HIf); | 3620 assert(branch is HIf); |
| 3621 branch.blockInformation = conditionStartBlock.blockFlow; | 3621 branch.blockInformation = conditionStartBlock.blockFlow; |
| 3622 } | 3622 } |
| 3623 } | 3623 } |
| OLD | NEW |