| 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 file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'package:js_runtime/shared/embedded_names.dart'; | 5 import 'package:js_runtime/shared/embedded_names.dart'; |
| 6 import 'package:kernel/ast.dart' as ir; | 6 import 'package:kernel/ast.dart' as ir; |
| 7 | 7 |
| 8 import '../closure.dart'; | 8 import '../closure.dart'; |
| 9 import '../common.dart'; | 9 import '../common.dart'; |
| 10 import '../compiler.dart'; | 10 import '../compiler.dart'; |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 @override | 212 @override |
| 213 Local getLocal(ir.VariableDeclaration variable) { | 213 Local getLocal(ir.VariableDeclaration variable) { |
| 214 // If this is a synthetic local, return the synthetic local | 214 // If this is a synthetic local, return the synthetic local |
| 215 if (variable.name == null) { | 215 if (variable.name == null) { |
| 216 return _syntheticLocals.putIfAbsent( | 216 return _syntheticLocals.putIfAbsent( |
| 217 variable, () => new SyntheticLocal("x", null, null)); | 217 variable, () => new SyntheticLocal("x", null, null)); |
| 218 } | 218 } |
| 219 return getElement(variable) as LocalElement; | 219 return getElement(variable) as LocalElement; |
| 220 } | 220 } |
| 221 | 221 |
| 222 FunctionSignature getFunctionSignature(ir.FunctionNode function) { | |
| 223 return getElement(function).asFunctionElement().functionSignature; | |
| 224 } | |
| 225 | |
| 226 // Is the member a lazy initialized static or top-level member? | 222 // Is the member a lazy initialized static or top-level member? |
| 227 bool isLazyStatic(ir.Member member) { | 223 bool isLazyStatic(ir.Member member) { |
| 228 if (member is ir.Field) { | 224 if (member is ir.Field) { |
| 229 FieldElement field = _nodeToElement[member]; | 225 FieldElement field = _nodeToElement[member]; |
| 230 return field.constant == null; | 226 return field.constant == null; |
| 231 } | 227 } |
| 232 return false; | 228 return false; |
| 233 } | 229 } |
| 234 | 230 |
| 235 KernelJumpTarget getJumpTarget(ir.TreeNode node, | 231 KernelJumpTarget getJumpTarget(ir.TreeNode node, |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 632 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { | 628 TypeMask selectorTypeOf(Selector selector, TypeMask mask) { |
| 633 return TypeMaskFactory.inferredTypeForSelector( | 629 return TypeMaskFactory.inferredTypeForSelector( |
| 634 selector, mask, _globalInferenceResults); | 630 selector, mask, _globalInferenceResults); |
| 635 } | 631 } |
| 636 | 632 |
| 637 TypeMask typeFromNativeBehavior( | 633 TypeMask typeFromNativeBehavior( |
| 638 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { | 634 native.NativeBehavior nativeBehavior, ClosedWorld closedWorld) { |
| 639 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); | 635 return TypeMaskFactory.fromNativeBehavior(nativeBehavior, closedWorld); |
| 640 } | 636 } |
| 641 } | 637 } |
| OLD | NEW |