| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 2706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2717 PropertyAttributes JSObject::GetPropertyAttribute(String* key) { | 2717 PropertyAttributes JSObject::GetPropertyAttribute(String* key) { |
| 2718 return GetPropertyAttributeWithReceiver(this, key); | 2718 return GetPropertyAttributeWithReceiver(this, key); |
| 2719 } | 2719 } |
| 2720 | 2720 |
| 2721 | 2721 |
| 2722 bool JSObject::HasElement(uint32_t index) { | 2722 bool JSObject::HasElement(uint32_t index) { |
| 2723 return HasElementWithReceiver(this, index); | 2723 return HasElementWithReceiver(this, index); |
| 2724 } | 2724 } |
| 2725 | 2725 |
| 2726 | 2726 |
| 2727 Smi* JSObject::InterceptorPropertyLookupHint(String* name) { | |
| 2728 // TODO(antonm): Do we want to do any shortcuts for global object? | |
| 2729 if (HasFastProperties()) { | |
| 2730 LookupResult lookup; | |
| 2731 LocalLookupRealNamedProperty(name, &lookup); | |
| 2732 if (lookup.IsValid()) { | |
| 2733 if (lookup.type() == FIELD && lookup.IsCacheable()) { | |
| 2734 return Smi::FromInt(lookup.GetFieldIndex()); | |
| 2735 } | |
| 2736 } else { | |
| 2737 return Smi::FromInt(kLookupInPrototype); | |
| 2738 } | |
| 2739 } | |
| 2740 | |
| 2741 return Smi::FromInt(kLookupInHolder); | |
| 2742 } | |
| 2743 | |
| 2744 | |
| 2745 bool AccessorInfo::all_can_read() { | 2727 bool AccessorInfo::all_can_read() { |
| 2746 return BooleanBit::get(flag(), kAllCanReadBit); | 2728 return BooleanBit::get(flag(), kAllCanReadBit); |
| 2747 } | 2729 } |
| 2748 | 2730 |
| 2749 | 2731 |
| 2750 void AccessorInfo::set_all_can_read(bool value) { | 2732 void AccessorInfo::set_all_can_read(bool value) { |
| 2751 set_flag(BooleanBit::set(flag(), kAllCanReadBit, value)); | 2733 set_flag(BooleanBit::set(flag(), kAllCanReadBit, value)); |
| 2752 } | 2734 } |
| 2753 | 2735 |
| 2754 | 2736 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2842 #undef WRITE_INT_FIELD | 2824 #undef WRITE_INT_FIELD |
| 2843 #undef READ_SHORT_FIELD | 2825 #undef READ_SHORT_FIELD |
| 2844 #undef WRITE_SHORT_FIELD | 2826 #undef WRITE_SHORT_FIELD |
| 2845 #undef READ_BYTE_FIELD | 2827 #undef READ_BYTE_FIELD |
| 2846 #undef WRITE_BYTE_FIELD | 2828 #undef WRITE_BYTE_FIELD |
| 2847 | 2829 |
| 2848 | 2830 |
| 2849 } } // namespace v8::internal | 2831 } } // namespace v8::internal |
| 2850 | 2832 |
| 2851 #endif // V8_OBJECTS_INL_H_ | 2833 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |