| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library dart2js.ir_builder_task; | 5 library dart2js.ir_builder_task; |
| 6 | 6 |
| 7 import '../closure.dart' as closurelib; | 7 import '../closure.dart' as closurelib; |
| 8 import '../closure.dart' hide ClosureScope; | 8 import '../closure.dart' hide ClosureScope; |
| 9 import '../common/names.dart' show | 9 import '../common/names.dart' show |
| 10 Names, | 10 Names, |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 String bailoutMessage = null; | 68 String bailoutMessage = null; |
| 69 | 69 |
| 70 /// If not null, this function will be called with for each | 70 /// If not null, this function will be called with for each |
| 71 /// [ir.FunctionDefinition] node that has been built. | 71 /// [ir.FunctionDefinition] node that has been built. |
| 72 IrBuilderCallback builderCallback; | 72 IrBuilderCallback builderCallback; |
| 73 | 73 |
| 74 IrBuilderTask(Compiler compiler, this.sourceInformationStrategy, | 74 IrBuilderTask(Compiler compiler, this.sourceInformationStrategy, |
| 75 [this.builderCallback]) | 75 [this.builderCallback]) |
| 76 : super(compiler); | 76 : super(compiler); |
| 77 | 77 |
| 78 String get name => 'IR builder'; | 78 String get name => 'CPS builder'; |
| 79 | 79 |
| 80 ir.FunctionDefinition buildNode(AstElement element) { | 80 ir.FunctionDefinition buildNode(AstElement element) { |
| 81 return measure(() { | 81 return measure(() { |
| 82 bailoutMessage = null; | 82 bailoutMessage = null; |
| 83 | 83 |
| 84 TreeElements elementsMapping = element.resolvedAst.elements; | 84 TreeElements elementsMapping = element.resolvedAst.elements; |
| 85 element = element.implementation; | 85 element = element.implementation; |
| 86 return compiler.withCurrentElement(element, () { | 86 return compiler.withCurrentElement(element, () { |
| 87 SourceInformationBuilder sourceInformationBuilder = | 87 SourceInformationBuilder sourceInformationBuilder = |
| 88 sourceInformationStrategy.createBuilderForContext(element); | 88 sourceInformationStrategy.createBuilderForContext(element); |
| (...skipping 3481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3570 if (compiler.backend.isForeign(function)) { | 3570 if (compiler.backend.isForeign(function)) { |
| 3571 return handleForeignCode(node, function, argumentList, callStructure); | 3571 return handleForeignCode(node, function, argumentList, callStructure); |
| 3572 } else { | 3572 } else { |
| 3573 return irBuilder.buildStaticFunctionInvocation(function, callStructure, | 3573 return irBuilder.buildStaticFunctionInvocation(function, callStructure, |
| 3574 translateStaticArguments(argumentList, function, callStructure), | 3574 translateStaticArguments(argumentList, function, callStructure), |
| 3575 sourceInformation: | 3575 sourceInformation: |
| 3576 sourceInformationBuilder.buildCall(node, node.selector)); | 3576 sourceInformationBuilder.buildCall(node, node.selector)); |
| 3577 } | 3577 } |
| 3578 } | 3578 } |
| 3579 } | 3579 } |
| OLD | NEW |