| 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 '../constants/expressions.dart'; | 9 import '../constants/expressions.dart'; |
| 10 import '../dart_types.dart'; | 10 import '../dart_types.dart'; |
| 11 import '../dart2jslib.dart'; | 11 import '../dart2jslib.dart'; |
| 12 import '../elements/elements.dart'; | 12 import '../elements/elements.dart'; |
| 13 import '../elements/modelx.dart' show SynthesizedConstructorElementX, | 13 import '../elements/modelx.dart' show SynthesizedConstructorElementX, |
| 14 ConstructorBodyElementX, FunctionSignatureX; | 14 ConstructorBodyElementX, FunctionSignatureX; |
| 15 import '../io/source_information.dart'; | 15 import '../io/source_information.dart'; |
| 16 import '../js_backend/js_backend.dart' show JavaScriptBackend, | 16 import '../js_backend/js_backend.dart' show JavaScriptBackend, |
| 17 SyntheticConstantKind; | 17 SyntheticConstantKind; |
| 18 import '../resolution/resolution.dart' show TreeElements; | |
| 19 import '../resolution/semantic_visitor.dart'; | 18 import '../resolution/semantic_visitor.dart'; |
| 20 import '../resolution/operators.dart' as op; | 19 import '../resolution/operators.dart' as op; |
| 21 import '../tree/tree.dart' as ast; | 20 import '../tree/tree.dart' as ast; |
| 22 import '../types/types.dart' show TypeMask; | 21 import '../types/types.dart' show TypeMask; |
| 23 import '../universe/universe.dart' show | 22 import '../universe/universe.dart' show SelectorKind, CallStructure; |
| 24 CallStructure, | |
| 25 Selector, | |
| 26 SelectorKind; | |
| 27 import '../constants/values.dart' show ConstantValue; | 23 import '../constants/values.dart' show ConstantValue; |
| 28 import 'cps_ir_nodes.dart' as ir; | 24 import 'cps_ir_nodes.dart' as ir; |
| 29 import 'cps_ir_builder.dart'; | 25 import 'cps_ir_builder.dart'; |
| 30 import '../native/native.dart' show NativeBehavior; | 26 import '../native/native.dart' show NativeBehavior; |
| 31 | 27 |
| 32 // TODO(karlklose): remove. | 28 // TODO(karlklose): remove. |
| 33 import '../js/js.dart' as js show js, Template, Expression, Name; | 29 import '../js/js.dart' as js show js, Template, Expression, Name; |
| 34 import '../ssa/ssa.dart' show TypeMaskFactory; | 30 import '../ssa/ssa.dart' show TypeMaskFactory; |
| 31 import '../types/types.dart' show TypeMask; |
| 35 import '../util/util.dart'; | 32 import '../util/util.dart'; |
| 36 | 33 |
| 37 import 'package:js_runtime/shared/embedded_names.dart' | 34 import 'package:js_runtime/shared/embedded_names.dart' |
| 38 show JsBuiltin, JsGetName; | 35 show JsBuiltin, JsGetName; |
| 39 import '../constants/values.dart'; | 36 import '../constants/values.dart'; |
| 40 | 37 |
| 41 typedef void IrBuilderCallback(Element element, ir.FunctionDefinition irNode); | 38 typedef void IrBuilderCallback(Element element, ir.FunctionDefinition irNode); |
| 42 | 39 |
| 43 /// This task provides the interface to build IR nodes from [ast.Node]s, which | 40 /// This task provides the interface to build IR nodes from [ast.Node]s, which |
| 44 /// is used from the [CpsFunctionCompiler] to generate code. | 41 /// is used from the [CpsFunctionCompiler] to generate code. |
| (...skipping 3305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3350 if (compiler.backend.isForeign(function)) { | 3347 if (compiler.backend.isForeign(function)) { |
| 3351 return handleForeignCode(node, function, argumentList, callStructure); | 3348 return handleForeignCode(node, function, argumentList, callStructure); |
| 3352 } else { | 3349 } else { |
| 3353 return irBuilder.buildStaticFunctionInvocation(function, callStructure, | 3350 return irBuilder.buildStaticFunctionInvocation(function, callStructure, |
| 3354 translateStaticArguments(argumentList, function, callStructure), | 3351 translateStaticArguments(argumentList, function, callStructure), |
| 3355 sourceInformation: | 3352 sourceInformation: |
| 3356 sourceInformationBuilder.buildCall(node, node.selector)); | 3353 sourceInformationBuilder.buildCall(node, node.selector)); |
| 3357 } | 3354 } |
| 3358 } | 3355 } |
| 3359 } | 3356 } |
| OLD | NEW |