Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(753)

Side by Side Diff: src/objects-inl.h

Issue 6594037: Strict Mode assignment to read only property. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: CR Feedback. Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/objects.cc ('k') | src/parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2601 matching lines...) Expand 10 before | Expand all | Expand 10 after
2612 InlineCacheState ic_state, 2612 InlineCacheState ic_state,
2613 ExtraICState extra_ic_state, 2613 ExtraICState extra_ic_state,
2614 PropertyType type, 2614 PropertyType type,
2615 int argc, 2615 int argc,
2616 InlineCacheHolderFlag holder) { 2616 InlineCacheHolderFlag holder) {
2617 // Extra IC state is only allowed for monomorphic call IC stubs 2617 // Extra IC state is only allowed for monomorphic call IC stubs
2618 // or for store IC stubs. 2618 // or for store IC stubs.
2619 ASSERT(extra_ic_state == kNoExtraICState || 2619 ASSERT(extra_ic_state == kNoExtraICState ||
2620 (kind == CALL_IC && (ic_state == MONOMORPHIC || 2620 (kind == CALL_IC && (ic_state == MONOMORPHIC ||
2621 ic_state == MONOMORPHIC_PROTOTYPE_FAILURE)) || 2621 ic_state == MONOMORPHIC_PROTOTYPE_FAILURE)) ||
2622 (kind == STORE_IC)); 2622 (kind == STORE_IC) ||
2623 (kind == KEYED_STORE_IC));
2623 // Compute the bit mask. 2624 // Compute the bit mask.
2624 int bits = kind << kFlagsKindShift; 2625 int bits = kind << kFlagsKindShift;
2625 if (in_loop) bits |= kFlagsICInLoopMask; 2626 if (in_loop) bits |= kFlagsICInLoopMask;
2626 bits |= ic_state << kFlagsICStateShift; 2627 bits |= ic_state << kFlagsICStateShift;
2627 bits |= type << kFlagsTypeShift; 2628 bits |= type << kFlagsTypeShift;
2628 bits |= extra_ic_state << kFlagsExtraICStateShift; 2629 bits |= extra_ic_state << kFlagsExtraICStateShift;
2629 bits |= argc << kFlagsArgumentsCountShift; 2630 bits |= argc << kFlagsArgumentsCountShift;
2630 if (holder == PROTOTYPE_MAP) bits |= kFlagsCacheInPrototypeMapMask; 2631 if (holder == PROTOTYPE_MAP) bits |= kFlagsCacheInPrototypeMapMask;
2631 // Cast to flags and validate result before returning it. 2632 // Cast to flags and validate result before returning it.
2632 Flags result = static_cast<Flags>(bits); 2633 Flags result = static_cast<Flags>(bits);
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
3734 Heap::hidden_symbol(), 3735 Heap::hidden_symbol(),
3735 &attributes)->ToObjectUnchecked(); 3736 &attributes)->ToObjectUnchecked();
3736 return result; 3737 return result;
3737 } 3738 }
3738 3739
3739 3740
3740 MaybeObject* JSObject::SetHiddenPropertiesObject(Object* hidden_obj) { 3741 MaybeObject* JSObject::SetHiddenPropertiesObject(Object* hidden_obj) {
3741 ASSERT(!IsJSGlobalProxy()); 3742 ASSERT(!IsJSGlobalProxy());
3742 return SetPropertyPostInterceptor(Heap::hidden_symbol(), 3743 return SetPropertyPostInterceptor(Heap::hidden_symbol(),
3743 hidden_obj, 3744 hidden_obj,
3744 DONT_ENUM); 3745 DONT_ENUM,
3746 kNonStrictMode);
3745 } 3747 }
3746 3748
3747 3749
3748 bool JSObject::HasElement(uint32_t index) { 3750 bool JSObject::HasElement(uint32_t index) {
3749 return HasElementWithReceiver(this, index); 3751 return HasElementWithReceiver(this, index);
3750 } 3752 }
3751 3753
3752 3754
3753 bool AccessorInfo::all_can_read() { 3755 bool AccessorInfo::all_can_read() {
3754 return BooleanBit::get(flag(), kAllCanReadBit); 3756 return BooleanBit::get(flag(), kAllCanReadBit);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
3935 #undef WRITE_INT_FIELD 3937 #undef WRITE_INT_FIELD
3936 #undef READ_SHORT_FIELD 3938 #undef READ_SHORT_FIELD
3937 #undef WRITE_SHORT_FIELD 3939 #undef WRITE_SHORT_FIELD
3938 #undef READ_BYTE_FIELD 3940 #undef READ_BYTE_FIELD
3939 #undef WRITE_BYTE_FIELD 3941 #undef WRITE_BYTE_FIELD
3940 3942
3941 3943
3942 } } // namespace v8::internal 3944 } } // namespace v8::internal
3943 3945
3944 #endif // V8_OBJECTS_INL_H_ 3946 #endif // V8_OBJECTS_INL_H_
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698