OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 7271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7282 | 7282 |
7283 PropertyAttributes AccessorInfo::property_attributes() { | 7283 PropertyAttributes AccessorInfo::property_attributes() { |
7284 return AttributesField::decode(static_cast<uint32_t>(flag())); | 7284 return AttributesField::decode(static_cast<uint32_t>(flag())); |
7285 } | 7285 } |
7286 | 7286 |
7287 | 7287 |
7288 void AccessorInfo::set_property_attributes(PropertyAttributes attributes) { | 7288 void AccessorInfo::set_property_attributes(PropertyAttributes attributes) { |
7289 set_flag(AttributesField::update(flag(), attributes)); | 7289 set_flag(AttributesField::update(flag(), attributes)); |
7290 } | 7290 } |
7291 | 7291 |
| 7292 bool FunctionTemplateInfo::IsTemplateFor(JSObject* object) { |
| 7293 return IsTemplateFor(object->map()); |
| 7294 } |
7292 | 7295 |
7293 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { | 7296 bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { |
7294 if (!HasExpectedReceiverType()) return true; | 7297 if (!HasExpectedReceiverType()) return true; |
7295 if (!receiver->IsJSObject()) return false; | 7298 if (!receiver->IsJSObject()) return false; |
7296 return FunctionTemplateInfo::cast(expected_receiver_type()) | 7299 return FunctionTemplateInfo::cast(expected_receiver_type()) |
7297 ->IsTemplateFor(JSObject::cast(receiver)->map()); | 7300 ->IsTemplateFor(JSObject::cast(receiver)->map()); |
7298 } | 7301 } |
7299 | 7302 |
7300 | 7303 |
7301 bool AccessorInfo::HasExpectedReceiverType() { | 7304 bool AccessorInfo::HasExpectedReceiverType() { |
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7909 #undef WRITE_INT64_FIELD | 7912 #undef WRITE_INT64_FIELD |
7910 #undef READ_BYTE_FIELD | 7913 #undef READ_BYTE_FIELD |
7911 #undef WRITE_BYTE_FIELD | 7914 #undef WRITE_BYTE_FIELD |
7912 #undef NOBARRIER_READ_BYTE_FIELD | 7915 #undef NOBARRIER_READ_BYTE_FIELD |
7913 #undef NOBARRIER_WRITE_BYTE_FIELD | 7916 #undef NOBARRIER_WRITE_BYTE_FIELD |
7914 | 7917 |
7915 } // namespace internal | 7918 } // namespace internal |
7916 } // namespace v8 | 7919 } // namespace v8 |
7917 | 7920 |
7918 #endif // V8_OBJECTS_INL_H_ | 7921 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |