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

Side by Side Diff: src/objects.h

Issue 1123163005: 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 mark_special_data_property();
rossberg 2015/05/12 14:09:26 Nit: Our usual naming convention would be set_is_s
10511
10509 inline PropertyAttributes property_attributes(); 10512 inline PropertyAttributes property_attributes();
10510 inline void set_property_attributes(PropertyAttributes attributes); 10513 inline void set_property_attributes(PropertyAttributes attributes);
10511 10514
10512 // Checks whether the given receiver is compatible with this accessor. 10515 // Checks whether the given receiver is compatible with this accessor.
10513 static bool IsCompatibleReceiverMap(Isolate* isolate, 10516 static bool IsCompatibleReceiverMap(Isolate* isolate,
10514 Handle<AccessorInfo> info, 10517 Handle<AccessorInfo> info,
10515 Handle<Map> map); 10518 Handle<Map> map);
10516 inline bool IsCompatibleReceiver(Object* receiver); 10519 inline bool IsCompatibleReceiver(Object* receiver);
10517 10520
10518 DECLARE_CAST(AccessorInfo) 10521 DECLARE_CAST(AccessorInfo)
(...skipping 12 matching lines...) Expand all
10531 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; 10534 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize;
10532 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; 10535 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize;
10533 10536
10534 private: 10537 private:
10535 inline bool HasExpectedReceiverType() { 10538 inline bool HasExpectedReceiverType() {
10536 return expected_receiver_type()->IsFunctionTemplateInfo(); 10539 return expected_receiver_type()->IsFunctionTemplateInfo();
10537 } 10540 }
10538 // Bit positions in flag. 10541 // Bit positions in flag.
10539 static const int kAllCanReadBit = 0; 10542 static const int kAllCanReadBit = 0;
10540 static const int kAllCanWriteBit = 1; 10543 static const int kAllCanWriteBit = 1;
10541 class AttributesField: public BitField<PropertyAttributes, 2, 3> {}; 10544 static const int kSpecialDataProperty = 2;
10545 class AttributesField : public BitField<PropertyAttributes, 3, 3> {};
10542 10546
10543 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); 10547 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo);
10544 }; 10548 };
10545 10549
10546 10550
10547 // An accessor must have a getter, but can have no setter. 10551 // An accessor must have a getter, but can have no setter.
10548 // 10552 //
10549 // When setting a property, V8 searches accessors in prototypes. 10553 // When setting a property, V8 searches accessors in prototypes.
10550 // If an accessor was found and it does not have a setter, 10554 // If an accessor was found and it does not have a setter,
10551 // the request is ignored. 10555 // the request is ignored.
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
11101 } else { 11105 } else {
11102 value &= ~(1 << bit_position); 11106 value &= ~(1 << bit_position);
11103 } 11107 }
11104 return value; 11108 return value;
11105 } 11109 }
11106 }; 11110 };
11107 11111
11108 } } // namespace v8::internal 11112 } } // namespace v8::internal
11109 11113
11110 #endif // V8_OBJECTS_H_ 11114 #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