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

Side by Side Diff: src/objects.h

Issue 10827220: Fix handling of accessors on trunk. This is a combination of (Closed) Base URL: http://v8.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 4 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/ic.cc ('k') | src/objects.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 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 4666 matching lines...) Expand 10 before | Expand all | Expand 10 after
4677 // Bit field 2. 4677 // Bit field 2.
4678 inline byte bit_field2(); 4678 inline byte bit_field2();
4679 inline void set_bit_field2(byte value); 4679 inline void set_bit_field2(byte value);
4680 4680
4681 // Bit field 3. 4681 // Bit field 3.
4682 inline int bit_field3(); 4682 inline int bit_field3();
4683 inline void set_bit_field3(int value); 4683 inline void set_bit_field3(int value);
4684 4684
4685 class IsShared: public BitField<bool, 0, 1> {}; 4685 class IsShared: public BitField<bool, 0, 1> {};
4686 class FunctionWithPrototype: public BitField<bool, 1, 1> {}; 4686 class FunctionWithPrototype: public BitField<bool, 1, 1> {};
4687 class LastAddedBits: public BitField<int, 2, 11> {}; 4687 class DictionaryMap: public BitField<bool, 2, 1> {};
4688 class LastAddedBits: public BitField<int, 3, 11> {};
4688 4689
4689 // Tells whether the object in the prototype property will be used 4690 // Tells whether the object in the prototype property will be used
4690 // for instances created from this function. If the prototype 4691 // for instances created from this function. If the prototype
4691 // property is set to a value that is not a JSObject, the prototype 4692 // property is set to a value that is not a JSObject, the prototype
4692 // property will not be used to create instances of the function. 4693 // property will not be used to create instances of the function.
4693 // See ECMA-262, 13.2.2. 4694 // See ECMA-262, 13.2.2.
4694 inline void set_non_instance_prototype(bool value); 4695 inline void set_non_instance_prototype(bool value);
4695 inline bool has_non_instance_prototype(); 4696 inline bool has_non_instance_prototype();
4696 4697
4697 // Tells whether function has special prototype property. If not, prototype 4698 // Tells whether function has special prototype property. If not, prototype
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
4823 inline void set_attached_to_shared_function_info(bool value); 4824 inline void set_attached_to_shared_function_info(bool value);
4824 4825
4825 inline bool attached_to_shared_function_info(); 4826 inline bool attached_to_shared_function_info();
4826 4827
4827 // Tells whether the map is shared between objects that may have different 4828 // Tells whether the map is shared between objects that may have different
4828 // behavior. If true, the map should never be modified, instead a clone 4829 // behavior. If true, the map should never be modified, instead a clone
4829 // should be created and modified. 4830 // should be created and modified.
4830 inline void set_is_shared(bool value); 4831 inline void set_is_shared(bool value);
4831 inline bool is_shared(); 4832 inline bool is_shared();
4832 4833
4834 // Tells whether the map is used for JSObjects in dictionary mode (ie
4835 // normalized objects, ie objects for which HasFastProperties returns false).
4836 // A map can never be used for both dictionary mode and fast mode JSObjects.
4837 // False by default and for HeapObjects that are not JSObjects.
4838 inline void set_dictionary_map(bool value);
4839 inline bool is_dictionary_map();
4840
4833 // Tells whether the instance needs security checks when accessing its 4841 // Tells whether the instance needs security checks when accessing its
4834 // properties. 4842 // properties.
4835 inline void set_is_access_check_needed(bool access_check_needed); 4843 inline void set_is_access_check_needed(bool access_check_needed);
4836 inline bool is_access_check_needed(); 4844 inline bool is_access_check_needed();
4837 4845
4838 // [prototype]: implicit prototype object. 4846 // [prototype]: implicit prototype object.
4839 DECL_ACCESSORS(prototype, Object) 4847 DECL_ACCESSORS(prototype, Object)
4840 4848
4841 // [constructor]: points back to the function responsible for this map. 4849 // [constructor]: points back to the function responsible for this map.
4842 DECL_ACCESSORS(constructor, Object) 4850 DECL_ACCESSORS(constructor, Object)
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
5143 static const int8_t kMaximumBitField2FastHoleyElementValue = 5151 static const int8_t kMaximumBitField2FastHoleyElementValue =
5144 static_cast<int8_t>((FAST_HOLEY_ELEMENTS + 1) << 5152 static_cast<int8_t>((FAST_HOLEY_ELEMENTS + 1) <<
5145 Map::kElementsKindShift) - 1; 5153 Map::kElementsKindShift) - 1;
5146 static const int8_t kMaximumBitField2FastHoleySmiElementValue = 5154 static const int8_t kMaximumBitField2FastHoleySmiElementValue =
5147 static_cast<int8_t>((FAST_HOLEY_SMI_ELEMENTS + 1) << 5155 static_cast<int8_t>((FAST_HOLEY_SMI_ELEMENTS + 1) <<
5148 Map::kElementsKindShift) - 1; 5156 Map::kElementsKindShift) - 1;
5149 5157
5150 // Bit positions for bit field 3 5158 // Bit positions for bit field 3
5151 static const int kIsShared = 0; 5159 static const int kIsShared = 0;
5152 static const int kFunctionWithPrototype = 1; 5160 static const int kFunctionWithPrototype = 1;
5161 static const int kDictionaryMap = 2;
5153 5162
5154 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset, 5163 typedef FixedBodyDescriptor<kPointerFieldsBeginOffset,
5155 kPointerFieldsEndOffset, 5164 kPointerFieldsEndOffset,
5156 kSize> BodyDescriptor; 5165 kSize> BodyDescriptor;
5157 5166
5158 private: 5167 private:
5159 DISALLOW_IMPLICIT_CONSTRUCTORS(Map); 5168 DISALLOW_IMPLICIT_CONSTRUCTORS(Map);
5160 }; 5169 };
5161 5170
5162 5171
(...skipping 3767 matching lines...) Expand 10 before | Expand all | Expand 10 after
8930 } else { 8939 } else {
8931 value &= ~(1 << bit_position); 8940 value &= ~(1 << bit_position);
8932 } 8941 }
8933 return value; 8942 return value;
8934 } 8943 }
8935 }; 8944 };
8936 8945
8937 } } // namespace v8::internal 8946 } } // namespace v8::internal
8938 8947
8939 #endif // V8_OBJECTS_H_ 8948 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ic.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698