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

Side by Side Diff: src/objects.h

Issue 341082: Reverting 3174. Aka reapplying 3150, 3151 and 3159. Aka api accessor (Closed)
Patch Set: Created 11 years, 1 month 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
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/objects-debug.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 2006-2009 the V8 project authors. All rights reserved. 1 // Copyright 2006-2009 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 4705 matching lines...) Expand 10 before | Expand all | Expand 10 after
4716 // If the accessor in the prototype has the READ_ONLY property attribute, then 4716 // If the accessor in the prototype has the READ_ONLY property attribute, then
4717 // a new value is added to the local object when the property is set. 4717 // a new value is added to the local object when the property is set.
4718 // This shadows the accessor in the prototype. 4718 // This shadows the accessor in the prototype.
4719 class AccessorInfo: public Struct { 4719 class AccessorInfo: public Struct {
4720 public: 4720 public:
4721 DECL_ACCESSORS(getter, Object) 4721 DECL_ACCESSORS(getter, Object)
4722 DECL_ACCESSORS(setter, Object) 4722 DECL_ACCESSORS(setter, Object)
4723 DECL_ACCESSORS(data, Object) 4723 DECL_ACCESSORS(data, Object)
4724 DECL_ACCESSORS(name, Object) 4724 DECL_ACCESSORS(name, Object)
4725 DECL_ACCESSORS(flag, Smi) 4725 DECL_ACCESSORS(flag, Smi)
4726 DECL_ACCESSORS(load_stub_cache, Object)
4726 4727
4727 inline bool all_can_read(); 4728 inline bool all_can_read();
4728 inline void set_all_can_read(bool value); 4729 inline void set_all_can_read(bool value);
4729 4730
4730 inline bool all_can_write(); 4731 inline bool all_can_write();
4731 inline void set_all_can_write(bool value); 4732 inline void set_all_can_write(bool value);
4732 4733
4733 inline bool prohibits_overwriting(); 4734 inline bool prohibits_overwriting();
4734 inline void set_prohibits_overwriting(bool value); 4735 inline void set_prohibits_overwriting(bool value);
4735 4736
4736 inline PropertyAttributes property_attributes(); 4737 inline PropertyAttributes property_attributes();
4737 inline void set_property_attributes(PropertyAttributes attributes); 4738 inline void set_property_attributes(PropertyAttributes attributes);
4738 4739
4739 static inline AccessorInfo* cast(Object* obj); 4740 static inline AccessorInfo* cast(Object* obj);
4740 4741
4741 #ifdef DEBUG 4742 #ifdef DEBUG
4742 void AccessorInfoPrint(); 4743 void AccessorInfoPrint();
4743 void AccessorInfoVerify(); 4744 void AccessorInfoVerify();
4744 #endif 4745 #endif
4745 4746
4746 static const int kGetterOffset = HeapObject::kHeaderSize; 4747 static const int kGetterOffset = HeapObject::kHeaderSize;
4747 static const int kSetterOffset = kGetterOffset + kPointerSize; 4748 static const int kSetterOffset = kGetterOffset + kPointerSize;
4748 static const int kDataOffset = kSetterOffset + kPointerSize; 4749 static const int kDataOffset = kSetterOffset + kPointerSize;
4749 static const int kNameOffset = kDataOffset + kPointerSize; 4750 static const int kNameOffset = kDataOffset + kPointerSize;
4750 static const int kFlagOffset = kNameOffset + kPointerSize; 4751 static const int kFlagOffset = kNameOffset + kPointerSize;
4751 static const int kSize = kFlagOffset + kPointerSize; 4752 static const int kLoadStubCacheOffset = kFlagOffset + kPointerSize;
4753 static const int kSize = kLoadStubCacheOffset + kPointerSize;
4752 4754
4753 private: 4755 private:
4754 // Bit positions in flag. 4756 // Bit positions in flag.
4755 static const int kAllCanReadBit = 0; 4757 static const int kAllCanReadBit = 0;
4756 static const int kAllCanWriteBit = 1; 4758 static const int kAllCanWriteBit = 1;
4757 static const int kProhibitsOverwritingBit = 2; 4759 static const int kProhibitsOverwritingBit = 2;
4758 class AttributesField: public BitField<PropertyAttributes, 3, 3> {}; 4760 class AttributesField: public BitField<PropertyAttributes, 3, 3> {};
4759 4761
4760 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); 4762 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo);
4761 }; 4763 };
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
5148 } else { 5150 } else {
5149 value &= ~(1 << bit_position); 5151 value &= ~(1 << bit_position);
5150 } 5152 }
5151 return value; 5153 return value;
5152 } 5154 }
5153 }; 5155 };
5154 5156
5155 } } // namespace v8::internal 5157 } } // namespace v8::internal
5156 5158
5157 #endif // V8_OBJECTS_H_ 5159 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/ia32/stub-cache-ia32.cc ('k') | src/objects-debug.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698