OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 // bitfield. It is only used as a return value meaning the attributes of | 49 // bitfield. It is only used as a return value meaning the attributes of |
50 // a non-existent property. | 50 // a non-existent property. |
51 }; | 51 }; |
52 | 52 |
53 | 53 |
54 namespace v8 { | 54 namespace v8 { |
55 namespace internal { | 55 namespace internal { |
56 | 56 |
57 class Smi; | 57 class Smi; |
58 template<class> class TypeImpl; | 58 template<class> class TypeImpl; |
59 class HeapTypeConfig; | 59 class ZoneTypeConfig; |
60 typedef TypeImpl<HeapTypeConfig> Type; | 60 typedef TypeImpl<ZoneTypeConfig> Type; |
61 class TypeInfo; | 61 class TypeInfo; |
62 | 62 |
63 // Type of properties. | 63 // Type of properties. |
64 // Order of properties is significant. | 64 // Order of properties is significant. |
65 // Must fit in the BitField PropertyDetails::TypeField. | 65 // Must fit in the BitField PropertyDetails::TypeField. |
66 // A copy of this is in mirror-debugger.js. | 66 // A copy of this is in mirror-debugger.js. |
67 enum PropertyType { | 67 enum PropertyType { |
68 // Only in slow mode. | 68 // Only in slow mode. |
69 NORMAL = 0, | 69 NORMAL = 0, |
70 // Only in fast mode. | 70 // Only in fast mode. |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 static Representation Integer16() { return Representation(kInteger16); } | 106 static Representation Integer16() { return Representation(kInteger16); } |
107 static Representation UInteger16() { return Representation(kUInteger16); } | 107 static Representation UInteger16() { return Representation(kUInteger16); } |
108 static Representation Smi() { return Representation(kSmi); } | 108 static Representation Smi() { return Representation(kSmi); } |
109 static Representation Integer32() { return Representation(kInteger32); } | 109 static Representation Integer32() { return Representation(kInteger32); } |
110 static Representation Double() { return Representation(kDouble); } | 110 static Representation Double() { return Representation(kDouble); } |
111 static Representation HeapObject() { return Representation(kHeapObject); } | 111 static Representation HeapObject() { return Representation(kHeapObject); } |
112 static Representation External() { return Representation(kExternal); } | 112 static Representation External() { return Representation(kExternal); } |
113 | 113 |
114 static Representation FromKind(Kind kind) { return Representation(kind); } | 114 static Representation FromKind(Kind kind) { return Representation(kind); } |
115 | 115 |
116 static Representation FromType(Handle<Type> type); | 116 static Representation FromType(Type* type); |
117 | 117 |
118 bool Equals(const Representation& other) const { | 118 bool Equals(const Representation& other) const { |
119 return kind_ == other.kind_; | 119 return kind_ == other.kind_; |
120 } | 120 } |
121 | 121 |
122 bool IsCompatibleForLoad(const Representation& other) const { | 122 bool IsCompatibleForLoad(const Representation& other) const { |
123 return (IsDouble() && other.IsDouble()) || | 123 return (IsDouble() && other.IsDouble()) || |
124 (!IsDouble() && !other.IsDouble()); | 124 (!IsDouble() && !other.IsDouble()); |
125 } | 125 } |
126 | 126 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 PropertyDetails(int value, PropertyAttributes attributes) { | 317 PropertyDetails(int value, PropertyAttributes attributes) { |
318 value_ = AttributesField::update(value, attributes); | 318 value_ = AttributesField::update(value, attributes); |
319 } | 319 } |
320 | 320 |
321 uint32_t value_; | 321 uint32_t value_; |
322 }; | 322 }; |
323 | 323 |
324 } } // namespace v8::internal | 324 } } // namespace v8::internal |
325 | 325 |
326 #endif // V8_PROPERTY_DETAILS_H_ | 326 #endif // V8_PROPERTY_DETAILS_H_ |
OLD | NEW |