| 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 969 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 980 } | 980 } |
| 981 } | 981 } |
| 982 | 982 |
| 983 if (!foundSuperOrRedirect) { | 983 if (!foundSuperOrRedirect) { |
| 984 // No super initializer found. Try to find the default constructor if | 984 // No super initializer found. Try to find the default constructor if |
| 985 // the class is not Object. | 985 // the class is not Object. |
| 986 ClassElement enclosingClass = constructor.getEnclosingClass(); | 986 ClassElement enclosingClass = constructor.getEnclosingClass(); |
| 987 ClassElement superClass = enclosingClass.superclass; | 987 ClassElement superClass = enclosingClass.superclass; |
| 988 if (enclosingClass != compiler.objectClass) { | 988 if (enclosingClass != compiler.objectClass) { |
| 989 assert(superClass !== null); | 989 assert(superClass !== null); |
| 990 assert(superClass.resolutionState == ClassElement.STATE_DONE); | 990 assert(superClass.resolutionState == STATE_DONE); |
| 991 Selector selector = | 991 Selector selector = |
| 992 new Selector.call(superClass.name, enclosingClass.getLibrary(), 0); | 992 new Selector.call(superClass.name, enclosingClass.getLibrary(), 0); |
| 993 FunctionElement target = superClass.lookupConstructor(superClass.name); | 993 FunctionElement target = superClass.lookupConstructor(superClass.name); |
| 994 if (target === null) { | 994 if (target === null) { |
| 995 compiler.internalError("no default constructor available"); | 995 compiler.internalError("no default constructor available"); |
| 996 } | 996 } |
| 997 inlineSuperOrRedirect(target, | 997 inlineSuperOrRedirect(target, |
| 998 selector, | 998 selector, |
| 999 const EmptyLink<Node>(), | 999 const EmptyLink<Node>(), |
| 1000 constructors, | 1000 constructors, |
| (...skipping 2645 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3646 new HSubGraphBlockInformation(elseBranch.graph)); | 3646 new HSubGraphBlockInformation(elseBranch.graph)); |
| 3647 | 3647 |
| 3648 HBasicBlock conditionStartBlock = conditionBranch.block; | 3648 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 3649 conditionStartBlock.setBlockFlow(info, joinBlock); | 3649 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 3650 SubGraph conditionGraph = conditionBranch.graph; | 3650 SubGraph conditionGraph = conditionBranch.graph; |
| 3651 HIf branch = conditionGraph.end.last; | 3651 HIf branch = conditionGraph.end.last; |
| 3652 assert(branch is HIf); | 3652 assert(branch is HIf); |
| 3653 branch.blockInformation = conditionStartBlock.blockFlow; | 3653 branch.blockInformation = conditionStartBlock.blockFlow; |
| 3654 } | 3654 } |
| 3655 } | 3655 } |
| OLD | NEW |