OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 'dart:collection'; | 5 import 'dart:collection'; |
6 | 6 |
7 import 'package:js_runtime/shared/embedded_names.dart'; | 7 import 'package:js_runtime/shared/embedded_names.dart'; |
8 | 8 |
9 import '../closure.dart'; | 9 import '../closure.dart'; |
10 import '../common.dart'; | 10 import '../common.dart'; |
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 ConstantValue constantValue = | 631 ConstantValue constantValue = |
632 backend.constants.getConstantValue(parameter.constant); | 632 backend.constants.getConstantValue(parameter.constant); |
633 assert(invariant(parameter, constantValue != null, | 633 assert(invariant(parameter, constantValue != null, |
634 message: 'No constant computed for $parameter')); | 634 message: 'No constant computed for $parameter')); |
635 return graph.addConstant(constantValue, closedWorld); | 635 return graph.addConstant(constantValue, closedWorld); |
636 } | 636 } |
637 | 637 |
638 ClassElement get currentNonClosureClass { | 638 ClassElement get currentNonClosureClass { |
639 ClassElement cls = sourceElement.enclosingClass; | 639 ClassElement cls = sourceElement.enclosingClass; |
640 if (cls != null && cls.isClosure) { | 640 if (cls != null && cls.isClosure) { |
641 var closureClass = cls; | 641 dynamic closureClass = cls; |
| 642 // ignore: UNDEFINED_GETTER |
642 return closureClass.methodElement.enclosingClass; | 643 return closureClass.methodElement.enclosingClass; |
643 } else { | 644 } else { |
644 return cls; | 645 return cls; |
645 } | 646 } |
646 } | 647 } |
647 | 648 |
648 /// A stack of [ResolutionDartType]s that have been seen during inlining of | 649 /// A stack of [ResolutionDartType]s that have been seen during inlining of |
649 /// factory constructors. These types are preserved in [HInvokeStatic]s and | 650 /// factory constructors. These types are preserved in [HInvokeStatic]s and |
650 /// [HCreate]s inside the inline code and registered during code generation | 651 /// [HCreate]s inside the inline code and registered during code generation |
651 /// for these nodes. | 652 /// for these nodes. |
(...skipping 6107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6759 this.oldReturnLocal, | 6760 this.oldReturnLocal, |
6760 this.oldReturnType, | 6761 this.oldReturnType, |
6761 this.oldResolvedAst, | 6762 this.oldResolvedAst, |
6762 this.oldStack, | 6763 this.oldStack, |
6763 this.oldLocalsHandler, | 6764 this.oldLocalsHandler, |
6764 this.inTryStatement, | 6765 this.inTryStatement, |
6765 this.allFunctionsCalledOnce, | 6766 this.allFunctionsCalledOnce, |
6766 this.oldElementInferenceResults) | 6767 this.oldElementInferenceResults) |
6767 : super(function); | 6768 : super(function); |
6768 } | 6769 } |
OLD | NEW |