Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index ad5b0e3e5a87dcf0a9e1e28e2d348cc7d44ecd34..ef0f3581b30d375dbd647b66b54c8502686f8c74 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -4454,6 +4454,7 @@ ACCESSORS(Box, value, Object, kValueOffset) |
ACCESSORS(AccessorPair, getter, Object, kGetterOffset) |
ACCESSORS(AccessorPair, setter, Object, kSetterOffset) |
+ACCESSORS_TO_SMI(AccessorPair, access_flags, kAccessFlagsOffset) |
ACCESSORS(AccessCheckInfo, named_callback, Object, kNamedCallbackOffset) |
ACCESSORS(AccessCheckInfo, indexed_callback, Object, kIndexedCallbackOffset) |
@@ -5850,6 +5851,36 @@ bool AccessorInfo::IsCompatibleReceiver(Object* receiver) { |
} |
+void AccessorPair::set_access_flags(v8::AccessControl access_control) { |
+ int current = access_flags()->value(); |
+ current = BooleanBit::set(current, |
+ kProhibitsOverwritingBit, |
+ access_control & PROHIBITS_OVERWRITING); |
+ current = BooleanBit::set(current, |
+ kAllCanReadBit, |
+ access_control & ALL_CAN_READ); |
+ current = BooleanBit::set(current, |
+ kAllCanWriteBit, |
+ access_control & ALL_CAN_WRITE); |
+ set_access_flags(Smi::FromInt(current)); |
+} |
+ |
+ |
+bool AccessorPair::all_can_read() { |
+ return BooleanBit::get(access_flags(), kAllCanReadBit); |
+} |
+ |
+ |
+bool AccessorPair::all_can_write() { |
+ return BooleanBit::get(access_flags(), kAllCanWriteBit); |
+} |
+ |
+ |
+bool AccessorPair::prohibits_overwriting() { |
+ return BooleanBit::get(access_flags(), kProhibitsOverwritingBit); |
+} |
+ |
+ |
template<typename Shape, typename Key> |
void Dictionary<Shape, Key>::SetEntry(int entry, |
Object* key, |