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

Side by Side Diff: src/objects.h

Issue 1138483005: Reland "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 10499 matching lines...) Expand 10 before | Expand all | Expand 10 after
10510 DECL_ACCESSORS(name, Object) 10510 DECL_ACCESSORS(name, Object)
10511 DECL_ACCESSORS(flag, Smi) 10511 DECL_ACCESSORS(flag, Smi)
10512 DECL_ACCESSORS(expected_receiver_type, Object) 10512 DECL_ACCESSORS(expected_receiver_type, Object)
10513 10513
10514 inline bool all_can_read(); 10514 inline bool all_can_read();
10515 inline void set_all_can_read(bool value); 10515 inline void set_all_can_read(bool value);
10516 10516
10517 inline bool all_can_write(); 10517 inline bool all_can_write();
10518 inline void set_all_can_write(bool value); 10518 inline void set_all_can_write(bool value);
10519 10519
10520 inline bool is_special_data_property();
10521 inline void set_is_special_data_property(bool value);
10522
10520 inline PropertyAttributes property_attributes(); 10523 inline PropertyAttributes property_attributes();
10521 inline void set_property_attributes(PropertyAttributes attributes); 10524 inline void set_property_attributes(PropertyAttributes attributes);
10522 10525
10523 // Checks whether the given receiver is compatible with this accessor. 10526 // Checks whether the given receiver is compatible with this accessor.
10524 static bool IsCompatibleReceiverMap(Isolate* isolate, 10527 static bool IsCompatibleReceiverMap(Isolate* isolate,
10525 Handle<AccessorInfo> info, 10528 Handle<AccessorInfo> info,
10526 Handle<Map> map); 10529 Handle<Map> map);
10527 inline bool IsCompatibleReceiver(Object* receiver); 10530 inline bool IsCompatibleReceiver(Object* receiver);
10528 10531
10529 DECLARE_CAST(AccessorInfo) 10532 DECLARE_CAST(AccessorInfo)
(...skipping 12 matching lines...) Expand all
10542 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize; 10545 static const int kExpectedReceiverTypeOffset = kFlagOffset + kPointerSize;
10543 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize; 10546 static const int kSize = kExpectedReceiverTypeOffset + kPointerSize;
10544 10547
10545 private: 10548 private:
10546 inline bool HasExpectedReceiverType() { 10549 inline bool HasExpectedReceiverType() {
10547 return expected_receiver_type()->IsFunctionTemplateInfo(); 10550 return expected_receiver_type()->IsFunctionTemplateInfo();
10548 } 10551 }
10549 // Bit positions in flag. 10552 // Bit positions in flag.
10550 static const int kAllCanReadBit = 0; 10553 static const int kAllCanReadBit = 0;
10551 static const int kAllCanWriteBit = 1; 10554 static const int kAllCanWriteBit = 1;
10552 class AttributesField : public BitField<PropertyAttributes, 2, 3> {}; 10555 static const int kSpecialDataProperty = 2;
10556 class AttributesField : public BitField<PropertyAttributes, 3, 3> {};
10553 10557
10554 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo); 10558 DISALLOW_IMPLICIT_CONSTRUCTORS(AccessorInfo);
10555 }; 10559 };
10556 10560
10557 10561
10558 // An accessor must have a getter, but can have no setter. 10562 // An accessor must have a getter, but can have no setter.
10559 // 10563 //
10560 // When setting a property, V8 searches accessors in prototypes. 10564 // When setting a property, V8 searches accessors in prototypes.
10561 // If an accessor was found and it does not have a setter, 10565 // If an accessor was found and it does not have a setter,
10562 // the request is ignored. 10566 // the request is ignored.
(...skipping 549 matching lines...) Expand 10 before | Expand all | Expand 10 after
11112 } else { 11116 } else {
11113 value &= ~(1 << bit_position); 11117 value &= ~(1 << bit_position);
11114 } 11118 }
11115 return value; 11119 return value;
11116 } 11120 }
11117 }; 11121 };
11118 11122
11119 } } // namespace v8::internal 11123 } } // namespace v8::internal
11120 11124
11121 #endif // V8_OBJECTS_H_ 11125 #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