| 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 '../elements/elements.dart'; | 7 import '../elements/elements.dart'; |
| 8 import '../elements/entities.dart'; | 8 import '../elements/entities.dart'; |
| 9 import '../elements/types.dart'; | 9 import '../elements/types.dart'; |
| 10 import '../io/source_information.dart'; | 10 import '../io/source_information.dart'; |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 return activationVariables.putIfAbsent(local, () { | 397 return activationVariables.putIfAbsent(local, () { |
| 398 HLocalValue localValue = new HLocalValue(local, commonMasks.nonNullType) | 398 HLocalValue localValue = new HLocalValue(local, commonMasks.nonNullType) |
| 399 ..sourceInformation = sourceInformation; | 399 ..sourceInformation = sourceInformation; |
| 400 builder.graph.entry.addAtExit(localValue); | 400 builder.graph.entry.addAtExit(localValue); |
| 401 return localValue; | 401 return localValue; |
| 402 }); | 402 }); |
| 403 } | 403 } |
| 404 | 404 |
| 405 Local getTypeVariableAsLocal(TypeVariableType type) { | 405 Local getTypeVariableAsLocal(TypeVariableType type) { |
| 406 return typeVariableLocals.putIfAbsent(type, () { | 406 return typeVariableLocals.putIfAbsent(type, () { |
| 407 return new TypeVariableLocal(type, executableContext); | 407 return new TypeVariableLocal(type, executableContext, memberContext); |
| 408 }); | 408 }); |
| 409 } | 409 } |
| 410 | 410 |
| 411 /// Sets the [element] to [value]. If the element is boxed or stored in a | 411 /// Sets the [element] to [value]. If the element is boxed or stored in a |
| 412 /// closure then the method generates code to set the value. | 412 /// closure then the method generates code to set the value. |
| 413 void updateLocal(Local local, HInstruction value, | 413 void updateLocal(Local local, HInstruction value, |
| 414 {SourceInformation sourceInformation}) { | 414 {SourceInformation sourceInformation}) { |
| 415 if (value is HRef) { | 415 if (value is HRef) { |
| 416 HRef ref = value; | 416 HRef ref = value; |
| 417 value = ref.value; | 417 value = ref.value; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 683 final MemberEntity memberContext; | 683 final MemberEntity memberContext; |
| 684 | 684 |
| 685 // Avoid slow Object.hashCode. | 685 // Avoid slow Object.hashCode. |
| 686 final int hashCode = _nextHashCode = (_nextHashCode + 1).toUnsigned(30); | 686 final int hashCode = _nextHashCode = (_nextHashCode + 1).toUnsigned(30); |
| 687 static int _nextHashCode = 0; | 687 static int _nextHashCode = 0; |
| 688 | 688 |
| 689 SyntheticLocal(this.name, this.executableContext, this.memberContext); | 689 SyntheticLocal(this.name, this.executableContext, this.memberContext); |
| 690 | 690 |
| 691 toString() => 'SyntheticLocal($name)'; | 691 toString() => 'SyntheticLocal($name)'; |
| 692 } | 692 } |
| OLD | NEW |