| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 code_generator; | 5 library code_generator; |
| 6 | 6 |
| 7 import 'glue.dart'; | 7 import 'glue.dart'; |
| 8 | 8 |
| 9 import '../../closure.dart' show | 9 import '../../closure.dart' show |
| 10 ClosureClassElement; | 10 ClosureClassElement; |
| 11 import '../../common.dart'; | |
| 12 import '../../common/codegen.dart' show | 11 import '../../common/codegen.dart' show |
| 13 CodegenRegistry; | 12 CodegenRegistry; |
| 14 import '../../constants/values.dart'; | 13 import '../../constants/values.dart'; |
| 15 import '../../dart_types.dart'; | 14 import '../../dart_types.dart'; |
| 16 import '../../elements/elements.dart'; | 15 import '../../elements/elements.dart'; |
| 17 import '../../io/source_information.dart' show | 16 import '../../io/source_information.dart' show |
| 18 SourceInformation; | 17 SourceInformation; |
| 19 import '../../js/js.dart' as js; | 18 import '../../js/js.dart' as js; |
| 20 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir; | 19 import '../../tree_ir/tree_ir_nodes.dart' as tree_ir; |
| 21 import '../../tree_ir/tree_ir_nodes.dart' show | 20 import '../../tree_ir/tree_ir_nodes.dart' show |
| (...skipping 1221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 void registerDefaultParameterValues(ExecutableElement element) { | 1242 void registerDefaultParameterValues(ExecutableElement element) { |
| 1244 if (element is! FunctionElement) return; | 1243 if (element is! FunctionElement) return; |
| 1245 FunctionElement function = element; | 1244 FunctionElement function = element; |
| 1246 if (function.isStatic) return; // Defaults are inlined at call sites. | 1245 if (function.isStatic) return; // Defaults are inlined at call sites. |
| 1247 function.functionSignature.forEachOptionalParameter((param) { | 1246 function.functionSignature.forEachOptionalParameter((param) { |
| 1248 ConstantValue constant = glue.getDefaultParameterValue(param); | 1247 ConstantValue constant = glue.getDefaultParameterValue(param); |
| 1249 registry.registerCompileTimeConstant(constant); | 1248 registry.registerCompileTimeConstant(constant); |
| 1250 }); | 1249 }); |
| 1251 } | 1250 } |
| 1252 } | 1251 } |
| OLD | NEW |