| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
| 4 | 4 |
| 5 import 'package:kernel/ast.dart' as ir; | 5 import 'package:kernel/ast.dart' as ir; |
| 6 import 'package:kernel/frontend/accessors.dart' | 6 import 'package:kernel/frontend/accessors.dart' |
| 7 show | 7 show |
| 8 Accessor, | 8 Accessor, |
| 9 IndexAccessor, | 9 IndexAccessor, |
| 10 NullAwarePropertyAccessor, | 10 NullAwarePropertyAccessor, |
| (...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2018 new ir.VariableDeclaration(local.name, | 2018 new ir.VariableDeclaration(local.name, |
| 2019 initializer: null, | 2019 initializer: null, |
| 2020 type: typeToIrHack(local.type), | 2020 type: typeToIrHack(local.type), |
| 2021 isFinal: isFinal, | 2021 isFinal: isFinal, |
| 2022 isConst: local.isConst), | 2022 isConst: local.isConst), |
| 2023 local); | 2023 local); |
| 2024 }); | 2024 }); |
| 2025 } | 2025 } |
| 2026 | 2026 |
| 2027 ir.FunctionNode buildFunctionNode(FunctionElement function, Node bodyNode) { | 2027 ir.FunctionNode buildFunctionNode(FunctionElement function, Node bodyNode) { |
| 2028 List<ir.TypeParameter> typeParameters = | 2028 List<ir.TypeParameter> typeParameters = <ir.TypeParameter>[]; |
| 2029 kernel.typeParametersNotImplemented(); | |
| 2030 List<ir.VariableDeclaration> positionalParameters = | 2029 List<ir.VariableDeclaration> positionalParameters = |
| 2031 <ir.VariableDeclaration>[]; | 2030 <ir.VariableDeclaration>[]; |
| 2032 List<ir.VariableDeclaration> namedParameters = <ir.VariableDeclaration>[]; | 2031 List<ir.VariableDeclaration> namedParameters = <ir.VariableDeclaration>[]; |
| 2033 int requiredParameterCount = 0; | 2032 int requiredParameterCount = 0; |
| 2034 ir.DartType returnType = const ir.DynamicType(); | 2033 ir.DartType returnType = const ir.DynamicType(); |
| 2035 if (function.hasFunctionSignature) { | 2034 if (function.hasFunctionSignature) { |
| 2036 FunctionSignature signature = function.functionSignature; | 2035 FunctionSignature signature = function.functionSignature; |
| 2037 requiredParameterCount = signature.requiredParameterCount; | 2036 requiredParameterCount = signature.requiredParameterCount; |
| 2038 signature.forEachParameter((ParameterElement parameter) { | 2037 signature.forEachParameter((ParameterElement parameter) { |
| 2039 ir.VariableDeclaration variable = getLocal(parameter); | 2038 ir.VariableDeclaration variable = getLocal(parameter); |
| (...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2847 : this(null, true, node, initializers); | 2846 : this(null, true, node, initializers); |
| 2848 | 2847 |
| 2849 accept(ir.Visitor v) => throw "unsupported"; | 2848 accept(ir.Visitor v) => throw "unsupported"; |
| 2850 | 2849 |
| 2851 visitChildren(ir.Visitor v) => throw "unsupported"; | 2850 visitChildren(ir.Visitor v) => throw "unsupported"; |
| 2852 | 2851 |
| 2853 String toString() { | 2852 String toString() { |
| 2854 return "IrFunction($kind, $isConstructor, $node, $initializers)"; | 2853 return "IrFunction($kind, $isConstructor, $node, $initializers)"; |
| 2855 } | 2854 } |
| 2856 } | 2855 } |
| OLD | NEW |