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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
106 return Representation(kUInteger16); | 106 return Representation(kUInteger16); |
107 } | 107 } |
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 // TODO(rossberg): this should die eventually. | |
rossberg
2013/12/16 09:21:13
Yes!
| |
117 static Representation FromType(TypeInfo info); | |
118 static Representation FromType(Handle<Type> type); | 116 static Representation FromType(Handle<Type> type); |
119 | 117 |
120 bool Equals(const Representation& other) const { | 118 bool Equals(const Representation& other) const { |
121 return kind_ == other.kind_; | 119 return kind_ == other.kind_; |
122 } | 120 } |
123 | 121 |
124 bool IsCompatibleForLoad(const Representation& other) const { | 122 bool IsCompatibleForLoad(const Representation& other) const { |
125 return (IsDouble() && other.IsDouble()) || | 123 return (IsDouble() && other.IsDouble()) || |
126 (!IsDouble() && !other.IsDouble()); | 124 (!IsDouble() && !other.IsDouble()); |
127 } | 125 } |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
319 PropertyDetails(int value, PropertyAttributes attributes) { | 317 PropertyDetails(int value, PropertyAttributes attributes) { |
320 value_ = AttributesField::update(value, attributes); | 318 value_ = AttributesField::update(value, attributes); |
321 } | 319 } |
322 | 320 |
323 uint32_t value_; | 321 uint32_t value_; |
324 }; | 322 }; |
325 | 323 |
326 } } // namespace v8::internal | 324 } } // namespace v8::internal |
327 | 325 |
328 #endif // V8_PROPERTY_DETAILS_H_ | 326 #endif // V8_PROPERTY_DETAILS_H_ |
OLD | NEW |