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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 | 101 |
102 bool Equals(const Representation& other) const { | 102 bool Equals(const Representation& other) const { |
103 return kind_ == other.kind_; | 103 return kind_ == other.kind_; |
104 } | 104 } |
105 | 105 |
106 bool IsCompatibleForLoad(const Representation& other) const { | 106 bool IsCompatibleForLoad(const Representation& other) const { |
107 return (IsDouble() && other.IsDouble()) || | 107 return (IsDouble() && other.IsDouble()) || |
108 (!IsDouble() && !other.IsDouble()); | 108 (!IsDouble() && !other.IsDouble()); |
109 } | 109 } |
110 | 110 |
111 bool IsCompatibleForStore(const Representation& other) const { | |
112 return Equals(other); | |
113 } | |
114 | |
115 bool is_more_general_than(const Representation& other) const { | 111 bool is_more_general_than(const Representation& other) const { |
116 ASSERT(kind_ != kExternal); | 112 ASSERT(kind_ != kExternal); |
117 ASSERT(other.kind_ != kExternal); | 113 ASSERT(other.kind_ != kExternal); |
118 return kind_ > other.kind_; | 114 return kind_ > other.kind_; |
119 } | 115 } |
120 | 116 |
121 bool fits_into(const Representation& other) const { | 117 bool fits_into(const Representation& other) const { |
122 return other.is_more_general_than(*this) || other.Equals(*this); | 118 return other.is_more_general_than(*this) || other.Equals(*this); |
123 } | 119 } |
124 | 120 |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 value_ = RepresentationField::update( | 235 value_ = RepresentationField::update( |
240 value, EncodeRepresentation(representation)); | 236 value, EncodeRepresentation(representation)); |
241 } | 237 } |
242 | 238 |
243 uint32_t value_; | 239 uint32_t value_; |
244 }; | 240 }; |
245 | 241 |
246 } } // namespace v8::internal | 242 } } // namespace v8::internal |
247 | 243 |
248 #endif // V8_PROPERTY_DETAILS_H_ | 244 #endif // V8_PROPERTY_DETAILS_H_ |
OLD | NEW |