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

Side by Side Diff: src/objects.h

Issue 1142763002: Revert of Mark internal AccessorInfo properties as "special data properties" (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « src/lookup.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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_OBJECTS_H_ 5 #ifndef V8_OBJECTS_H_
6 #define V8_OBJECTS_H_ 6 #define V8_OBJECTS_H_
7 7
8 #include <iosfwd> 8 #include <iosfwd>
9 9
10 #include "src/allocation.h" 10 #include "src/allocation.h"
(...skipping 10488 matching lines...) Expand 10 before | Expand all | Expand 10 after
10499 DECL_ACCESSORS(name, Object) 10499 DECL_ACCESSORS(name, Object)
10500 DECL_ACCESSORS(flag, Smi) 10500 DECL_ACCESSORS(flag, Smi)
10501 DECL_ACCESSORS(expected_receiver_type, Object) 10501 DECL_ACCESSORS(expected_receiver_type, Object)
10502 10502
10503 inline bool all_can_read(); 10503 inline bool all_can_read();
10504 inline void set_all_can_read(bool value); 10504 inline void set_all_can_read(bool value);
10505 10505
10506 inline bool all_can_write(); 10506 inline bool all_can_write();
10507 inline void set_all_can_write(bool value); 10507 inline void set_all_can_write(bool value);
10508 10508
10509 inline bool is_special_data_property();
10510 inline void set_is_special_data_property(bool value);
10511
10512 inline PropertyAttributes property_attributes(); 10509 inline PropertyAttributes property_attributes();
10513 inline void set_property_attributes(PropertyAttributes attributes); 10510 inline void set_property_attributes(PropertyAttributes attributes);
10514 10511
10515 // Checks whether the given receiver is compatible with this accessor. 10512 // Checks whether the given receiver is compatible with this accessor.
10516 static bool IsCompatibleReceiverMap(Isolate* isolate, 10513 static bool IsCompatibleReceiverMap(Isolate* isolate,
10517 Handle<AccessorInfo> info, 10514 Handle<AccessorInfo> info,
10518 Handle<Map> map); 10515 Handle<Map> map);
10519 inline bool IsCompatibleReceiver(Object* receiver); 10516 inline bool IsCompatibleReceiver(Object* receiver);
10520 10517
10521 DECLARE_CAST(AccessorInfo) 10518 DECLARE_CAST(AccessorInfo)
(...skipping 12 matching lines...) Expand all
10534 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; 10531 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize;
10535 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; 10532 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize;
10536 10533
10537 private: 10534 private:
10538 inline bool HasExpectedReceiverType() { 10535 inline bool HasExpectedReceiverType() {
10539 return expected_receiver_type()->IsFunctionTemplateInfo(); 10536 return expected_receiver_type()->IsFunctionTemplateInfo();
10540 } 10537 }
10541 // Bit positions in flag. 10538 // Bit positions in flag.
10542 static const int kAllCanReadBit = 0; 10539 static const int kAllCanReadBit = 0;
10543 static const int kAllCanWriteBit = 1; 10540 static const int kAllCanWriteBit = 1;
10544 static const int kSpecialDataProperty = 2; 10541 class AttributesField: public BitField<PropertyAttributes, 2, 3> {};
10545 class AttributesField : public BitField<PropertyAttributes, 3, 3> {};
10546 10542
10547 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); 10543 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo);
10548 }; 10544 };
10549 10545
10550 10546
10551 // An accessor must have a getter, but can have no setter. 10547 // An accessor must have a getter, but can have no setter.
10552 // 10548 //
10553 // When setting a property, V8 searches accessors in prototypes. 10549 // When setting a property, V8 searches accessors in prototypes.
10554 // If an accessor was found and it does not have a setter, 10550 // If an accessor was found and it does not have a setter,
10555 // the request is ignored. 10551 // the request is ignored.
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
11105 } else { 11101 } else {
11106 value &= ~(1 << bit_position); 11102 value &= ~(1 << bit_position);
11107 } 11103 }
11108 return value; 11104 return value;
11109 } 11105 }
11110 }; 11106 };
11111 11107
11112 } } // namespace v8::internal 11108 } } // namespace v8::internal
11113 11109
11114 #endif // V8_OBJECTS_H_ 11110 #endif // V8_OBJECTS_H_
OLDNEW
« no previous file with comments | « src/lookup.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698