11 #include "include/v8-internal.h" 12 #include "include/v8.h" 13 #include "include/v8config.h" 14 #include "src/assert-scope.h" 15 #include "src/base/bits.h" 16 #include "src/base/build_config.h" 17 #include "src/base/flags.h" 18 #include "src/base/logging.h" 19 #include "src/checks.h" 20 #include "src/constants-arch.h" 21 #include "src/elements-kind.h" 22 #include "src/field-index.h" 23 #include "src/flags.h" 24 #include "src/message-template.h" 25 #include "src/objects-definitions.h" 26 #include "src/property-details.h" 27 #include "src/roots.h" 28 #include "src/utils.h" 32 #include "src/objects/object-macros.h" 186 struct InliningPosition;
187 class PropertyDescriptorObject;
193 enum WriteBarrierMode {
195 UPDATE_WEAK_WRITE_BARRIER,
202 enum PropertyNormalizationMode {
203 CLEAR_INOBJECT_PROPERTIES,
204 KEEP_INOBJECT_PROPERTIES
209 enum TransitionFlag {
218 enum SimpleTransitionFlag {
219 SIMPLE_PROPERTY_TRANSITION,
226 enum DescriptorFlag {
232 const int kVariableSizeSentinel = 0;
236 const int kStubMajorKeyBits = 8;
237 const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1;
241 enum class ComparisonResult {
249 bool ComparisonResultToBool(Operation op, ComparisonResult result);
251 enum class OnNonExistent { kThrowReferenceError, kReturnUndefined };
255 class AccessCheckInfo;
256 class AllocationSite;
261 class ElementsAccessor;
263 class FixedArrayBase;
264 class FixedDoubleArray;
265 class FunctionLiteral;
266 class FunctionTemplateInfo;
267 class JSAsyncGeneratorObject;
271 class KeyAccumulator;
272 class LayoutDescriptor;
273 class LookupIterator;
275 class MaybeObjectSlot;
277 class ModuleInfoEntry;
278 class ObjectHashTable;
279 class ObjectTemplateInfo;
281 class PreParsedScopeData;
284 class PropertyDescriptor;
285 class RegExpMatchInfo;
287 class SafepointEntry;
288 class ScriptContextTable;
289 class SharedFunctionInfo;
293 class FeedbackMetadata;
294 class FeedbackVector;
295 class UncompiledData;
297 class TransitionArray;
299 class WasmInstanceObject;
300 class WasmMemoryObject;
301 template <
typename T>
305 #define DECL_PRINTER(Name) void Name##Print(std::ostream& os); // NOLINT 307 #define DECL_PRINTER(Name) 310 #define OBJECT_TYPE_LIST(V) \ 312 V(LayoutDescriptor) \ 318 #define HEAP_OBJECT_ORDINARY_TYPE_LIST_BASE(V) \ 320 V(AccessCheckNeeded) \ 325 V(ObjectBoilerplateDescription) \ 335 V(ClassBoilerplate) \ 337 V(CodeDataContainer) \ 338 V(CompilationCacheTable) \ 344 V(DeoptimizationData) \ 347 V(EmbedderDataArray) \ 348 V(EphemeronHashTable) \ 350 V(ExternalOneByteString) \ 352 V(ExternalTwoByteString) \ 354 V(FeedbackMetadata) \ 360 V(FixedBigInt64Array) \ 361 V(FixedBigUint64Array) \ 362 V(FixedDoubleArray) \ 363 V(FixedFloat32Array) \ 364 V(FixedFloat64Array) \ 368 V(FixedTypedArrayBase) \ 369 V(FixedUint16Array) \ 370 V(FixedUint32Array) \ 372 V(FixedUint8ClampedArray) \ 377 V(GlobalDictionary) \ 380 V(InternalizedString) \ 381 V(JSArgumentsObject) \ 382 V(JSArgumentsObjectWithLength) \ 385 V(JSArrayBufferView) \ 387 V(JSAsyncFromSyncIterator) \ 388 V(JSAsyncFunctionObject) \ 389 V(JSAsyncGeneratorObject) \ 392 V(JSContextExtensionObject) \ 397 V(JSGeneratorObject) \ 403 V(JSModuleNamespace) \ 410 V(JSRegExpStringIterator) \ 413 V(JSSloppyArgumentsObject) \ 414 V(JSStringIterator) \ 419 V(JSWeakCollection) \ 421 V(JSWeakFactoryCleanupIterator) \ 429 V(MutableHeapNumber) \ 433 V(NormalizedMapCache) \ 434 V(NumberDictionary) \ 441 V(OrderedNameDictionary) \ 442 V(PreParsedScopeData) \ 443 V(PromiseReactionJobTask) \ 446 V(PropertyDescriptorObject) \ 449 V(ScriptContextTable) \ 451 V(SeqOneByteString) \ 453 V(SeqTwoByteString) \ 454 V(SharedFunctionInfo) \ 455 V(SimpleNumberDictionary) \ 457 V(SloppyArgumentsElements) \ 458 V(SmallOrderedHashMap) \ 459 V(SmallOrderedHashSet) \ 460 V(SmallOrderedNameDictionary) \ 461 V(SourcePositionTableWithFrameCache) \ 472 V(TemplateObjectDescription) \ 476 V(UncompiledDataWithPreParsedScope) \ 477 V(UncompiledDataWithoutPreParsedScope) \ 480 V(WasmExceptionObject) \ 481 V(WasmGlobalObject) \ 482 V(WasmInstanceObject) \ 483 V(WasmMemoryObject) \ 484 V(WasmModuleObject) \ 489 #ifdef V8_INTL_SUPPORT 490 #define HEAP_OBJECT_ORDINARY_TYPE_LIST(V) \ 491 HEAP_OBJECT_ORDINARY_TYPE_LIST_BASE(V) \ 492 V(JSV8BreakIterator) \ 494 V(JSDateTimeFormat) \ 499 V(JSRelativeTimeFormat) \ 500 V(JSSegmentIterator) \ 503 #define HEAP_OBJECT_ORDINARY_TYPE_LIST(V) HEAP_OBJECT_ORDINARY_TYPE_LIST_BASE(V) 504 #endif // V8_INTL_SUPPORT 506 #define HEAP_OBJECT_TEMPLATE_TYPE_LIST(V) \ 510 #define HEAP_OBJECT_TYPE_LIST(V) \ 511 HEAP_OBJECT_ORDINARY_TYPE_LIST(V) \ 512 HEAP_OBJECT_TEMPLATE_TYPE_LIST(V) 514 #define ODDBALL_LIST(V) \ 515 V(Undefined, undefined_value) \ 516 V(Null, null_value) \ 517 V(TheHole, the_hole_value) \ 518 V(Exception, exception) \ 519 V(Uninitialized, uninitialized_value) \ 520 V(True, true_value) \ 521 V(False, false_value) \ 522 V(ArgumentsMarker, arguments_marker) \ 523 V(OptimizedOut, optimized_out) \ 524 V(StaleRegister, stale_register) 527 enum class ElementTypes { kAll, kStringAndSymbol };
565 bool IsObject()
const {
return true; }
571 #define IS_TYPE_FUNCTION_DECL(Type) V8_INLINE bool Is##Type() const; 572 OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL)
573 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL)
574 #undef IS_TYPE_FUNCTION_DECL 576 V8_INLINE
bool IsExternal(
Isolate* isolate)
const;
580 #define IS_TYPE_FUNCTION_DECL(Type, Value) \ 581 V8_INLINE bool Is##Type(Isolate* isolate) const; \ 582 V8_INLINE bool Is##Type(ReadOnlyRoots roots) const; \ 583 V8_INLINE bool Is##Type() const; 584 ODDBALL_LIST(IS_TYPE_FUNCTION_DECL)
585 #undef IS_TYPE_FUNCTION_DECL 587 V8_INLINE
bool IsNullOrUndefined(
Isolate* isolate)
const;
589 V8_INLINE
bool IsNullOrUndefined()
const;
591 enum class Conversion { kToNumber, kToNumeric };
593 #define RETURN_FAILURE(isolate, should_throw, call) \ 595 if ((should_throw) == kDontThrow) { \ 596 return Just(false); \ 598 isolate->Throw(*isolate->factory()->call); \ 599 return Nothing<bool>(); \ 603 #define MAYBE_RETURN(call, value) \ 605 if ((call).IsNothing()) return value; \ 608 #define MAYBE_RETURN_NULL(call) MAYBE_RETURN(call, MaybeHandle<Object>()) 610 #define MAYBE_ASSIGN_RETURN_FAILURE_ON_EXCEPTION(isolate, dst, call) \ 612 Isolate* __isolate__ = (isolate); \ 613 if (!(call).To(&dst)) { \ 614 DCHECK(__isolate__->has_pending_exception()); \ 615 return ReadOnlyRoots(__isolate__).exception(); \ 619 #define DECL_STRUCT_PREDICATE(NAME, Name, name) V8_INLINE bool Is##Name() const; 620 STRUCT_LIST(DECL_STRUCT_PREDICATE)
621 #undef DECL_STRUCT_PREDICATE 627 V8_INLINE
bool IsSmallOrderedHashTable()
const;
630 inline double Number()
const;
631 V8_INLINE
bool IsNaN()
const;
632 V8_INLINE
bool IsMinusZero()
const;
633 V8_EXPORT_PRIVATE
bool ToInt32(int32_t* value);
634 inline bool ToUint32(
uint32_t* value)
const;
638 inline ElementsKind OptimalElementsKind();
645 inline bool KeyEquals(
Object* other);
647 inline bool FilterKey(PropertyFilter filter);
662 inline bool HasValidElements();
665 bool BooleanValue(
Isolate* isolate);
677 bool StrictEquals(
Object* that);
688 const char* method_name =
nullptr);
691 const char* method_name =
nullptr);
703 Handle<Object> input, ToPrimitiveHint hint = ToPrimitiveHint::kDefault);
767 V8_WARN_UNUSED_RESULT
static inline Maybe<bool> GreaterThanOrEqual(
772 V8_WARN_UNUSED_RESULT
static inline Maybe<bool> LessThanOrEqual(
785 OnNonExistent on_non_existent = OnNonExistent::kReturnUndefined);
794 V8_WARN_UNUSED_RESULT
static Maybe<bool> SetProperty(
796 StoreOrigin store_origin);
800 StoreOrigin store_origin = StoreOrigin::kMaybeKeyed);
804 StoreOrigin store_origin = StoreOrigin::kMaybeKeyed);
806 V8_WARN_UNUSED_RESULT
static Maybe<bool> SetSuperProperty(
808 StoreOrigin store_origin);
810 V8_WARN_UNUSED_RESULT
static Maybe<bool> CannotCreateProperty(
813 V8_WARN_UNUSED_RESULT
static Maybe<bool> WriteToReadOnlyProperty(
815 V8_WARN_UNUSED_RESULT
static Maybe<bool> WriteToReadOnlyProperty(
818 V8_WARN_UNUSED_RESULT
static Maybe<bool> RedefineIncompatibleProperty(
820 ShouldThrow should_throw);
821 V8_WARN_UNUSED_RESULT
static Maybe<bool> SetDataProperty(
823 V8_WARN_UNUSED_RESULT
static Maybe<bool> AddDataProperty(
825 ShouldThrow should_throw, StoreOrigin store_origin);
835 V8_WARN_UNUSED_RESULT
static Maybe<bool> SetPropertyWithAccessor(
840 V8_WARN_UNUSED_RESULT
static Maybe<bool> SetPropertyWithDefinedSetter(
842 ShouldThrow should_throw);
863 V8_EXPORT_PRIVATE
bool SameValue(
Object* other);
869 bool SameValueZero(
Object* other);
882 inline bool ToArrayLength(
uint32_t* index)
const;
887 V8_WARN_UNUSED_RESULT
inline bool ToArrayIndex(
uint32_t* index)
const;
892 bool IterationHasObservableEffects();
900 inline void VerifyApiCallResultType();
903 void ShortPrint(FILE* out = stdout);
908 void ShortPrint(std::ostream& os);
913 static const int kHeaderSize = 0;
920 void Print(std::ostream& os);
922 void Print() { ShortPrint(); }
923 void Print(std::ostream& os) { ShortPrint(os); }
931 Map GetPrototypeChainRootMap(
Isolate* isolate)
const;
944 V8_WARN_UNUSED_RESULT
static Maybe<bool> SetPropertyInternal(
946 StoreOrigin store_origin,
bool* found);
967 DISALLOW_IMPLICIT_CONSTRUCTORS(
Object);
971 bool Object::IsSmi()
const {
return HAS_SMI_TAG(ptr()); }
972 bool Object::IsHeapObject()
const {
973 DCHECK_EQ(!IsSmi(), Internals::HasHeapObjectTag(ptr()));
986 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
const Brief& v);
1000 inline Map ToMap()
const;
1008 inline bool IsForwardingAddress()
const;
1041 inline Map map()
const;
1042 inline void set_map(
Map value);
1049 inline void set_map_no_write_barrier(
Map value);
1052 inline Map synchronized_map()
const;
1053 inline MapWord synchronized_map_word()
const;
1056 inline void synchronized_set_map(
Map value);
1057 inline void synchronized_set_map_word(
MapWord map_word);
1061 inline void set_map_after_allocation(
1062 Map value, WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
1066 inline MapWord map_word()
const;
1067 inline void set_map_word(
MapWord map_word);
1076 #define IS_TYPE_FUNCTION_DECL(Type) V8_INLINE bool Is##Type() const; 1077 HEAP_OBJECT_TYPE_LIST(IS_TYPE_FUNCTION_DECL)
1078 #undef IS_TYPE_FUNCTION_DECL 1080 V8_INLINE
bool IsExternal(
Isolate* isolate)
const;
1084 #define IS_TYPE_FUNCTION_DECL(Type, Value) \ 1085 V8_INLINE bool Is##Type(Isolate* isolate) const; \ 1086 V8_INLINE bool Is##Type(ReadOnlyRoots roots) const; \ 1087 V8_INLINE bool Is##Type() const; 1088 ODDBALL_LIST(IS_TYPE_FUNCTION_DECL)
1089 #undef IS_TYPE_FUNCTION_DECL 1091 V8_INLINE
bool IsNullOrUndefined(
Isolate* isolate)
const;
1092 V8_INLINE
bool IsNullOrUndefined(
ReadOnlyRoots roots)
const;
1093 V8_INLINE
bool IsNullOrUndefined()
const;
1095 #define DECL_STRUCT_PREDICATE(NAME, Name, name) V8_INLINE bool Is##Name() const; 1096 STRUCT_LIST(DECL_STRUCT_PREDICATE)
1097 #undef DECL_STRUCT_PREDICATE 1101 DCHECK_TAG_ALIGNED(address);
1102 return reinterpret_cast<HeapObject*
>(address + kHeapObjectTag);
1106 inline Address address()
const {
1107 return reinterpret_cast<Address>(
this) - kHeapObjectTag;
1115 template <
typename ObjectVisitor>
1127 template <
typename ObjectVisitor>
1130 template <
typename ObjectVisitor>
1136 bool IsValidSlot(
Map map,
int offset);
1139 inline int Size()
const;
1144 inline int SizeFromMap(
Map map)
const;
1150 inline ObjectSlot RawField(
int byte_offset)
const;
1162 inline WriteBarrierMode GetWriteBarrierMode(
1166 void HeapObjectShortPrint(std::ostream& os);
1168 void PrintHeader(std::ostream& os,
const char*
id);
1173 inline void VerifyObjectField(
Isolate* isolate,
int offset);
1174 inline void VerifySmiField(
int offset);
1175 inline void VerifyMaybeObjectField(
Isolate* isolate,
int offset);
1182 static inline AllocationAlignment RequiredAlignment(
Map map);
1187 inline bool NeedsRehashing()
const;
1192 bool CanBeRehashed()
const;
1195 void RehashBasedOnMap(
Isolate* isolate);
1199 static const int kMapOffset = Object::kHeaderSize;
1200 static const int kHeaderSize = kMapOffset + kPointerSize;
1202 STATIC_ASSERT(kMapOffset == Internals::kHeapObjectMapOffset);
1204 inline Address GetFieldAddress(
int field_offset)
const;
1216 inline Heap* GetHeap()
const;
1219 inline Isolate* GetIsolate()
const;
1222 template <
int start_offset,
int end_offset,
int size>
1225 template <
int start_offset>
1228 template <
int start_offset>
1231 template <
class ParentBodyDescriptor,
class ChildBodyDescriptor>
1241 inline double value()
const;
1242 inline void set_value(
double value);
1244 inline uint64_t value_as_bits()
const;
1245 inline void set_value_as_bits(uint64_t bits);
1247 inline int get_exponent();
1248 inline int get_sign();
1251 static const int kValueOffset = HeapObject::kHeaderSize;
1256 #if defined(V8_TARGET_LITTLE_ENDIAN) 1257 static const int kMantissaOffset = kValueOffset;
1258 static const int kExponentOffset = kValueOffset + 4;
1259 #elif defined(V8_TARGET_BIG_ENDIAN) 1260 static const int kMantissaOffset = kValueOffset + 4;
1261 static const int kExponentOffset = kValueOffset;
1263 #error Unknown byte ordering 1266 static const int kSize = kValueOffset + kDoubleSize;
1267 static const uint32_t kSignMask = 0x80000000u;
1268 static const uint32_t kExponentMask = 0x7ff00000u;
1269 static const uint32_t kMantissaMask = 0xfffffu;
1270 static const int kMantissaBits = 52;
1271 static const int kExponentBits = 11;
1272 static const int kExponentBias = 1023;
1273 static const int kExponentShift = 20;
1274 static const int kInfinityOrNanExponent =
1275 (kExponentMask >> kExponentShift) - kExponentBias;
1276 static const int kMantissaBitsInTopWord = 20;
1277 static const int kNonMantissaBitsInTopWord = 12;
1286 V8_EXPORT_PRIVATE
void HeapNumberPrint(std::ostream& os);
1295 V8_EXPORT_PRIVATE
void MutableHeapNumberPrint(std::ostream& os);
1301 enum EnsureElementsMode {
1302 DONT_ALLOW_DOUBLE_ELEMENTS,
1303 ALLOW_COPIED_DOUBLE_ELEMENTS,
1304 ALLOW_CONVERTED_DOUBLE_ELEMENTS
1309 enum AccessorComponent {
1314 enum class GetKeysConversion {
1315 kKeepNumbers =
static_cast<int>(v8::KeyConversionMode::kKeepNumbers),
1316 kConvertToString = static_cast<int>(v8::KeyConversionMode::kConvertToString)
1320 kOwnOnly =
static_cast<int>(v8::KeyCollectionMode::kOwnOnly),
1321 kIncludePrototypes =
1322 static_cast<int>(v8::KeyCollectionMode::kIncludePrototypes)
1333 inline int size()
const;
1334 inline void set_size(
int value);
1336 inline int relaxed_read_size()
const;
1337 inline void relaxed_write_size(
int value);
1353 static const int kSizeOffset = HeapObject::kHeaderSize;
1354 static const int kNextOffset = POINTER_SIZE_ALIGN(kSizeOffset + kPointerSize);
1355 static const int kSize = kNextOffset + kPointerSize;
1358 DISALLOW_IMPLICIT_CONSTRUCTORS(
FreeSpace);
1368 inline void InitializeBody(
int object_size);
1370 void BriefPrintDetails(std::ostream& os);
1375 DECL_ACCESSORS(value1,
Object)
1376 DECL_ACCESSORS(value2,
Object)
1383 void BriefPrintDetails(std::ostream& os);
1385 static const int kValue1Offset = HeapObject::kHeaderSize;
1386 static const int kValue2Offset = kValue1Offset + kPointerSize;
1387 static const int kSize = kValue2Offset + kPointerSize;
1390 DISALLOW_IMPLICIT_CONSTRUCTORS(
Tuple2);
1395 DECL_ACCESSORS(value3,
Object)
1402 void BriefPrintDetails(std::ostream& os);
1404 static const int kValue3Offset = Tuple2::kSize;
1405 static const int kSize = kValue3Offset + kPointerSize;
1408 DISALLOW_IMPLICIT_CONSTRUCTORS(
Tuple3);
1419 virtual void PostGarbageCollection() { }
1421 static void PostGarbageCollectionProcessing(
Isolate* isolate);
1422 static int ArchiveSpacePerThread();
1423 static char* ArchiveState(
Isolate* isolate,
char* to);
1424 static char* RestoreState(
Isolate* isolate,
char* from);
1439 inline double to_number_raw()
const;
1440 inline void set_to_number_raw(
double value);
1441 inline void set_to_number_raw_as_bits(uint64_t bits);
1444 DECL_ACCESSORS2(to_string,
String)
1447 DECL_ACCESSORS(to_number,
Object)
1450 DECL_ACCESSORS2(type_of,
String)
1452 inline byte kind()
const;
1453 inline void set_kind(byte kind);
1467 const char* type_of, byte kind);
1470 static const int kToNumberRawOffset = HeapObject::kHeaderSize;
1471 static const int kToStringOffset = kToNumberRawOffset + kDoubleSize;
1472 static const int kToNumberOffset = kToStringOffset + kPointerSize;
1473 static const int kTypeOfOffset = kToNumberOffset + kPointerSize;
1474 static const int kKindOffset = kTypeOfOffset + kPointerSize;
1475 static const int kSize = kKindOffset + kPointerSize;
1477 static const byte kFalse = 0;
1478 static const byte kTrue = 1;
1479 static const byte kNotBooleanMask =
static_cast<byte
>(~1);
1480 static const byte kTheHole = 2;
1481 static const byte kNull = 3;
1482 static const byte kArgumentsMarker = 4;
1483 static const byte kUndefined = 5;
1484 static const byte kUninitialized = 6;
1485 static const byte kOther = 7;
1486 static const byte kException = 8;
1487 static const byte kOptimizedOut = 9;
1488 static const byte kStaleRegister = 10;
1489 static const byte kSelfReferenceMarker = 10;
1494 STATIC_ASSERT(kToNumberRawOffset == HeapNumber::kValueOffset);
1495 STATIC_ASSERT(kKindOffset == Internals::kOddballKindOffset);
1496 STATIC_ASSERT(kNull == Internals::kNullOddballKind);
1497 STATIC_ASSERT(kUndefined == Internals::kUndefinedOddballKind);
1500 DISALLOW_IMPLICIT_CONSTRUCTORS(
Oddball);
1507 DECL_ACCESSORS(value,
Object)
1511 static inline Cell* FromValueAddress(
Address value) {
1512 Object* result = FromAddress(value - kValueOffset);
1513 return static_cast<Cell*
>(result);
1516 inline Address ValueAddress() {
1517 return address() + kValueOffset;
1525 static const int kValueOffset = HeapObject::kHeaderSize;
1526 static const int kSize = kValueOffset + kPointerSize;
1529 kValueOffset + kPointerSize,
1533 DISALLOW_IMPLICIT_CONSTRUCTORS(
Cell);
1552 static const int kValueOffset = HeapObject::kHeaderSize;
1553 static const int kSize = kValueOffset + kPointerSize;
1565 DECL_ACCESSORS2(name,
Name)
1567 DECL_ACCESSORS(property_details_raw,
Object)
1569 DECL_ACCESSORS(value,
Object)
1577 PropertyCellConstantType GetConstantType();
1581 static PropertyCellType UpdatedType(
Isolate* isolate,
1595 static void SetValueWithInvalidation(
Isolate* isolate,
1606 static const int kDetailsOffset = HeapObject::kHeaderSize;
1607 static const int kNameOffset = kDetailsOffset + kPointerSize;
1608 static const int kValueOffset = kNameOffset + kPointerSize;
1609 static const int kDependentCodeOffset = kValueOffset + kPointerSize;
1610 static const int kSize = kDependentCodeOffset + kPointerSize;
1622 inline Address foreign_address();
1624 static inline bool IsNormalized(
Object*
object);
1634 static const int kForeignAddressOffset = HeapObject::kHeaderSize;
1635 static const int kSize = kForeignAddressOffset + kPointerSize;
1637 STATIC_ASSERT(kForeignAddressOffset == Internals::kForeignAddressOffset);
1646 inline void set_foreign_address(
Address value);
1648 DISALLOW_IMPLICIT_CONSTRUCTORS(
Foreign);
1659 DECL_ACCESSORS(getter,
Object)
1660 DECL_ACCESSORS(setter,
Object)
1666 inline Object*
get(AccessorComponent component);
1667 inline void set(AccessorComponent component,
Object* value);
1672 AccessorComponent component);
1675 inline void SetComponents(
Object* getter,
Object* setter);
1678 inline bool Equals(
Object* getter_value,
Object* setter_value);
1680 inline bool ContainsAccessor();
1686 static const int kGetterOffset = HeapObject::kHeaderSize;
1687 static const int kSetterOffset = kGetterOffset + kPointerSize;
1688 static const int kSize = kSetterOffset + kPointerSize;
1696 inline bool IsJSAccessor(
Object* obj);
1704 static inline bool get(
int value,
int bit_position) {
1705 return (value & (1 << bit_position)) != 0;
1708 static inline int set(
int value,
int bit_position,
bool v) {
1710 value |= (1 << bit_position);
1712 value &= ~(1 << bit_position);
1722 #include "src/objects/object-macros-undef.h" 1724 #endif // V8_OBJECTS_H_