| 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 '../closure.dart'; | 5 import '../closure.dart'; |
| 6 import '../common.dart'; | 6 import '../common.dart'; |
| 7 import '../common/backend_api.dart' show BackendClasses; | 7 import '../common/backend_api.dart' show BackendClasses; |
| 8 import '../compiler.dart' show Compiler; | 8 import '../compiler.dart' show Compiler; |
| 9 import '../constants/constant_system.dart'; | 9 import '../constants/constant_system.dart'; |
| 10 import '../constants/values.dart'; | 10 import '../constants/values.dart'; |
| (...skipping 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1721 } | 1721 } |
| 1722 } | 1722 } |
| 1723 | 1723 |
| 1724 bool isInterceptor(ClosedWorld closedWorld) { | 1724 bool isInterceptor(ClosedWorld closedWorld) { |
| 1725 if (sourceElement == null) return false; | 1725 if (sourceElement == null) return false; |
| 1726 // In case of a closure inside an interceptor class, [:this:] is | 1726 // In case of a closure inside an interceptor class, [:this:] is |
| 1727 // stored in the generated closure class, and accessed through a | 1727 // stored in the generated closure class, and accessed through a |
| 1728 // [HFieldGet]. | 1728 // [HFieldGet]. |
| 1729 if (sourceElement is ThisLocal) { | 1729 if (sourceElement is ThisLocal) { |
| 1730 ThisLocal thisLocal = sourceElement; | 1730 ThisLocal thisLocal = sourceElement; |
| 1731 return closedWorld.backendClasses | 1731 return closedWorld.interceptorData |
| 1732 .isInterceptorClass(thisLocal.enclosingClass); | 1732 .isInterceptorClass(thisLocal.enclosingClass); |
| 1733 } | 1733 } |
| 1734 return false; | 1734 return false; |
| 1735 } | 1735 } |
| 1736 | 1736 |
| 1737 bool canThrow() => receiver.canBeNull(); | 1737 bool canThrow() => receiver.canBeNull(); |
| 1738 | 1738 |
| 1739 HInstruction getDartReceiver(ClosedWorld closedWorld) => receiver; | 1739 HInstruction getDartReceiver(ClosedWorld closedWorld) => receiver; |
| 1740 bool onlyThrowsNSM() => true; | 1740 bool onlyThrowsNSM() => true; |
| 1741 bool get isNullCheck => element == null; | 1741 bool get isNullCheck => element == null; |
| (...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2367 class HThis extends HParameterValue { | 2367 class HThis extends HParameterValue { |
| 2368 HThis(ThisLocal element, TypeMask type) : super(element, type); | 2368 HThis(ThisLocal element, TypeMask type) : super(element, type); |
| 2369 | 2369 |
| 2370 ThisLocal get sourceElement => super.sourceElement; | 2370 ThisLocal get sourceElement => super.sourceElement; |
| 2371 | 2371 |
| 2372 accept(HVisitor visitor) => visitor.visitThis(this); | 2372 accept(HVisitor visitor) => visitor.visitThis(this); |
| 2373 | 2373 |
| 2374 bool isCodeMotionInvariant() => true; | 2374 bool isCodeMotionInvariant() => true; |
| 2375 | 2375 |
| 2376 bool isInterceptor(ClosedWorld closedWorld) { | 2376 bool isInterceptor(ClosedWorld closedWorld) { |
| 2377 return closedWorld.backendClasses | 2377 return closedWorld.interceptorData |
| 2378 .isInterceptorClass(sourceElement.enclosingClass); | 2378 .isInterceptorClass(sourceElement.enclosingClass); |
| 2379 } | 2379 } |
| 2380 | 2380 |
| 2381 String toString() => 'this'; | 2381 String toString() => 'this'; |
| 2382 } | 2382 } |
| 2383 | 2383 |
| 2384 class HPhi extends HInstruction { | 2384 class HPhi extends HInstruction { |
| 2385 static const IS_NOT_LOGICAL_OPERATOR = 0; | 2385 static const IS_NOT_LOGICAL_OPERATOR = 0; |
| 2386 static const IS_AND = 1; | 2386 static const IS_AND = 1; |
| 2387 static const IS_OR = 2; | 2387 static const IS_OR = 2; |
| (...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3500 class HDynamicType extends HRuntimeType { | 3500 class HDynamicType extends HRuntimeType { |
| 3501 HDynamicType(DynamicType dartType, TypeMask instructionType) | 3501 HDynamicType(DynamicType dartType, TypeMask instructionType) |
| 3502 : super(const <HInstruction>[], dartType, instructionType); | 3502 : super(const <HInstruction>[], dartType, instructionType); |
| 3503 | 3503 |
| 3504 accept(HVisitor visitor) => visitor.visitDynamicType(this); | 3504 accept(HVisitor visitor) => visitor.visitDynamicType(this); |
| 3505 | 3505 |
| 3506 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; | 3506 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; |
| 3507 | 3507 |
| 3508 bool typeEquals(HInstruction other) => other is HDynamicType; | 3508 bool typeEquals(HInstruction other) => other is HDynamicType; |
| 3509 } | 3509 } |
| OLD | NEW |