Chromium Code Reviews| 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 part of ssa; | 5 part of ssa; |
| 6 | 6 |
| 7 abstract class HVisitor<R> { | 7 abstract class HVisitor<R> { |
| 8 R visitAdd(HAdd node); | 8 R visitAdd(HAdd node); |
| 9 R visitBitAnd(HBitAnd node); | 9 R visitBitAnd(HBitAnd node); |
| 10 R visitBitNot(HBitNot node); | 10 R visitBitNot(HBitNot node); |
| (...skipping 1915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1926 bool isConstantFalse() => constant.isFalse(); | 1926 bool isConstantFalse() => constant.isFalse(); |
| 1927 bool isConstantTrue() => constant.isTrue(); | 1927 bool isConstantTrue() => constant.isTrue(); |
| 1928 bool isConstantSentinel() => constant.isSentinel(); | 1928 bool isConstantSentinel() => constant.isSentinel(); |
| 1929 | 1929 |
| 1930 bool isInterceptor(Compiler compiler) => constant.isInterceptor(); | 1930 bool isInterceptor(Compiler compiler) => constant.isInterceptor(); |
| 1931 | 1931 |
| 1932 // Maybe avoid this if the literal is big? | 1932 // Maybe avoid this if the literal is big? |
| 1933 bool isCodeMotionInvariant() => true; | 1933 bool isCodeMotionInvariant() => true; |
| 1934 | 1934 |
| 1935 set instructionType(type) { | 1935 set instructionType(type) { |
| 1936 assert((type.isEmpty && super.instructionType.isEmpty) | 1936 // Only lists can be specialized. |
|
floitsch
2013/12/19 16:16:29
Please add more information.
ngeoffray
2013/12/19 16:17:52
Done.
| |
| 1937 || !type.isNullable); | 1937 if (!isConstantList()) return; |
| 1938 assert(!isConstantNull() || (type.isEmpty && type.isNullable)); | |
| 1939 super.instructionType = type; | 1938 super.instructionType = type; |
| 1940 } | 1939 } |
| 1941 } | 1940 } |
| 1942 | 1941 |
| 1943 class HNot extends HInstruction { | 1942 class HNot extends HInstruction { |
| 1944 HNot(HInstruction value, TypeMask type) : super(<HInstruction>[value], type) { | 1943 HNot(HInstruction value, TypeMask type) : super(<HInstruction>[value], type) { |
| 1945 setUseGvn(); | 1944 setUseGvn(); |
| 1946 } | 1945 } |
| 1947 | 1946 |
| 1948 accept(HVisitor visitor) => visitor.visitNot(this); | 1947 accept(HVisitor visitor) => visitor.visitNot(this); |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2906 class HDynamicType extends HRuntimeType { | 2905 class HDynamicType extends HRuntimeType { |
| 2907 HDynamicType(DynamicType dartType, TypeMask instructionType) | 2906 HDynamicType(DynamicType dartType, TypeMask instructionType) |
| 2908 : super(const <HInstruction>[], dartType, instructionType); | 2907 : super(const <HInstruction>[], dartType, instructionType); |
| 2909 | 2908 |
| 2910 accept(HVisitor visitor) => visitor.visitDynamicType(this); | 2909 accept(HVisitor visitor) => visitor.visitDynamicType(this); |
| 2911 | 2910 |
| 2912 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; | 2911 int typeCode() => HInstruction.DYNAMIC_TYPE_TYPECODE; |
| 2913 | 2912 |
| 2914 bool typeEquals(HInstruction other) => other is HDynamicType; | 2913 bool typeEquals(HInstruction other) => other is HDynamicType; |
| 2915 } | 2914 } |
| OLD | NEW |