OLD | NEW |
1 // Copyright 2010 the V8 project authors. All rights reserved. | 1 // Copyright 2010 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 2597 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2608 InlineCacheState ic_state, | 2608 InlineCacheState ic_state, |
2609 ExtraICState extra_ic_state, | 2609 ExtraICState extra_ic_state, |
2610 PropertyType type, | 2610 PropertyType type, |
2611 int argc, | 2611 int argc, |
2612 InlineCacheHolderFlag holder) { | 2612 InlineCacheHolderFlag holder) { |
2613 // Extra IC state is only allowed for monomorphic call IC stubs | 2613 // Extra IC state is only allowed for monomorphic call IC stubs |
2614 // or for store IC stubs. | 2614 // or for store IC stubs. |
2615 ASSERT(extra_ic_state == kNoExtraICState || | 2615 ASSERT(extra_ic_state == kNoExtraICState || |
2616 (kind == CALL_IC && (ic_state == MONOMORPHIC || | 2616 (kind == CALL_IC && (ic_state == MONOMORPHIC || |
2617 ic_state == MONOMORPHIC_PROTOTYPE_FAILURE)) || | 2617 ic_state == MONOMORPHIC_PROTOTYPE_FAILURE)) || |
2618 (kind == STORE_IC)); | 2618 (kind == STORE_IC) || |
| 2619 (kind == KEYED_STORE_IC)); |
2619 // Compute the bit mask. | 2620 // Compute the bit mask. |
2620 int bits = kind << kFlagsKindShift; | 2621 int bits = kind << kFlagsKindShift; |
2621 if (in_loop) bits |= kFlagsICInLoopMask; | 2622 if (in_loop) bits |= kFlagsICInLoopMask; |
2622 bits |= ic_state << kFlagsICStateShift; | 2623 bits |= ic_state << kFlagsICStateShift; |
2623 bits |= type << kFlagsTypeShift; | 2624 bits |= type << kFlagsTypeShift; |
2624 bits |= extra_ic_state << kFlagsExtraICStateShift; | 2625 bits |= extra_ic_state << kFlagsExtraICStateShift; |
2625 bits |= argc << kFlagsArgumentsCountShift; | 2626 bits |= argc << kFlagsArgumentsCountShift; |
2626 if (holder == PROTOTYPE_MAP) bits |= kFlagsCacheInPrototypeMapMask; | 2627 if (holder == PROTOTYPE_MAP) bits |= kFlagsCacheInPrototypeMapMask; |
2627 // Cast to flags and validate result before returning it. | 2628 // Cast to flags and validate result before returning it. |
2628 Flags result = static_cast<Flags>(bits); | 2629 Flags result = static_cast<Flags>(bits); |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3730 Heap::hidden_symbol(), | 3731 Heap::hidden_symbol(), |
3731 &attributes)->ToObjectUnchecked(); | 3732 &attributes)->ToObjectUnchecked(); |
3732 return result; | 3733 return result; |
3733 } | 3734 } |
3734 | 3735 |
3735 | 3736 |
3736 MaybeObject* JSObject::SetHiddenPropertiesObject(Object* hidden_obj) { | 3737 MaybeObject* JSObject::SetHiddenPropertiesObject(Object* hidden_obj) { |
3737 ASSERT(!IsJSGlobalProxy()); | 3738 ASSERT(!IsJSGlobalProxy()); |
3738 return SetPropertyPostInterceptor(Heap::hidden_symbol(), | 3739 return SetPropertyPostInterceptor(Heap::hidden_symbol(), |
3739 hidden_obj, | 3740 hidden_obj, |
3740 DONT_ENUM); | 3741 DONT_ENUM, |
| 3742 kNonStrictMode); |
3741 } | 3743 } |
3742 | 3744 |
3743 | 3745 |
3744 bool JSObject::HasElement(uint32_t index) { | 3746 bool JSObject::HasElement(uint32_t index) { |
3745 return HasElementWithReceiver(this, index); | 3747 return HasElementWithReceiver(this, index); |
3746 } | 3748 } |
3747 | 3749 |
3748 | 3750 |
3749 bool AccessorInfo::all_can_read() { | 3751 bool AccessorInfo::all_can_read() { |
3750 return BooleanBit::get(flag(), kAllCanReadBit); | 3752 return BooleanBit::get(flag(), kAllCanReadBit); |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3931 #undef WRITE_INT_FIELD | 3933 #undef WRITE_INT_FIELD |
3932 #undef READ_SHORT_FIELD | 3934 #undef READ_SHORT_FIELD |
3933 #undef WRITE_SHORT_FIELD | 3935 #undef WRITE_SHORT_FIELD |
3934 #undef READ_BYTE_FIELD | 3936 #undef READ_BYTE_FIELD |
3935 #undef WRITE_BYTE_FIELD | 3937 #undef WRITE_BYTE_FIELD |
3936 | 3938 |
3937 | 3939 |
3938 } } // namespace v8::internal | 3940 } } // namespace v8::internal |
3939 | 3941 |
3940 #endif // V8_OBJECTS_INL_H_ | 3942 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |