| 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 '../closure.dart'; | 5 import '../closure.dart'; |
| 6 import '../common.dart'; | 6 import '../common.dart'; |
| 7 import '../compiler.dart' show Compiler; | 7 import '../compiler.dart' show Compiler; |
| 8 import '../dart_types.dart'; | 8 import '../dart_types.dart'; |
| 9 import '../elements/elements.dart'; | 9 import '../elements/elements.dart'; |
| 10 import '../io/source_information.dart'; | 10 import '../io/source_information.dart'; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 if (typeContext != null) { | 78 if (typeContext != null) { |
| 79 type = type.substByContext(contextClass.asInstanceOf(typeContext)); | 79 type = type.substByContext(contextClass.asInstanceOf(typeContext)); |
| 80 } | 80 } |
| 81 } | 81 } |
| 82 if (instanceType != null) { | 82 if (instanceType != null) { |
| 83 type = type.substByContext(instanceType); | 83 type = type.substByContext(instanceType); |
| 84 } | 84 } |
| 85 return type; | 85 return type; |
| 86 } | 86 } |
| 87 | 87 |
| 88 get typesTask => compiler.typesTask; | |
| 89 | |
| 90 /// Creates a new [LocalsHandler] based on [other]. We only need to | 88 /// Creates a new [LocalsHandler] based on [other]. We only need to |
| 91 /// copy the [directLocals], since the other fields can be shared | 89 /// copy the [directLocals], since the other fields can be shared |
| 92 /// throughout the AST visit. | 90 /// throughout the AST visit. |
| 93 LocalsHandler.from(LocalsHandler other) | 91 LocalsHandler.from(LocalsHandler other) |
| 94 : directLocals = new Map<Local, HInstruction>.from(other.directLocals), | 92 : directLocals = new Map<Local, HInstruction>.from(other.directLocals), |
| 95 redirectionMapping = other.redirectionMapping, | 93 redirectionMapping = other.redirectionMapping, |
| 96 executableContext = other.executableContext, | 94 executableContext = other.executableContext, |
| 97 instanceType = other.instanceType, | 95 instanceType = other.instanceType, |
| 98 builder = other.builder, | 96 builder = other.builder, |
| 99 closureData = other.closureData, | 97 closureData = other.closureData, |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 648 return cachedTypesOfCapturedVariables.putIfAbsent(element, () { | 646 return cachedTypesOfCapturedVariables.putIfAbsent(element, () { |
| 649 return TypeMaskFactory.inferredTypeForElement(element, compiler); | 647 return TypeMaskFactory.inferredTypeForElement(element, compiler); |
| 650 }); | 648 }); |
| 651 } | 649 } |
| 652 | 650 |
| 653 /// Variables stored in the current activation. These variables are | 651 /// Variables stored in the current activation. These variables are |
| 654 /// being updated in try/catch blocks, and should be | 652 /// being updated in try/catch blocks, and should be |
| 655 /// accessed indirectly through [HLocalGet] and [HLocalSet]. | 653 /// accessed indirectly through [HLocalGet] and [HLocalSet]. |
| 656 Map<Local, HLocalValue> activationVariables = <Local, HLocalValue>{}; | 654 Map<Local, HLocalValue> activationVariables = <Local, HLocalValue>{}; |
| 657 } | 655 } |
| OLD | NEW |