Lines Matching defs:Object
50 // Most object types in the V8 JavaScript are described in this file.
53 // - MaybeObject (an object or a failure)
55 // - Object
154 // Formats of Object*:
251 // Indicates whether a get method should implicitly create the object looked up.
290 // marking can visit an object twice during a marking phase, so algorithms that
292 // perform an operation on an object once per marking phase: they record the
293 // MarkingParity when they visit an object, and only re-visit the object when it
310 // As an example, a JavaScript object is a heap object and its map
325 // Object::IsString.
329 // 'object', whereas JS_FUNCTION_TYPE has typeof 'function'.
368 /* Object::IsExternalArray(). */ \
535 // A struct is a simple object a set of object-valued fields. Including an
536 // object type in this causes the compiler to generate most of the boilerplate
539 // object verification routines. Easy, no?
579 // We use the full 8 bits of the instance_type field to encode heap object
580 // instance types. The high-order bit (bit 7) is set if the object is not a
586 // Bit 6 indicates that the object is an internalized string (if set) or not.
812 // Boundaries for testing whether the type is a JavaScript object.
815 // Boundaries for testing the types for which typeof is "object".
883 Object* ptr;
890 template <class C> inline bool Is(Object* obj);
912 inline bool ToObject(Object** obj) {
914 *obj = reinterpret_cast<Object*>(this);
921 inline Object* ToObjectUnchecked() {
925 return reinterpret_cast<Object*>(this);
927 inline Object* ToObjectChecked() {
929 return reinterpret_cast<Object*>(this);
935 *obj = T::cast(reinterpret_cast<Object*>(this));
942 *obj = handle(T::cast(reinterpret_cast<Object*>(this)), isolate);
947 // Prints this object with details.
954 // Verifies the object.
1061 V(kAPICallReturnedInvalidObject, "API call returned invalid object") \
1063 "arguments object value in a test context") \
1071 "assignment to parameter, function uses arguments object") \
1073 "assignment to parameter in arguments object") \
1076 "bad value context for arguments object
1090 V(kCodeObjectNotProperlyPatched, "code object not properly patched") \
1138 "improper object on prototype chain for store") \
1205 V(kObjectFoundInSmiOnlyArray, "object found in smi-only array") \
1207 "Object literal with complex property") \
1334 // Object is the abstract superclass for all classes in the
1335 // object hierarchy.
1336 // Object does not use any virtual functions to avoid the
1338 // Since Smi and Failure are subclasses of Object no
1339 // data members can be present in Object.
1340 class Object : public MaybeObject {
1354 // Returns true if this object is an instance of the specified
1427 // Returns true if the object is of the correct type to be used as a
1437 // native_context is used when creating wrapper object.
1452 Object* receiver,
1456 static Handle<Object> GetProperty(Handle<Object> object, Handle<Name> key);
1457 static Handle<Object> GetProperty(Handle<Object> object,
1458 Handle<Object> receiver,
1464 Handle<Object> object,
1465 Handle<Object> receiver,
1470 MUST_USE_RESULT MaybeObject* GetProperty(Object* receiver,
1475 MUST_USE_RESULT MaybeObject* GetPropertyWithDefinedGetter(Object* receiver,
1478 static Handle<Object> GetElement(Handle<Object> object, uint32_t index);
1481 inline Object* GetElementNoExceptionThrown(uint32_t index);
1482 MUST_USE_RESULT MaybeObject* GetElementWithReceiver(Object* receiver,
1485 // Return the object's prototype (might be Heap::null_value()).
1486 Object* GetPrototype(Isolate* isolate);
1488 // Returns the permanent hash code associated with this object depending on
1489 // the actual object type. Might return a failure in case no hash was
1493 // Checks whether this object has the same value as the given one. This
1496 bool SameValue(Object* other);
1498 // Tries to convert an object to an array index. Returns true and sets
1507 // Verify a pointer is a valid object pointer.
1508 static void VerifyPointer(Object* p);
1513 // Prints this object without details.
1519 // Prints this object without details to a message accumulator.
1523 static Object* cast(Object* value) { return value; }
1526 static const int kHeaderSize = 0; // Object does not take up any space.
1529 DISALLOW_IMPLICIT_CONSTRUCTORS(Object);
1539 class Smi: public Object {
1544 // Convert a value to a Smi object.
1553 static inline Smi* cast(Object* object);
1575 // are transient and cannot occur as part of the object graph.
1627 static inline Failure* cast(MaybeObject* object);
1649 // value in a heap object's first word.
1662 // contains a forwarding address (a heap object pointer in the to space).
1666 // when all map words are heap object pointers, i.e. not during a full GC).
1670 static inline MapWord FromForwardingAddress(HeapObject* object);
1695 class HeapObject: public Object {
1697 // [map]: Contains a map which contains the object's reflective
1701 // The no-write-barrier version. This is OK if the object is white and in
1702 // new space, or if the value is an immortal immutable object, like the maps
1706 // During garbage collection, the map word of a heap object does not
1711 // The Heap the object was allocated in. Used also to access Isolate.
1725 // Iterates over pointers contained in the object (including the Map)
1728 // Iterates over all pointers contained in the object except the
1729 // first map pointer. The object type is given in the first
1731 // object, and so is safe to call while the map pointer is modified.
1734 // Returns the heap object's size in bytes
1737 // Given a heap object's map pointer, returns the heap size in bytes
1742 // Returns the field at offset in obj, as a read/write Object* reference.
1746 static inline Object** RawField(HeapObject* obj, int offset);
1749 static inline HeapObject* cast(Object* obj);
1753 // object as a sign that they are not going to use this function
1773 // Verify a pointer is a valid HeapObject pointer that points to object
1775 static void VerifyHeapPointer(Object* p);
1779 // First field in a heap object is map.
1780 static const int kMapOffset = Object::kHeaderSize;
1797 // This class describes a body of an object of a fixed size
1817 // This class describes a body of an object of a variable size
1846 static inline HeapNumber* cast(Object* obj);
1943 static inline JSReceiver* cast(Object* obj);
1945 static Handle<Object> SetProperty(Handle<JSReceiver> object,
1947 Handle<Object> value,
1952 Handle<JSReceiver> object,
1954 Handle<Object> value,
1962 Object* value,
1969 Object* value,
1974 Object* value);
1976 static Handle<Object> DeleteProperty(Handle<JSReceiver> object,
1979 static Handle<Object> DeleteElement(Handle<JSReceiver> object,
1986 Object* value,
1998 // function that was used to instantiate the object).
2015 // Return the object's prototype (might be Heap::null_value()).
2016 inline Object* GetPrototype();
2019 inline Object* GetConstructor();
2021 // Retrieves a permanent object identity hash code. The undefined value might
2060 // corrensponds to a set of object representations of elements that
2074 // arguments object.
2080 // Returns true if an object has elements of FAST_SMI_ELEMENTS ElementsKind.
2082 // Returns true if an object has elements of FAST_ELEMENTS ElementsKind.
2084 // Returns true if an object has elements of FAST_ELEMENTS or
2087 // Returns true if an object has any of the fast elements kinds.
2089 // Returns true if an object has elements of FAST_DOUBLE_ELEMENTS
2092 // Returns true if an object has elements of FAST_HOLEY_*_ELEMENTS
2129 MUST_USE_RESULT MaybeObject* GetPropertyWithCallback(Object* receiver,
2130 Object* structure,
2136 Object* value,
2143 Object* value,
2147 Object* structure,
2149 Object* value,
2154 Object* value,
2159 Object* value,
2165 static Handle<Object> SetLocalPropertyIgnoreAttributes(
2166 Handle<JSObject> object,
2168 Handle<Object> value,
2185 static void AllocateStorageForMap(Handle<JSObject> object, Handle<Map> map);
2191 static Handle<Object> TryMigrateInstance(Handle<JSObject> instance);
2197 Object* value,
2202 // Retrieve a value in a normalized object given a lookup result.
2204 Object* GetNormalizedProperty(LookupResult* result);
2206 // Sets the property value in a normalized object given (key, value).
2208 static Handle<Object> SetNormalizedProperty(Handle<JSObject> object,
2210 Handle<Object> value);
2212 // Sets the property value in a normalized object given a lookup result.
2215 Object* value);
2217 // Sets the property value in a normalized object given (key, value, details).
2219 static Handle<Object> SetNormalizedProperty(Handle<JSObject> object,
2221 Handle<Object> value,
2225 Object* value,
2228 static void OptimizeAsPrototype(Handle<JSObject> object);
2243 Object* receiver,
2251 static void DefineAccessor(Handle<JSObject> object,
2253 Handle<Object> getter,
2254 Handle<Object> setter,
2261 // Used from Object::GetProperty().
2263 Object* receiver,
2268 Object* receiver,
2272 Object* receiver,
2276 Object* receiver,
2286 inline Object* BypassGlobalProxy();
2288 // Accessors for hidden properties object.
2290 // Hidden properties are not local properties of the object itself.
2293 // receiver is a JSGlobalProxy then the auxiliary object is a property
2297 // Sets a hidden property on this object. Returns this object if successful,
2299 static Handle<Object> SetHiddenProperty(Handle<JSObject> obj,
2301 Handle<Object> value);
2303 MUST_USE_RESULT MaybeObject* SetHiddenProperty(Name* key, Object* value);
2307 Object* GetHiddenProperty(Name* key);
2311 // Returns true if the object has a property with the hidden string as name.
2318 static Handle<Object> DeleteElement(Handle<JSObject> obj,
2325 // Makes sure that this object can contain HeapObject as elements.
2328 // Makes sure that this object can contain the specified elements.
2330 Object** elements,
2347 // this object takes up nearly as much space as a fast-case backing
2370 Object* value,
2376 Object* value,
2384 Object* value,
2388 static Handle<Object> SetOwnElement(Handle<JSObject> object,
2390 Handle<Object> value,
2394 static Handle<Object> SetElement(
2395 Handle<JSObject> object,
2397 Handle<Object> value,
2402 // A Failure object is returned if GC is needed.
2405 Object* value,
2412 // The undefined object if index is out of bounds.
2413 MUST_USE_RESULT MaybeObject* GetElementWithInterceptor(Object* receiver,
2449 inline Object* GetInternalField(int index);
2450 inline void SetInternalField(int index, Object* value);
2458 uint32_t index, Object* value, bool* found, StrictModeFlag strict_mode);
2461 // Returns the number of properties on this object filtering out properties
2469 // Returns the number of properties on this object filtering out properties
2474 // Returns the number of elements on this object filtering out elements
2484 // Add a property to a fast-case object using a map transition to
2489 Object* value,
2493 // Add a constant function property to a fast-case object.
2495 // if it is called on a second object with this map, a
2501 Object* constant,
2506 Object* value,
2509 // Returns a new map with all transitions dropped from the object's current
2511 static Handle<Map> GetElementsTransitionMap(Handle<JSObject> object,
2519 static Handle<Object> TransitionElementsKind(Handle<JSObject> object,
2529 Object* new_value,
2536 Object* new_value,
2545 // Add a property to a fast-case object.
2548 Object* value,
2553 // Add a property to a slow-case object.
2555 Object* value,
2558 // Add a property to an object. May cause GC.
2561 Object* value,
2569 // Convert the object to use the canonical dictionary
2570 // representation. If the object is expected to have additional properties
2573 static void NormalizeProperties(Handle<JSObject> object,
2584 Handle<JSObject> object);
2588 static void UpdateMapCodeCache(Handle<JSObject> object,
2596 static void TransformToFastProperties(Handle<JSObject> object,
2602 // Access fast-case object properties at index.
2606 inline Object* RawFastPropertyAt(int index);
2607 inline void FastPropertyAtPut(int index, Object* value);
2609 // Access to in object properties.
2611 inline Object* InObjectPropertyAt(int index);
2612 inline Object* InObjectPropertyAtPut(int index,
2613 Object* value,
2617 // Set the object's prototype (only JSReceiver and null are allowed values).
2618 static Handle<Object> SetPrototype(Handle<JSObject> object,
2619 Handle<Object> value,
2628 Object* pre_allocated_value,
2629 Object* filler_value);
2631 // Check whether this object references another object
2632 bool ReferencesObject(Object* obj);
2635 static inline JSObject* cast(Object* obj);
2637 // Disalow further properties to be added to the object.
2638 static Handle<Object> PreventExtensions(Handle<JSObject> object);
2641 // ES5 Object.freeze
2645 // Called the first time an object is observed with ES7 Object.observe.
2648 // Copy object
2696 Object* SlowReverseLookup(Object* value);
2732 // to the same object requires fewer allocations and copies.
2744 static inline int SizeOf(Map* map, HeapObject* object);
2747 // Enqueue change record for Object.observe. May cause GC.
2748 static void EnqueueChangeRecord(Handle<JSObject> object,
2751 Handle<Object> old_value);
2760 MUST_USE_RESULT MaybeObject* GetElementWithCallback(Object* receiver,
2761 Object* structure,
2763 Object* holder);
2773 Object* structure,
2775 Object* value,
2780 Object* value,
2787 Object* value,
2799 Object* value,
2804 static Handle<Object> DeleteProperty(Handle<JSObject> object,
2807 static Handle<Object> DeletePropertyPostInterceptor(Handle<JSObject> object,
2810 static Handle<Object> DeletePropertyWithInterceptor(Handle<JSObject> object,
2813 // Deletes the named property in a normalized object.
2814 static Handle<Object> DeleteNormalizedProperty(Handle<JSObject> object,
2826 Object* object);
2837 Object* structure,
2841 Object* structure,
2843 static void DefineElementAccessor(Handle<JSObject> object,
2845 Handle<Object> getter,
2846 Handle<Object> setter,
2848 static Handle<AccessorPair> CreateAccessorPairFor(Handle<JSObject> object,
2850 static void DefinePropertyAccessor(Handle<JSObject> object,
2852 Handle<Object> getter,
2853 Handle<Object> setter,
2858 static bool DefineFastAccessor(Handle<JSObject> object,
2861 Handle<Object> accessor,
2878 Object* value);
2892 inline static FixedArrayBase* cast(Object* object);
2905 // FixedArray describes fixed-sized arrays with element type Object*.
2909 inline Object* get(int index);
2911 inline void set(int index, Object* value);
2917 inline void set(int index, Object* value, WriteBarrierMode mode);
2928 inline Object** GetFirstElementAddress();
2932 inline Object** data_start();
2954 static inline FixedArray* cast(Object* obj);
2972 // numbers array are the same object, the elements are only swapped
2978 // object, the prefix of this array is sorted.
2983 static inline int SizeOf(Map* map, HeapObject* object) {
2984 return SizeFor(reinterpret_cast<FixedArray*>(object)->length());
2993 Object* value);
2996 // only be used if the object is guaranteed to be white (whiteness witness
3000 Object* value);
3041 static inline FixedDoubleArray* cast(Object* obj);
3072 // candidates will be discovered when the object is scanned. A witness is
3126 Object* object = get(kEnumCacheIndex);
3127 if (object->IsSmi()) return false;
3128 FixedArray* bridge = FixedArray::cast(object);
3138 Object** GetEnumCacheSlot() {
3150 Object* new_index_cache);
3154 inline Object** GetKeySlot(int descriptor_number);
3155 inline Object* GetValue(int descriptor_number);
3156 inline Object** GetValueSlot(int descriptor_number);
3157 inline Object** GetDescriptorStartSlot(int descriptor_number);
3158 inline Object** GetDescriptorEndSlot(int descriptor_number);
3162 inline Object* GetConstant(int descriptor_number);
3163 inline Object* GetCallbacksObject(int descriptor_number);
3221 // empty descriptor array object if number_of_descriptors is 0.
3226 static inline DescriptorArray* cast(Object* obj);
3291 inline Object* GetCallbackObject() { return descs_->GetValue(index_); }
3350 // static bool IsMatch(Key key, Object* other);
3353 // // Returns the hash value for object.
3354 // static uint32_t HashForObject(Key key, Object* object);
3355 // // Convert key to an object.
3356 // static inline Object* AsObject(Heap* heap, Key key);
3376 static uint32_t HashForObject(Key key, Object* object) { return 0; }
3377 static uint32_t SeededHashForObject(Key key, uint32_t seed, Object* object) {
3379 return HashForObject(key, object);
3401 inline uint32_t HashForObject(Key key, Object* object) {
3404 GetHeap()->HashSeed(), object);
3406 return Shape::HashForObject(key, object);
3440 // Returns a new HashTable object. Might return Failure.
3452 Object* KeyAt(int entry) { return get(EntryToIndex(entry)); }
3456 bool IsKey(Object* k) {
3465 static inline HashTable* cast(Object* obj);
3557 // Returns whether the other object matches this key.
3558 virtual bool IsMatch(Object* other) = 0;
3561 // Returns the hash value for object.
3562 virtual uint32_t HashForObject(Object* key) = 0;
3563 // Returns the key object for storing into the hash table.
3564 // If allocations fails a failure object is returned.
3573 static inline bool IsMatch(HashTableKey* key, Object* value) {
3579 static inline uint32_t HashForObject(HashTableKey* key, Object* object) {
3580 return key->HashForObject(object);
3605 Object** s);
3608 Object** s);
3613 Object** s);
3616 Object** s);
3617 MUST_USE_RESULT MaybeObject* LookupString(String* key, Object** s);
3626 static inline StringTable* cast(Object* obj);
3629 MUST_USE_RESULT MaybeObject* LookupKey(HashTableKey* key, Object** s);
3639 static inline bool IsMatch(HashTableKey* key, Object* value) {
3646 static inline uint32_t HashForObject(HashTableKey* key, Object* object) {
3647 return key->HashForObject(object);
3663 // Used for canonicalize maps for object literals.
3667 Object* Lookup(FixedArray* key);
3669 static inline MapCache* cast(Object* obj);
3679 static inline Dictionary<Shape, Key>* cast(Object* obj) {
3684 Object* ValueAt(int entry) {
3689 void ValueAtPut(int entry, Object* value) {
3709 Object* DeleteProperty(int entry, JSObject::DeleteMode mode);
3758 Object* SlowReverseLookup(Object* value);
3762 Object* key,
3763 Object* value);
3765 Object* key,
3766 Object* value,
3770 Object* value,
3775 MUST_USE_RESULT MaybeObject* AtPut(Key key, Object* value);
3779 Object* value,
3793 static inline bool IsMatch(Name* key, Object* other);
3795 static inline uint32_t HashForObject(Name* key, Object* object);
3806 static inline NameDictionary* cast(Object* obj) {
3829 static inline bool IsMatch(uint32_t key, Object* other);
3845 Object* object);
3854 static inline uint32_t HashForObject(uint32_t key, Object* object);
3861 static SeededNumberDictionary* cast(Object* obj) {
3867 MUST_USE_RESULT MaybeObject* AtNumberPut(uint32_t key, Object* value);
3869 Object* value,
3877 Handle<Object> value,
3881 Object* value,
3909 static UnseededNumberDictionary* cast(Object* obj) {
3915 MUST_USE_RESULT MaybeObject* AtNumberPut(uint32_t key, Object* value);
3916 MUST_USE_RESULT MaybeObject* AddNumberEntry(uint32_t key, Object* value);
3923 Handle<Object> value);
3925 MUST_USE_RESULT MaybeObject* Set(uint32_t key, Object* value);
3930 class ObjectHashTableShape : public BaseShape<Object*> {
3932 static inline bool IsMatch(Object* key, Object* other);
3933 static inline uint32_t Hash(Object* key);
3934 static inline uint32_t HashForObject(Object* key, Object* object);
3936 Object* key);
3944 class ObjectHashSet: public HashTable<ObjectHashTableShape<1>, Object*> {
3946 static inline ObjectHashSet* cast(Object* obj) {
3952 bool Contains(Object* key);
3955 MUST_USE_RESULT MaybeObject* Add(Object* key);
3958 MUST_USE_RESULT MaybeObject* Remove(Object* key);
3962 // ObjectHashTable maps keys that are arbitrary objects to object values by
3964 class ObjectHashTable: public HashTable<ObjectHashTableShape<2>, Object*> {
3966 static inline ObjectHashTable* cast(Object* obj) {
3973 Object* Lookup(Object* key);
3977 MUST_USE_RESULT MaybeObject* Put(Object* key, Object* value);
3982 void AddEntry(int entry, Object* key, Object* value);
4022 static inline JSFunctionResultCache* cast(Object* obj);
4033 // This object provides quick access to scope info details for runtime
4037 static inline ScopeInfo* cast(Object* object);
4129 // Copies all the context locals into an object used to materialize a scope.
4243 MUST_USE_RESULT MaybeObject* Get(JSObject* object,
4249 static inline NormalizedMapCache* cast(Object* obj);
4284 // Returns a pointer to the ByteArray object for a given data start address.
4288 static inline ByteArray* cast(Object* obj);
4321 static inline FreeSpace* cast(Object* obj);
4359 static inline ExternalArray* cast(Object* obj);
4376 // semantics used for implementing the CanvasPixelArray object. Please see the
4394 Object* SetValue(uint32_t index, Object* value);
4397 static inline ExternalPixelArray* cast(Object* obj);
4417 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4420 static inline ExternalByteArray* cast(Object* obj);
4440 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4443 static inline ExternalUnsignedByteArray* cast(Object* obj);
4463 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4466 static inline ExternalShortArray* cast(Object* obj);
4486 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4489 static inline ExternalUnsignedShortArray* cast(Object* obj);
4509 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4512 static inline ExternalIntArray* cast(Object* obj);
4532 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4535 static inline ExternalUnsignedIntArray* cast(Object* obj);
4555 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4558 static inline ExternalFloatArray* cast(Object* obj);
4578 MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value);
4581 static inline ExternalDoubleArray* cast(Object* obj);
4666 static inline DeoptimizationInputData* cast(Object* obj);
4712 static inline DeoptimizationOutputData* cast(Object* obj);
4742 // The object that indicates an uninitialized cache.
4743 static inline Handle<Object> UninitializedSentinel(Isolate* isolate);
4745 // The object that indicates a megamorphic state.
4746 static inline Handle<Object> MegamorphicSentinel(Isolate* isolate);
4748 // The object that indicates a monomorphic state of Array with
4750 static inline Handle<Object> MonomorphicArraySentinel(Isolate* isolate,
4755 static inline Object* RawUninitializedSentinel(Heap* heap);
4758 static inline TypeFeedbackCells* cast(Object* obj);
4861 // Will contain either a TypeFeedbackInfo object, or JSFunction object,
4863 DECL_ACCESSORS(type_feedback_info, Object)
4864 inline void InitializeTypeFeedbackInfoNoWriteBarrier(Object* value);
4869 inline Object* code_to_deoptimize_link();
4870 inline void set_code_to_deoptimize_link(Object* value);
4871 inline Object** code_to_deoptimize_link_slot();
4876 DECL_ACCESSORS(gc_metadata, Object)
4879 // at the moment when this object was created.
4932 // For kind STUB or ICs, tells whether or not a code object was generated by
4969 // the code object was seen on the stack with no IC patching going on.
5015 // Find an object in a stub with a specified map
5016 Object* FindNthObject(int n, Map* match_map);
5017 void ReplaceNthObject(int n, Map* match_map, Object* replace_with);
5085 // Convert a target address into a code object.
5088 // Convert an entry address into an object.
5089 static inline Object* GetObjectFromEntryAddress(Address location_of_address);
5106 // Returns true if pc is inside this object's instructions.
5110 // object has been moved by delta bytes.
5116 // Returns the object size for a given body (used for allocation).
5122 // Calculate the size of the code object to report for log events. This takes
5123 // the layout of the code object into account.
5125 // Check that the assumptions about the layout of the code object holds.
5136 static inline Code* cast(Object* obj);
5163 // relatively safe to flush this code object and replace it with the lazy
5203 // the Code object header.
5338 // code object of the first group. In other words, code index 0 corresponds
5351 // described by this map. The group is deoptimized whenever an object
5364 // Array for holding the index of the first code object of each group.
5379 Handle<Object> object);
5396 inline void set_object_at(int i, Object* object);
5397 inline Object** slot_at(int i);
5398 inline Object* object_at(int i);
5401 static inline DependentCode* cast(Object* object);
5403 static DependentCode* ForObject(Handle<HeapObject> object,
5416 // - Size information about the object
5417 // - How to iterate over an object (for garbage collection)
5426 // Count of properties allocated in the object.
5430 // Count of property fields pre-allocated in the object when first allocated.
5467 // Tells whether the object in the prototype property will be used
5482 // Object.getPrototypeOf() function and the __proto__ accessor.
5510 // An undetectable object is a special class of JSObject: 'typeof' operator
5512 // a normal JS object. It is useful for implementing undetectable
5657 // [prototype]: implicit prototype object.
5658 DECL_ACCESSORS(prototype, Object)
5661 DECL_ACCESSORS(constructor, Object)
5663 // [instance descriptors]: describes the object.
5668 DECL_ACCESSORS(code_cache, Object)
5677 inline Object* GetBackPointer();
5678 inline void SetBackPointer(Object* value,
5680 inline void init_back_pointer(Object* undefined);
5684 // when we change object's prototype to a new one.
5729 // object space. Otherwise ClearNonLiveTransitions would leak memory while
5838 static inline Map* cast(Object* obj);
5857 Handle<Object> descriptors);
5862 Object* FindInCodeCache(Name* name, Code::Flags flags);
5864 // Returns the non-negative index of the code object if it is in the
5866 int IndexInCodeCache(Object* name, Code* code);
5868 // Removes a code object from the code cache at the given index.
5914 // Fires when the layout of an object with a leaf map changes.
5945 // When you set the prototype of an object using the __proto__ accessor you
5946 // need a new map for the object (the prototype is stored in the map). In
5954 Handle<Object> prototype);
5956 Handle<Object> prototype,
6055 static inline Struct* cast(Object* that);
6063 DECL_ACCESSORS(value, Object)
6065 static inline Box* cast(Object* obj);
6102 DECL_ACCESSORS(source, Object)
6105 DECL_ACCESSORS(name, Object)
6118 DECL_ACCESSORS(data, Object)
6121 DECL_ACCESSORS(context_data, Object)
6130 DECL_ACCESSORS(line_ends, Object)
6134 DECL_ACCESSORS(eval_from_shared, Object)
6159 static inline Script* cast(Object* obj);
6199 // Each entry has a name of a global object property holding an object
6201 // on the object (the one the id is set for), and a label.
6252 DECL_ACCESSORS(name, Object)
6260 DECL_ACCESSORS(optimized_code_map, Object)
6274 // Removed a specific optimized code object from the optimized code map.
6364 // Proceed to create an object in the current context (with the adjusted
6385 // object reference this map).
6386 DECL_ACCESSORS(initial_map, Object)
6421 DECL_ACCESSORS(instance_class_name, Object)
6429 DECL_ACCESSORS(function_data, Object)
6437 DECL_ACCESSORS(script, Object)
6452 DECL_ACCESSORS(debug_info, Object)
6457 // all functions are anonymous but are assigned to object
6529 // False if the function definitely does not allocate an arguments object.
6538 // global object.
6591 Handle<Object> GetSourceCode();
6619 // Calculate the number of in-object properties.
6637 static inline SharedFunctionInfo* cast(Object* obj);
6830 // [function]: The function corresponding to this generator object.
6837 DECL_ACCESSORS(receiver, Object)
6856 static inline JSGeneratorObject* cast(Object* obj);
6879 // Yielding from a generator returns an object with the following inobject
6899 DECL_ACCESSORS(context, Object)
6905 static inline JSModule* cast(Object* obj);
6925 DECL_ACCESSORS(prototype_or_initial_map, Object)
6933 inline void set_context(Object* context);
6935 // [code]: The generated code object for this function. Executed
6989 // If the function contains object, regexp or array literals, the
6990 // literals array prefix contains the object, regexp, and array
6992 // necessary so that we do not dynamically lookup the object, regexp
7008 // The initial map for an object created by this constructor.
7019 inline Object* prototype();
7020 inline Object* instance_prototype();
7022 Handle<Object> value);
7024 Handle<Object> value);
7047 DECL_ACCESSORS(next_function_link, Object)
7056 static inline JSFunction* cast(Object* obj);
7059 // through pointers to the first instruction in the code object.
7111 // [native_context]: the owner native context of this global proxy object.
7112 // It is null value if this object is not used by any context.
7113 DECL_ACCESSORS(native_context, Object)
7116 static inline JSGlobalProxy* cast(Object* obj);
7138 // [builtins]: the object holding the runtime routines written in JS.
7141 // [native context]: the natives corresponding to this global object.
7147 // [global receiver]: the global receiver object of the context
7156 // on the object.
7157 Object* GetPropertyNoExceptionThrown(Name* key) {
7158 Object* answer = GetProperty(key)->ToObjectUnchecked();
7162 // Ensure that the global object has a cell for the given property name.
7167 static inline GlobalObject* cast(Object* obj);
7181 // JavaScript global object.
7185 static inline JSGlobalObject* cast(Object* obj);
7199 // Builtins global object which holds the runtime routines written in
7204 inline Object* javascript_builtin(Builtins::JavaScript id);
7205 inline void set_javascript_builtin(Builtins::JavaScript id, Object* value);
7212 static inline JSBuiltinsObject* cast(Object* obj);
7218 // Layout description. The size of the builtins object includes
7220 // (function and code object).
7244 // [value]: the object being wrapped.
7245 DECL_ACCESSORS(value, Object)
7248 static inline JSValue* cast(Object* obj);
7270 DECL_ACCESSORS(value, Object)
7272 DECL_ACCESSORS(year, Object)
7274 DECL_ACCESSORS(month, Object)
7276 DECL_ACCESSORS(day, Object)
7278 DECL_ACCESSORS(weekday, Object)
7280 DECL_ACCESSORS(hour, Object)
7282 DECL_ACCESSORS(min, Object)
7284 DECL_ACCESSORS(sec, Object)
7287 DECL_ACCESSORS(cache_stamp, Object)
7290 static inline JSDate* cast(Object* obj);
7294 static Object* GetField(Object* date, Smi* index);
7296 void SetValue(Object* value, bool is_value_nan);
7345 inline Object* DoGetField(FieldIndex index);
7347 Object* GetUTCField(FieldIndex index, double value, DateCache* date_cache);
7358 // the API. The messages are formatted in JavaScript so this object is
7359 // a real JavaScript object. The information used for formatting the
7372 DECL_ACCESSORS(script, Object)
7375 DECL_ACCESSORS(stack_trace, Object)
7377 // [stack_frames]: an array of stack frames for this error object.
7378 DECL_ACCESSORS(stack_frames, Object)
7389 static inline JSMessageObject* cast(Object* obj);
7448 DECL_ACCESSORS(data, Object)
7454 inline Object* DataAt(int index);
7455 // Set implementation data after the object has been prepared.
7456 inline void SetDataAt(int index, Object* value);
7474 static inline JSRegExp* cast(Object* obj);
7495 // fails, this fields hold an exception object that should be
7499 // fails, this fields hold an exception object that should be
7528 // In-object fields.
7536 // The uninitialized value for a regexp code object.
7539 // The compilation error value for the regexp code object. The real error
7540 // object is in the saved code field.
7552 static inline bool IsMatch(HashTableKey* key, Object* value) {
7560 static inline uint32_t HashForObject(HashTableKey* key, Object* object) {
7561 return key->HashForObject(object);
7578 Object* Lookup(String* src, Context* context);
7579 Object* LookupEval(String* src,
7583 Object* LookupRegExp(String* source, JSRegExp::Flags flags);
7586 Object* value);
7596 void Remove(Object* value);
7598 static inline CompilationCacheTable* cast(Object* obj);
7608 DECL_ACCESSORS(normal_type_cache, Object)
7610 // Add the code object to the cache.
7613 // Lookup code object in the cache. Returns code object if found and undefined
7615 Object* Lookup(Name* name, Code::Flags flags);
7617 // Get the internal index of a code object in the cache. Returns -1 if the
7618 // code object is not in that cache. This index can be used to later call
7621 int GetIndex(Object* name, Code* code);
7623 // Remove an object from the cache with the provided internal index.
7624 void RemoveByIndex(Object* name, Code* code, int index);
7626 static inline CodeCache* cast(Object* obj);
7640 Object* LookupDefaultCache(Name* name, Code::Flags flags);
7641 Object* LookupNormalTypeCache(Name* name, Code::Flags flags);
7655 static inline bool IsMatch(HashTableKey* key, Object* value) {
7663 static inline uint32_t HashForObject(HashTableKey* key, Object* object) {
7664 return key->HashForObject(object);
7680 Object* Lookup(Name* name, Code::Flags flags);
7686 static inline CodeCacheHashTable* cast(Object* obj);
7698 DECL_ACCESSORS(cache, Object)
7710 Handle<Object> Lookup(MapHandleList* maps, Code::Flags flags);
7712 static inline PolymorphicCodeCache* cast(Object* obj);
7729 Object* Lookup(MapHandleList* maps, int code_kind);
7735 static inline PolymorphicCodeCacheHashTable* cast(Object* obj);
7761 static inline TypeFeedbackInfo* cast(Object* obj);
7801 DECL_ACCESSORS(transition_info, Object)
7802 DECL_ACCESSORS(weak_next, Object)
7827 static inline AllocationSite* cast(Object* obj);
7851 DECL_ACCESSORS(allocation_site, Object)
7862 // Returns NULL if no AllocationMemento is available for object.
7863 static AllocationMemento* FindForJSObject(JSObject* object);
7864 static inline AllocationMemento* cast(Object* obj);
7884 static inline AliasedArgumentsEntry* cast(Object* obj);
8026 static inline Name* cast(Object* obj);
8095 DECL_ACCESSORS(name, Object)
8098 static inline Symbol* cast(Object* obj);
8235 // Mark the string as an undetectable object. It only applies to
8287 static inline String* cast(Object* obj);
8444 static inline SeqString* cast(Object* obj);
8475 static inline SeqOneByteString* cast(Object* obj);
8517 static inline SeqTwoByteString* cast(Object* obj);
8554 inline Object* unchecked_first();
8562 inline Object* unchecked_second();
8570 static inline ConsString* cast(Object* obj);
8614 static inline SlicedString* cast(Object* obj);
8647 static inline ExternalString* cast(Object* obj);
8692 static inline ExternalAsciiString* cast(Object* obj);
8732 static inline ExternalTwoByteString* cast(Object* obj);
8885 DECL_ACCESSORS(to_number, Object)
8891 static inline Oddball* cast(Object* obj);
8898 Object* to_number,
8933 DECL_ACCESSORS(value, Object)
8936 static inline Cell* cast(Object* obj);
8939 Object* result = FromAddress(value - kValueOffset);
8980 Object* value,
8984 static inline PropertyCell* cast(Object* obj);
9011 Handle<Object> value);
9014 DECL_ACCESSORS(type_raw, Object)
9023 DECL_ACCESSORS(handler, Object)
9026 DECL_ACCESSORS(hash, Object)
9029 static inline JSProxy* cast(Object* obj);
9035 Object* receiver,
9038 Object* receiver,
9044 Object* value,
9050 Object* value,
9060 Object* value,
9078 inline void InitializeBody(int object_size, Object* value);
9082 Handle<Object> CallTrap(const char* name,
9083 Handle<Object> derived_trap,
9085 Handle<Object> args[]);
9110 static Handle<Object> DeletePropertyWithHandler(Handle<JSProxy> object,
9113 static Handle<Object> DeleteElementWithHandler(Handle<JSProxy> object,
9124 DECL_ACCESSORS(call_trap, Object)
9127 DECL_ACCESSORS(construct_trap, Object)
9130 static inline JSFunctionProxy* cast(Object* obj);
9158 DECL_ACCESSORS(table, Object)
9161 static inline JSSet* cast(Object* obj);
9179 DECL_ACCESSORS(table, Object)
9182 static inline JSMap* cast(Object* obj);
9200 DECL_ACCESSORS(table, Object)
9203 DECL_ACCESSORS(next, Object)
9218 static inline JSWeakMap* cast(Object* obj);
9233 static inline JSWeakSet* cast(Object* obj);
9250 DECL_ACCESSORS(byte_length, Object)
9259 DECL_ACCESSORS(weak_next, Object)
9262 DECL_ACCESSORS(weak_first_view, Object)
9265 static inline JSArrayBuffer* cast(Object* obj);
9295 DECL_ACCESSORS(buffer, Object)
9298 DECL_ACCESSORS(byte_offset, Object)
9301 DECL_ACCESSORS(byte_length, Object)
9304 DECL_ACCESSORS(weak_next, Object)
9307 static inline JSArrayBufferView* cast(Object* obj);
9328 DECL_ACCESSORS(length, Object)
9334 static inline JSTypedArray* cast(Object* obj);
9360 static inline JSDataView* cast(Object* obj);
9386 static inline Foreign* cast(Object* obj);
9418 DECL_ACCESSORS(length, Object)
9425 Object* value);
9435 MUST_USE_RESULT MaybeObject* SetElementsLength(Object* length);
9441 static inline JSArray* cast(Object* obj);
9467 Handle<Object> CacheInitialJSArrayMaps(Handle<Context> native_context,
9472 // This initial map adds in-object properties for "index" and "input"
9479 // Offsets of object fields.
9483 // Indices of in-object properties.
9493 DECL_ACCESSORS(name, Object)
9495 DECL_ACCESSORS(expected_receiver_type, Object)
9510 inline bool IsCompatibleReceiver(Object* receiver);
9512 static inline AccessorInfo* cast(Object* obj);
9606 static inline DeclaredAccessorDescriptor* cast(Object* obj);
9629 static inline DeclaredAccessorInfo* cast(Object* obj);
9650 // a new value is added to the local object when the property is set.
9654 DECL_ACCESSORS(getter, Object)
9655 DECL_ACCESSORS(setter, Object)
9656 DECL_ACCESSORS(data, Object)
9658 static inline ExecutableAccessorInfo* cast(Object* obj);
9682 DECL_ACCESSORS(getter, Object)
9683 DECL_ACCESSORS(setter, Object)
9685 static inline AccessorPair* cast(Object* obj);
9689 Object* get(AccessorComponent component) {
9693 void set(AccessorComponent component, Object* value) {
9702 Object* GetComponent(AccessorComponent component);
9705 void SetComponents(Object* getter, Object* setter) {
9726 // Object.defineProperty(obj, "foo", {get: undefined});
9728 bool IsJSAccessor(Object* obj) {
9738 DECL_ACCESSORS(named_callback, Object)
9739 DECL_ACCESSORS(indexed_callback, Object)
9740 DECL_ACCESSORS(data, Object)
9742 static inline AccessCheckInfo* cast(Object* obj);
9760 DECL_ACCESSORS(getter, Object)
9761 DECL_ACCESSORS(setter, Object)
9762 DECL_ACCESSORS(query, Object)
9763 DECL_ACCESSORS(deleter, Object)
9764 DECL_ACCESSORS(enumerator, Object)
9765 DECL_ACCESSORS(data, Object)
9767 static inline InterceptorInfo* cast(Object* obj);
9788 DECL_ACCESSORS(callback, Object)
9789 DECL_ACCESSORS(data, Object)
9791 static inline CallHandlerInfo* cast(Object* obj);
9808 DECL_ACCESSORS(tag, Object)
9809 DECL_ACCESSORS(property_list, Object)
9824 DECL_ACCESSORS(serial_number, Object)
9825 DECL_ACCESSORS(call_code, Object)
9826 DECL_ACCESSORS(property_accessors, Object)
9827 DECL_ACCESSORS(prototype_template, Object)
9828 DECL_ACCESSORS(parent_template, Object)
9829 DECL_ACCESSORS(named_property_handler, Object)
9830 DECL_ACCESSORS(indexed_property_handler, Object)
9831 DECL_ACCESSORS(instance_template, Object)
9832 DECL_ACCESSORS(class_name, Object)
9833 DECL_ACCESSORS(signature, Object)
9834 DECL_ACCESSORS(instance_call_handler, Object)
9835 DECL_ACCESSORS(access_check_info, Object)
9844 // If the bit is set, object instances created by this function
9849 static inline FunctionTemplateInfo* cast(Object* obj);
9890 DECL_ACCESSORS(constructor, Object)
9891 DECL_ACCESSORS(internal_field_count, Object)
9893 static inline ObjectTemplateInfo* cast(Object* obj);
9908 DECL_ACCESSORS(receiver, Object)
9909 DECL_ACCESSORS(args, Object)
9911 static inline SignatureInfo* cast(Object* obj);
9928 DECL_ACCESSORS(types, Object)
9930 static inline TypeSwitchInfo* cast(Object* obj);
9948 // Code object for the original code.
9950 // Code object for the patched code. This code object is the code object
9958 // Get the break point info object for a code position.
9959 Object* GetBreakPointInfo(int code_position);
9963 Handle<Object> break_point_object);
9967 Handle<Object> break_point_object);
9969 Object* GetBreakPointObjects(int code_position);
9970 // Find the break point info holding this break point object.
9971 static Object* FindBreakPointInfo(Handle<DebugInfo> debug_info,
9972 Handle<Object> break_point_object);
9976 static inline DebugInfo* cast(Object* obj);
10002 // function. The DebugInfo object holds a BreakPointInfo object for each code
10014 DECL_ACCESSORS(break_point_objects, Object)
10018 Handle<Object> break_point_object);
10021 Handle<Object> break_point_object);
10022 // Check if break point info has this break point object.
10024 Handle<Object> break_point_object);
10028 static inline BreakPointInfo* cast(Object* obj);
10090 virtual void VisitPointers(Object** start, Object** end) = 0;
10121 virtual void VisitPointer(Object** p) { VisitPointers(p, p + 1); }
10123 // Visit pointer embedded into a code object.
10138 virtual void VisitEmbedderReference(Object** p, uint16_t class_id) {}
10150 static inline int SizeOf(Map* map, HeapObject* object) {