| 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 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 908 | 908 |
| 909 /** | 909 /** |
| 910 * Documentation wanted -- johnniwinther | 910 * Documentation wanted -- johnniwinther |
| 911 * | 911 * |
| 912 * Invariant: [functionElement] must be an implementation element. | 912 * Invariant: [functionElement] must be an implementation element. |
| 913 */ | 913 */ |
| 914 HGraph buildMethod(FunctionElement functionElement) { | 914 HGraph buildMethod(FunctionElement functionElement) { |
| 915 assert(invariant(functionElement, functionElement.isImplementation)); | 915 assert(invariant(functionElement, functionElement.isImplementation)); |
| 916 FunctionExpression function = functionElement.parseNode(compiler); | 916 FunctionExpression function = functionElement.parseNode(compiler); |
| 917 assert(function !== null); | 917 assert(function !== null); |
| 918 assert(function.modifiers === null || !function.modifiers.isExternal()); | 918 assert(!function.modifiers.isExternal()); |
| 919 assert(elements[function] !== null); | 919 assert(elements[function] !== null); |
| 920 openFunction(functionElement, function); | 920 openFunction(functionElement, function); |
| 921 function.body.accept(this); | 921 function.body.accept(this); |
| 922 return closeFunction(); | 922 return closeFunction(); |
| 923 } | 923 } |
| 924 | 924 |
| 925 HGraph buildLazyInitializer(VariableElement variable) { | 925 HGraph buildLazyInitializer(VariableElement variable) { |
| 926 HBasicBlock block = graph.addNewBlock(); | 926 HBasicBlock block = graph.addNewBlock(); |
| 927 open(graph.entry); | 927 open(graph.entry); |
| 928 close(new HGoto()).addSuccessor(block); | 928 close(new HGoto()).addSuccessor(block); |
| (...skipping 3449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4378 new HSubGraphBlockInformation(elseBranch.graph)); | 4378 new HSubGraphBlockInformation(elseBranch.graph)); |
| 4379 | 4379 |
| 4380 HBasicBlock conditionStartBlock = conditionBranch.block; | 4380 HBasicBlock conditionStartBlock = conditionBranch.block; |
| 4381 conditionStartBlock.setBlockFlow(info, joinBlock); | 4381 conditionStartBlock.setBlockFlow(info, joinBlock); |
| 4382 SubGraph conditionGraph = conditionBranch.graph; | 4382 SubGraph conditionGraph = conditionBranch.graph; |
| 4383 HIf branch = conditionGraph.end.last; | 4383 HIf branch = conditionGraph.end.last; |
| 4384 assert(branch is HIf); | 4384 assert(branch is HIf); |
| 4385 branch.blockInformation = conditionStartBlock.blockFlow; | 4385 branch.blockInformation = conditionStartBlock.blockFlow; |
| 4386 } | 4386 } |
| 4387 } | 4387 } |
| OLD | NEW |