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

Side by Side Diff: src/types.h

Issue 1700923002: Move FieldType to separate h/cc files. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « src/property.h ('k') | src/types.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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_
OLDNEW
« no previous file with comments | « src/property.h ('k') | src/types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698