Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: lib/compiler/implementation/ssa/types.dart

Issue 10880068: - Change "static final" to "static const" in the lib/ directory. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 abstract class HType { 5 abstract class HType {
6 const HType(); 6 const HType();
7 7
8 /** 8 /**
9 * Returns an [HType] that represents [type] and all types that have 9 * Returns an [HType] that represents [type] and all types that have
10 * [type] as supertype. 10 * [type] as supertype.
(...skipping 22 matching lines...) Expand all
33 || Elements.isListSupertype(element, compiler)) { 33 || Elements.isListSupertype(element, compiler)) {
34 return new HBoundedPotentialPrimitiveArray(type, canBeNull); 34 return new HBoundedPotentialPrimitiveArray(type, canBeNull);
35 } else if (Elements.isStringSupertype(element, compiler)) { 35 } else if (Elements.isStringSupertype(element, compiler)) {
36 return new HBoundedPotentialPrimitiveString(type, canBeNull); 36 return new HBoundedPotentialPrimitiveString(type, canBeNull);
37 } else { 37 } else {
38 return canBeNull ? new HBoundedType.withNull(type) 38 return canBeNull ? new HBoundedType.withNull(type)
39 : new HBoundedType.nonNull(type); 39 : new HBoundedType.nonNull(type);
40 } 40 }
41 } 41 }
42 42
43 static final HType CONFLICTING = const HConflictingType(); 43 static const HType CONFLICTING = const HConflictingType();
44 static final HType UNKNOWN = const HUnknownType(); 44 static const HType UNKNOWN = const HUnknownType();
45 static final HType BOOLEAN = const HBooleanType(); 45 static const HType BOOLEAN = const HBooleanType();
46 static final HType NUMBER = const HNumberType(); 46 static const HType NUMBER = const HNumberType();
47 static final HType INTEGER = const HIntegerType(); 47 static const HType INTEGER = const HIntegerType();
48 static final HType DOUBLE = const HDoubleType(); 48 static const HType DOUBLE = const HDoubleType();
49 static final HType INDEXABLE_PRIMITIVE = const HIndexablePrimitiveType(); 49 static const HType INDEXABLE_PRIMITIVE = const HIndexablePrimitiveType();
50 static final HType STRING = const HStringType(); 50 static const HType STRING = const HStringType();
51 static final HType READABLE_ARRAY = const HReadableArrayType(); 51 static const HType READABLE_ARRAY = const HReadableArrayType();
52 static final HType MUTABLE_ARRAY = const HMutableArrayType(); 52 static const HType MUTABLE_ARRAY = const HMutableArrayType();
53 static final HType EXTENDABLE_ARRAY = const HExtendableArrayType(); 53 static const HType EXTENDABLE_ARRAY = const HExtendableArrayType();
54 static final HType NULL = const HNullType(); 54 static const HType NULL = const HNullType();
55 55
56 static final HType BOOLEAN_OR_NULL = const HBooleanOrNullType(); 56 static const HType BOOLEAN_OR_NULL = const HBooleanOrNullType();
57 static final HType NUMBER_OR_NULL = const HNumberOrNullType(); 57 static const HType NUMBER_OR_NULL = const HNumberOrNullType();
58 static final HType INTEGER_OR_NULL = const HIntegerOrNullType(); 58 static const HType INTEGER_OR_NULL = const HIntegerOrNullType();
59 static final HType DOUBLE_OR_NULL = const HDoubleOrNullType(); 59 static const HType DOUBLE_OR_NULL = const HDoubleOrNullType();
60 static final HType STRING_OR_NULL = const HStringOrNullType(); 60 static const HType STRING_OR_NULL = const HStringOrNullType();
61 61
62 bool isConflicting() => this === CONFLICTING; 62 bool isConflicting() => this === CONFLICTING;
63 bool isUnknown() => this === UNKNOWN; 63 bool isUnknown() => this === UNKNOWN;
64 bool isNull() => false; 64 bool isNull() => false;
65 bool isBoolean() => false; 65 bool isBoolean() => false;
66 bool isNumber() => false; 66 bool isNumber() => false;
67 bool isInteger() => false; 67 bool isInteger() => false;
68 bool isDouble() => false; 68 bool isDouble() => false;
69 bool isString() => false; 69 bool isString() => false;
70 bool isBooleanOrNull() => false; 70 bool isBooleanOrNull() => false;
(...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 operator [](HInstruction instruction) { 771 operator [](HInstruction instruction) {
772 HType result = _map[instruction]; 772 HType result = _map[instruction];
773 if (result == null) return instruction.guaranteedType; 773 if (result == null) return instruction.guaranteedType;
774 return result; 774 return result;
775 } 775 }
776 776
777 operator []=(HInstruction instruction, HType value) { 777 operator []=(HInstruction instruction, HType value) {
778 _map[instruction] = value; 778 _map[instruction] = value;
779 } 779 }
780 } 780 }
OLDNEW
« no previous file with comments | « lib/compiler/implementation/ssa/tracer.dart ('k') | lib/compiler/implementation/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698