Lines Matching refs:JSHandle

69     PropertyDescriptor(const JSThread *thread, JSHandle<JSTaggedValue> v) : thread_(thread), value_(v) {}
71 PropertyDescriptor(const JSThread *thread, JSHandle<JSTaggedValue> v, bool w, bool e, bool c)
84 : PropertyDescriptor(thread, JSHandle<JSTaggedValue>(), w, e, c)
88 inline JSHandle<JSTaggedValue> GetValue() const
91 return JSHandle<JSTaggedValue>(thread_, JSTaggedValue::Undefined());
96 inline JSHandle<JSTaggedValue> GetKey() const
99 return JSHandle<JSTaggedValue>(thread_, JSTaggedValue::Undefined());
104 inline void SetValue(JSHandle<JSTaggedValue> value)
109 inline void SetKey(JSHandle<JSTaggedValue> key)
187 inline JSHandle<JSTaggedValue> GetGetter() const
190 return JSHandle<JSTaggedValue>(thread_, JSTaggedValue::Undefined());
195 inline JSHandle<JSTaggedValue> GetSetter() const
198 return JSHandle<JSTaggedValue>(thread_, JSTaggedValue::Undefined());
203 inline void SetGetter(JSHandle<JSTaggedValue> value)
208 inline void SetSetter(JSHandle<JSTaggedValue> value)
250 JSHandle<JSTaggedValue> value_ {};
251 JSHandle<JSTaggedValue> getter_ {};
252 JSHandle<JSTaggedValue> setter_ {};
253 JSHandle<JSTaggedValue> key_ {};
327 value_ = JSHandle<JSTaggedValue>(thread_, value);
334 JSHandle<JSTaggedValue> GetValue() const
337 return JSHandle<JSTaggedValue>(thread_,
343 JSHandle<JSTaggedValue> GetRawValue() const
355 JSHandle<JSTaggedValue> value_ {};
378 static void SetHash(const JSThread *thread, int32_t hash, const JSHandle<ECMAObject> &obj);
420 static JSHandle<JSTaggedValue> FromPropertyDescriptor(JSThread *thread, const PropertyDescriptor &desc);
423 static void ToPropertyDescriptor(JSThread *thread, const JSHandle<JSTaggedValue> &obj, PropertyDescriptor &desc);
424 static bool ToPropertyDescriptorFast(JSThread *thread, const JSHandle<JSTaggedValue> &obj,
427 static JSHandle<JSTaggedValue> CallFunction(JSThread *thread, const JSHandle<JSTaggedValue> &func);
430 static JSHandle<JSTaggedValue> GetMethod(JSThread *thread, const JSHandle<JSTaggedValue> &obj,
431 const JSHandle<JSTaggedValue> &key);
433 static JSHandle<JSTaggedValue> FastGetMethod(JSThread *thread, const JSHandle<JSTaggedValue> &obj,
434 const JSHandle<JSTaggedValue> &key);
436 static bool CreateDataProperty(JSThread *thread, const JSHandle<JSObject> &obj, const JSHandle<JSTaggedValue> &key,
437 const JSHandle<JSTaggedValue> &value, SCheckMode sCheckMode = SCheckMode::CHECK);
439 static bool CreateDataProperty(JSThread *thread, const JSHandle<JSObject> &obj, uint32_t index,
440 const JSHandle<JSTaggedValue> &value, SCheckMode sCheckMode = SCheckMode::CHECK);
442 static bool CreateMethodProperty(JSThread *thread, const JSHandle<JSObject> &obj,
443 const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value);
445 static bool CreateDataPropertyOrThrow(JSThread *thread, const JSHandle<JSObject> &obj,
446 const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value,
449 static bool CreateDataPropertyOrThrow(JSThread *thread, const JSHandle<JSObject> &obj, uint32_t index,
450 const JSHandle<JSTaggedValue> &value,
453 static JSHandle<TaggedArray> PUBLIC_API EnumerableOwnNames(JSThread *thread, const JSHandle<JSObject> &obj);
456 static JSHandle<TaggedArray> EnumerableOwnPropertyNames(JSThread *thread, const JSHandle<JSObject> &obj,
458 static void EnumerableOwnPropertyNamesHelper(JSThread *thread, const JSHandle<JSObject> &obj,
459 const JSHandle<TaggedArray> &arr, JSHandle<TaggedArray> &properties,
462 static JSHandle<GlobalEnv> GetFunctionRealm(JSThread *thread, const JSHandle<JSTaggedValue> &object);
464 static bool SetIntegrityLevel(JSThread *thread, const JSHandle<JSObject> &obj, IntegrityLevel level);
466 static bool FreezeSharedObject(JSThread *thread, const JSHandle<JSObject> &obj);
468 static bool TestIntegrityLevel(JSThread *thread, const JSHandle<JSObject> &obj, IntegrityLevel level);
470 static JSHandle<JSTaggedValue> SpeciesConstructor(JSThread *thread, const JSHandle<JSObject> &obj,
471 const JSHandle<JSTaggedValue> &defaultConstructor);
472 static JSHandle<JSTaggedValue> SlowSpeciesConstructor(JSThread *thread,
473 const JSHandle<JSTaggedValue> &objConstructor,
474 const JSHandle<JSTaggedValue> &defaultConstructor);
477 static JSHandle<JSTaggedValue> CreateListFromArrayLike(JSThread *thread, const JSHandle<JSTaggedValue> &obj);
481 static JSTaggedValue GetPrototype(const JSHandle<JSObject> &obj);
486 static bool SetPrototype(JSThread *thread, const JSHandle<JSObject> &obj,
487 const JSHandle<JSTaggedValue> &proto,
494 static bool PreventExtensions(JSThread *thread, const JSHandle<JSObject> &obj);
497 static bool GetOwnProperty(JSThread *thread, const JSHandle<JSObject> &obj, const JSHandle<JSTaggedValue> &key,
500 static bool GlobalGetOwnProperty(JSThread *thread, const JSHandle<JSTaggedValue> &key, PropertyDescriptor &desc);
502 static bool OrdinaryGetOwnProperty(JSThread *thread, const JSHandle<JSObject> &obj,
503 const JSHandle<JSTaggedValue> &key, PropertyDescriptor &desc);
509 static bool DefineOwnProperty(JSThread *thread, const JSHandle<JSObject> &obj, const JSHandle<JSTaggedValue> &key,
512 static bool DefineOwnProperty(JSThread *thread, const JSHandle<JSObject> &obj, uint32_t index,
518 static bool OrdinaryDefineOwnProperty(JSThread *thread, const JSHandle<JSObject> &obj,
519 const JSHandle<JSTaggedValue> &key, const PropertyDescriptor &desc,
522 static bool OrdinaryDefineOwnProperty(JSThread *thread, const JSHandle<JSObject> &obj, uint32_t index,
533 static OperationResult PUBLIC_API GetProperty(JSThread *thread, const JSHandle<JSObject> &obj,
534 const JSHandle<JSTaggedValue> &key);
536 static OperationResult GetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj,
537 const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &receiver);
539 static OperationResult GetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj,
540 const JSHandle<JSTaggedValue> &key, SCheckMode sCheckMode = SCheckMode::CHECK);
542 static OperationResult GetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, uint32_t index);
544 static OperationResult GetPropertyFromGlobal(JSThread *thread, const JSHandle<JSTaggedValue> &key);
546 static bool SetProperty(JSThread *thread, const JSHandle<JSObject> &obj, const JSHandle<JSTaggedValue> &key,
547 const JSHandle<JSTaggedValue> &value, bool mayThrow = false);
549 static bool SetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key,
550 const JSHandle<JSTaggedValue> &value, bool mayThrow = false,
553 static bool SetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key,
554 const JSHandle<JSTaggedValue> &value, const JSHandle<JSTaggedValue> &receiver,
557 static bool SetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &obj, uint32_t index,
558 const JSHandle<JSTaggedValue> &value, bool mayThrow = false);
560 static bool GlobalSetProperty(JSThread *thread, const JSHandle<JSTaggedValue> &key,
561 const JSHandle<JSTaggedValue> &value, bool mayThrow);
564 static bool HasProperty(JSThread *thread, const JSHandle<JSObject> &obj, const JSHandle<JSTaggedValue> &key);
566 static bool HasProperty(JSThread *thread, const JSHandle<JSObject> &obj, uint32_t index);
569 static bool DeleteProperty(JSThread *thread, const JSHandle<JSObject> &obj, const JSHandle<JSTaggedValue> &key,
573 static JSHandle<TaggedArray> GetOwnPropertyKeys(JSThread *thread, const JSHandle<JSObject> &obj);
575 static JSHandle<TaggedArray> GetAllPropertyKeys(JSThread *thread, const JSHandle<JSObject> &obj, uint32_t filter);
577 static void CollectEnumKeysAlongProtoChain(JSThread *thread, const JSHandle<JSObject> &obj,
578 JSHandle<TaggedArray> keyArray, uint32_t *keys,
579 JSHandle<TaggedQueue> shadowQueue, int32_t lastLength = -1);
581 static void AppendOwnEnumPropertyKeys(JSThread *thread, const JSHandle<JSObject> &obj,
582 JSHandle<TaggedArray> keyArray, uint32_t *keys,
583 JSHandle<TaggedQueue> shadowQueue);
585 static JSHandle<TaggedArray> GetOwnEnumPropertyKeys(JSThread *thread, const JSHandle<JSObject> &obj);
588 static JSHandle<JSObject> ObjectCreate(JSThread *thread, const JSHandle<JSObject> &proto);
591 static bool InstanceOf(JSThread *thread, const JSHandle<JSTaggedValue> &object,
592 const JSHandle<JSTaggedValue> &target);
597 static JSHandle<JSForInIterator> EnumerateObjectProperties(JSThread *thread, const JSHandle<JSTaggedValue> &obj);
598 static JSHandle<JSForInIterator> LoadEnumerateProperties(JSThread *thread, const JSHandle<JSTaggedValue> &object);
600 static bool IsRegExp(JSThread *thread, const JSHandle<JSTaggedValue> &argument);
603 const JSHandle<JSTaggedValue> &receiver);
605 const JSHandle<JSTaggedValue> &receiver,
606 const JSHandle<JSTaggedValue> &value, bool mayThrow = false);
653 static PUBLIC_API void DefinePropertyByLiteral(JSThread *thread, const JSHandle<JSObject> &obj,
654 const JSHandle<JSTaggedValue> &key,
655 const JSHandle<JSTaggedValue> &value,
657 static void DefineSetter(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key,
658 const JSHandle<JSTaggedValue> &value);
659 static void DefineGetter(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key,
660 const JSHandle<JSTaggedValue> &value);
661 static PUBLIC_API JSHandle<JSObject> CreateObjectFromProperties(const JSThread *thread,
662 const JSHandle<TaggedArray> &properties,
664 static JSHandle<JSObject> CreateObjectFromProperties(const JSThread *thread,
665 const JSHandle<JSHClass> &hclass,
666 const JSHandle<TaggedArray> &properties,
668 static JSHandle<JSObject> CreateObjectFromPropertiesByIHClass(const JSThread *thread,
669 const JSHandle<TaggedArray> &properties,
671 const JSHandle<JSHClass> &ihc);
673 const JSHandle<TaggedArray> &properties, uint32_t propsLen, const JSHandle<JSHClass> &ihc);
674 static void GetAllKeys(const JSThread *thread, const JSHandle<JSObject> &obj, int offset,
675 const JSHandle<TaggedArray> &keyArray);
676 static void GetAllKeysForSerialization(const JSHandle<JSObject> &obj, std::vector<JSTaggedValue> &keyVector);
678 static void GetAllKeysByFilter(const JSThread *thread, const JSHandle<JSObject> &obj,
680 const JSHandle<TaggedArray> &keyArray,
682 static void GetAllElementKeys(JSThread *thread, const JSHandle<JSObject> &obj, int offset,
683 const JSHandle<TaggedArray> &keyArray);
685 const JSHandle<JSObject> &obj,
686 const JSHandle<TaggedArray> &keyArray,
690 static void GetALLElementKeysIntoVector(const JSThread *thread, const JSHandle<JSObject> &obj,
696 static JSHandle<TaggedArray> GetEnumElementKeys(JSThread *thread, const JSHandle<JSObject> &obj, int offset,
698 static void CollectEnumElementsAlongProtoChain(JSThread *thread, const JSHandle<JSObject> &obj, int offset,
699 JSHandle<TaggedArray> elementArray, uint32_t *keys,
701 static void GetEnumElementKeys(JSThread *thread, const JSHandle<JSObject> &obj, int offset,
702 const JSHandle<TaggedArray> &keyArray);
703 static JSHandle<TaggedArray> GetAllEnumKeys(JSThread *thread, const JSHandle<JSObject> &obj,
705 static uint32_t GetAllEnumKeys(JSThread *thread, const JSHandle<JSObject> &obj, int offset,
706 const JSHandle<TaggedArray> &keyArray);
708 static void AddAccessor(JSThread *thread, const JSHandle<JSTaggedValue> &obj, const JSHandle<JSTaggedValue> &key,
709 const JSHandle<AccessorData> &value, PropertyAttributes attr);
722 static JSHandle<NameDictionary> PUBLIC_API TransitionToDictionary(const JSThread *thread,
723 const JSHandle<JSObject> &receiver);
744 static bool IsArrayLengthWritable(JSThread *thread, const JSHandle<JSObject> &receiver);
748 static bool ShouldOptimizeAsFastElements(const JSThread *thread, JSHandle<JSObject> obj);
749 static JSHandle<TaggedArray> GrowElementsCapacity(const JSThread *thread, const JSHandle<JSObject> &obj,
752 static bool IsDepulicateKeys(JSThread *thread, JSHandle<TaggedArray> keys, int32_t lastLength,
753 JSHandle<TaggedQueue> shadowQueue, JSHandle<JSTaggedValue> key);
759 static void ClearHasDeleteProperty(JSHandle<JSTaggedValue> object);
761 static JSHandle<JSTaggedValue> IterableToList(JSThread *thread, const JSHandle<JSTaggedValue> &items,
764 static void TryOptimizeAsFastElements(const JSThread *thread, JSHandle<JSObject> obj);
765 static void OptimizeAsFastProperties(const JSThread *thread, JSHandle<JSObject> obj);
767 static void SetSProperties(JSThread *thread, JSHandle<JSObject> obj, const std::vector<PropertyDescriptor> &descs);
769 static void PUBLIC_API TryMigrateToGenericKindForJSObject(const JSThread *thread, const JSHandle<JSObject> &obj,
772 static void ElementsToDictionary(const JSThread *thread, JSHandle<JSObject> obj);
784 static bool HasMutantTaggedArrayElements(const JSHandle<JSObject> &obj);
787 JSThread *thread, const JSHandle<JSObject> &receiver, uint32_t index, const JSHandle<JSTaggedValue> &value,
791 static bool SetProperty(ObjectOperator *op, const JSHandle<JSTaggedValue> &value, bool mayThrow);
792 static void DeletePropertyInternal(JSThread *thread, const JSHandle<JSObject> &obj,
793 const JSHandle<JSTaggedValue> &key, uint32_t index);
794 int FindProperty(const JSHandle<JSTaggedValue> &key);
803 static std::pair<JSHandle<TaggedArray>, JSHandle<TaggedArray>> GetOwnEnumerableNamesInFastMode(
804 JSThread *thread, const JSHandle<JSObject> &obj, uint32_t *copyLengthOfKeys, uint32_t *copyLengthOfElements);
805 static bool CheckHClassHit(const JSHandle<JSObject> &obj, const JSHandle<JSHClass> &cls);
806 static uint32_t SetValuesOrEntries(JSThread *thread, const JSHandle<TaggedArray> &prop, uint32_t index,
807 const JSHandle<JSTaggedValue> &key, const JSHandle<JSTaggedValue> &value,
811 static void TrimInlinePropsSpace(const JSThread *thread, const JSHandle<JSObject> &object,
815 static bool SetPropertyForDataDescriptor(ObjectOperator *op, const JSHandle<JSTaggedValue> &value,
816 JSHandle<JSTaggedValue> &receiver, bool mayThrow, bool isInternalAccessor);
818 const JSHandle<JSTaggedValue> &value,
819 JSHandle<JSTaggedValue> &receiver);