• Home
  • Raw
  • Download

Lines Matching full:object

27 #include "src/objects/object-list-macros.h"
34 #include "src/objects/object-macros.h"
37 // Most object types in the V8 JavaScript are described in this file.
40 // - Object
208 // Formats of Object::ptr_:
284 // the setter interceptors are called in Object.defineProperty().
293 // Object is the abstract superclass for all classes in the
294 // object hierarchy.
295 // Object does not use any virtual functions to avoid the
297 // There must only be a single data member in Object: the Address ptr,
298 // containing the tagged heap pointer that this Object instance refers to.
300 class Object : public TaggedImpl<HeapObjectReferenceType::STRONG, Address> {
302 constexpr Object() : TaggedImpl(kNullAddress) {} in Object() function
303 explicit constexpr Object(Address ptr) : TaggedImpl(ptr) {} in Object() function
307 // Whether the object is in the RO heap and the RO heap is shared, or in the
350 V8_WARN_UNUSED_RESULT static Maybe<bool> IsArray(Handle<Object> object);
374 V8_EXPORT_PRIVATE static Handle<Object> NewStorageFor(
375 Isolate* isolate, Handle<Object> object, Representation representation);
379 static Handle<Object> WrapForRead(IsolateT* isolate, Handle<Object> object,
382 // Returns true if the object is of the correct type to be used as a
388 Object ToBoolean(Isolate* isolate);
392 Compare(Isolate* isolate, Handle<Object> x, Handle<Object> y);
396 Isolate* isolate, Handle<Object> x, Handle<Object> y);
399 V8_EXPORT_PRIVATE bool StrictEquals(Object that);
403 // native_context is used when creating wrapper object.
409 Isolate* isolate, Handle<Object> object,
412 Isolate* isolate, Handle<Object> object,
417 Isolate* isolate, Handle<Object> object);
421 Isolate* isolate, Handle<Object> input);
424 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> ToPrimitive(
425 Isolate* isolate, Handle<Object> input,
429 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> ToNumber(
430 Isolate* isolate, Handle<Object> input);
432 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> ToNumeric(
433 Isolate* isolate, Handle<Object> input);
436 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> ToInteger(
437 Isolate* isolate, Handle<Object> input);
440 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> ToInt32(
441 Isolate* isolate, Handle<Object> input);
444 V8_WARN_UNUSED_RESULT inline static MaybeHandle<Object> ToUint32(
445 Isolate* isolate, Handle<Object> input);
449 Isolate* isolate, Handle<Object> input);
452 Isolate* isolate, Handle<Object> input);
455 Isolate* isolate, Handle<Object> input);
458 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> ToPropertyKey(
459 Isolate* isolate, Handle<Object> value);
462 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> ToLength(
463 Isolate* isolate, Handle<Object> input);
466 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> ToIndex(
467 Isolate* isolate, Handle<Object> input, MessageTemplate error_index);
470 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> GetMethod(
475 Isolate* isolate, Handle<Object> object, ElementTypes element_types);
478 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> GetLengthFromArrayLike(
479 Isolate* isolate, Handle<JSReceiver> object);
482 static Handle<String> TypeOf(Isolate* isolate, Handle<Object> object);
485 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> Add(Isolate* isolate,
486 Handle<Object> lhs,
487 Handle<Object> rhs);
491 Handle<Object> x,
492 Handle<Object> y);
494 Isolate* isolate, Handle<Object> x, Handle<Object> y);
496 Handle<Object> x,
497 Handle<Object> y);
499 Isolate* isolate, Handle<Object> x, Handle<Object> y);
502 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> OrdinaryHasInstance(
503 Isolate* isolate, Handle<Object> callable, Handle<Object> object);
506 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> InstanceOf(
507 Isolate* isolate, Handle<Object> object, Handle<Object> callable);
509 V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static MaybeHandle<Object>
520 LookupIterator* it, Handle<Object> value, StoreOrigin store_origin,
522 V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static MaybeHandle<Object>
523 SetProperty(Isolate* isolate, Handle<Object> object, Handle<Name> name,
524 Handle<Object> value,
527 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> SetPropertyOrElement(
528 Isolate* isolate, Handle<Object> object, Handle<Name> name,
529 Handle<Object> value,
534 LookupIterator* it, Handle<Object> value, StoreOrigin store_origin,
538 Isolate* isolate, Handle<Object> receiver, Handle<Object> name,
539 Handle<Object> value, Maybe<ShouldThrow> should_throw);
541 LookupIterator* it, Handle<Object> value,
544 Isolate* isolate, Handle<Object> receiver, Handle<Object> name,
545 Handle<Object> value, ShouldThrow should_throw);
547 Isolate* isolate, Handle<Object> name, Handle<Object> value,
550 LookupIterator* it, Handle<Object> value);
552 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
557 LookupIterator* it, Handle<Object> value, PropertyAttributes attributes,
560 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
561 Isolate* isolate, Handle<Object> object, Handle<Name> name);
562 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> GetPropertyOrElement(
563 Handle<Object> receiver, Handle<Name> name, Handle<JSReceiver> holder);
564 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> GetProperty(
565 Isolate* isolate, Handle<Object> object, Handle<Name> name);
567 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> GetPropertyWithAccessor(
570 LookupIterator* it, Handle<Object> value,
573 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> GetPropertyWithDefinedGetter(
574 Handle<Object> receiver, Handle<JSReceiver> getter);
576 Handle<Object> receiver, Handle<JSReceiver> setter, Handle<Object> value,
579 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> GetElement(
580 Isolate* isolate, Handle<Object> object, uint32_t index);
582 V8_WARN_UNUSED_RESULT static inline MaybeHandle<Object> SetElement(
583 Isolate* isolate, Handle<Object> object, uint32_t index,
584 Handle<Object> value, ShouldThrow should_throw);
586 // Returns the permanent hash code associated with this object. May return
588 inline Object GetHash();
590 // Returns the permanent hash code associated with this object depending on
591 // the actual object type. May create and store a hash code if needed and none
595 // Checks whether this object has the same value as the given one. This
597 // to implement the Object.is function.
598 V8_EXPORT_PRIVATE bool SameValue(Object other);
604 // Checks whether this object has the same value as the given one.
608 bool SameValueZero(Object other);
611 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> ArraySpeciesConstructor(
612 Isolate* isolate, Handle<Object> original_array);
615 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> SpeciesConstructor(
619 // Tries to convert an object to an array length. Returns true and sets the
623 // Tries to convert an object to an array index. Returns true and sets the
628 // Tries to convert an object to an index (in the range 0..size_t::max).
632 // Returns true if the result of iterating over the object is the same
640 EXPORT_DECL_VERIFIER(Object)
643 // Verify a pointer is a valid (non-Code) object pointer.
645 static void VerifyPointer(Isolate* isolate, Object p);
646 // Verify a pointer is a valid object pointer.
648 static void VerifyAnyTagged(Isolate* isolate, Object p);
653 // Prints this object without details.
656 // Prints this object without details to a message accumulator.
661 inline static Object cast(Object object) { return object; } in cast() argument
662 inline static Object unchecked_cast(Object object) { return object; } in unchecked_cast() argument
665 static const int kHeaderSize = 0; // Object does not take up any space.
671 // Prints this object with details.
680 size_t operator()(const Object o) const { in operator()
687 bool operator()(const Object a, const Object b) const { return a < b; } in operator()
746 // the property did not exist yet on the global object itself, we have to
752 // Returns whether the object is safe to share across Isolates.
765 static inline MaybeHandle<Object> Share(
766 Isolate* isolate, Handle<Object> value,
769 static MaybeHandle<Object> ShareSlow(Isolate* isolate,
773 // Whether this Object can be held weakly, i.e. whether it can be used as a
789 // Return the map of the root of object's prototype chain.
799 static inline Object GetSimpleHash(Object object);
804 LookupIterator* it, Handle<Object> value, Maybe<ShouldThrow> should_throw,
808 Isolate* isolate, Handle<Object> input);
809 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> ConvertToPropertyKey(
810 Isolate* isolate, Handle<Object> value);
812 ConvertToString(Isolate* isolate, Handle<Object> input);
813 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> ConvertToNumberOrNumeric(
814 Isolate* isolate, Handle<Object> input, Conversion mode);
815 V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static MaybeHandle<Object>
816 ConvertToInteger(Isolate* isolate, Handle<Object> input);
817 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> ConvertToInt32(
818 Isolate* isolate, Handle<Object> input);
819 V8_WARN_UNUSED_RESULT static MaybeHandle<Object> ConvertToUint32(
820 Isolate* isolate, Handle<Object> input);
821 V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static MaybeHandle<Object>
822 ConvertToLength(Isolate* isolate, Handle<Object> input);
823 V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static MaybeHandle<Object>
824 ConvertToIndex(Isolate* isolate, Handle<Object> input,
828 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, const Object& obj);
833 // {value} is a tagged heap object reference (weak or strong), equivalent to
843 V8_INLINE static bool HasWeakHeapObjectTag(const Object value) { in HasWeakHeapObjectTag()
850 // value in a heap object's first word.
862 // contains a forwarding address (a heap object pointer in the to space).
866 // when all map words are heap object pointers, i.e. not during a full GC).
870 static inline MapWord FromForwardingAddress(HeapObject object);
975 #include "src/objects/object-macros-undef.h"