| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_TYPES_H_ | 5 #ifndef V8_TYPES_H_ |
| 6 #define V8_TYPES_H_ | 6 #define V8_TYPES_H_ |
| 7 | 7 |
| 8 #include "src/conversions.h" | 8 #include "src/conversions.h" |
| 9 #include "src/handles.h" | 9 #include "src/handles.h" |
| 10 #include "src/objects.h" | 10 #include "src/objects.h" |
| (...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 957 // Lower bounds are considered approximate, correct as necessary. | 957 // Lower bounds are considered approximate, correct as necessary. |
| 958 if (!lower->Is(upper)) lower = upper; | 958 if (!lower->Is(upper)) lower = upper; |
| 959 return Bounds(lower, upper); | 959 return Bounds(lower, upper); |
| 960 } | 960 } |
| 961 | 961 |
| 962 bool Narrows(Bounds that) { | 962 bool Narrows(Bounds that) { |
| 963 return that.lower->Is(this->lower) && this->upper->Is(that.upper); | 963 return that.lower->Is(this->lower) && this->upper->Is(that.upper); |
| 964 } | 964 } |
| 965 }; | 965 }; |
| 966 | 966 |
| 967 class FieldType : public Object { | |
| 968 public: | |
| 969 static FieldType* None(); | |
| 970 static FieldType* Any(); | |
| 971 static Handle<FieldType> None(Isolate* isolate); | |
| 972 static Handle<FieldType> Any(Isolate* isolate); | |
| 973 static FieldType* Class(i::Map* map); | |
| 974 static Handle<FieldType> Class(i::Handle<i::Map> map, Isolate* isolate); | |
| 975 static FieldType* cast(Object* object); | |
| 976 | |
| 977 bool NowContains(Object* value); | |
| 978 bool NowContains(Handle<Object> value); | |
| 979 bool IsClass(); | |
| 980 Handle<i::Map> AsClass(); | |
| 981 bool IsNone() { return this == None(); } | |
| 982 bool IsAny() { return this == Any(); } | |
| 983 bool NowStable(); | |
| 984 bool NowIs(FieldType* other); | |
| 985 bool NowIs(Handle<FieldType> other); | |
| 986 Type* Convert(Zone* zone); | |
| 987 | |
| 988 void PrintTo(std::ostream& os); | |
| 989 }; | |
| 990 | |
| 991 } // namespace internal | 967 } // namespace internal |
| 992 } // namespace v8 | 968 } // namespace v8 |
| 993 | 969 |
| 994 #endif // V8_TYPES_H_ | 970 #endif // V8_TYPES_H_ |
| OLD | NEW |