• Home
  • Raw
  • Download

Lines Matching full:thread

28     JSThread *thread = argv->GetThread();  in ObjectConstructor()  local
29 BUILTINS_API_TRACE(thread, Object, Constructor); in ObjectConstructor()
30 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ObjectConstructor()
31 auto ecmaVm = thread->GetEcmaVM(); in ObjectConstructor()
41 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ObjectConstructor()
53 return JSTaggedValue::ToObject(thread, value).GetTaggedValue(); in ObjectConstructor()
56 JSTaggedValue BuiltinsObject::AssignTaggedValue(JSThread *thread, const JSHandle<JSTaggedValue> &so… in AssignTaggedValue() argument
59 JSHandle<JSObject> from = JSTaggedValue::ToObject(thread, source); in AssignTaggedValue()
60 …JSHandle<TaggedArray> keys = JSTaggedValue::GetOwnPropertyKeys(thread, JSHandle<JSTaggedValue>::Ca… in AssignTaggedValue()
61 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in AssignTaggedValue()
63 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined()); in AssignTaggedValue()
66 PropertyDescriptor desc(thread); in AssignTaggedValue()
68 …bool success = JSTaggedValue::GetOwnProperty(thread, JSHandle<JSTaggedValue>::Cast(from), key, des… in AssignTaggedValue()
69 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in AssignTaggedValue()
74 value = ObjectFastOperator::FastGetPropertyByValue(thread, from.GetTaggedValue(), in AssignTaggedValue()
77 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in AssignTaggedValue()
79 …ObjectFastOperator::FastSetPropertyByValue(thread, toAssign.GetTaggedValue(), key.GetTaggedValue(), in AssignTaggedValue()
81 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in AssignTaggedValue()
91 JSThread *thread = argv->GetThread(); in Assign() local
92 BUILTINS_API_TRACE(thread, Object, Assign); in Assign()
93 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Assign()
98 JSHandle<JSObject> toAssign = JSTaggedValue::ToObject(thread, target); in Assign()
100 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Assign()
110 JSMutableHandle<JSTaggedValue> key(thread, JSTaggedValue::Undefined()); in Assign()
114 JSHandle<JSObject> from = JSTaggedValue::ToObject(thread, source); in Assign()
115 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Assign()
117 …JSHandle<TaggedArray> keys = JSTaggedValue::GetOwnPropertyKeys(thread, JSHandle<JSTaggedValue>::Ca… in Assign()
119 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Assign()
131 PropertyDescriptor desc(thread); in Assign()
133 …bool success = JSTaggedValue::GetOwnProperty(thread, JSHandle<JSTaggedValue>::Cast(from), key, des… in Assign()
135 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Assign()
140 … value = ObjectFastOperator::FastGetPropertyByValue(thread, from.GetTaggedValue(), in Assign()
144 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Assign()
146 …ObjectFastOperator::FastSetPropertyByValue(thread, toAssign.GetTaggedValue(), key.GetTaggedValue(), in Assign()
149 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Assign()
160 JSTaggedValue BuiltinsObject::ObjectDefineProperties(JSThread *thread, const JSHandle<JSTaggedValue… in ObjectDefineProperties() argument
163 BUILTINS_API_TRACE(thread, Object, DefineProperties); in ObjectDefineProperties()
164 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in ObjectDefineProperties()
168 THROW_TYPE_ERROR_AND_RETURN(thread, "is not an object", JSTaggedValue::Exception()); in ObjectDefineProperties()
172 JSHandle<JSObject> props = JSTaggedValue::ToObject(thread, prop); in ObjectDefineProperties()
175 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ObjectDefineProperties()
178 …JSHandle<TaggedArray> handleKeys = JSTaggedValue::GetOwnPropertyKeys(thread, JSHandle<JSTaggedValu… in ObjectDefineProperties()
181 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ObjectDefineProperties()
201 PropertyDescriptor propDesc(thread); in ObjectDefineProperties()
202 JSHandle<JSTaggedValue> handleKey(thread, handleKeys->Get(i)); in ObjectDefineProperties()
204 …bool success = JSTaggedValue::GetOwnProperty(thread, JSHandle<JSTaggedValue>::Cast(props), handleK… in ObjectDefineProperties()
206 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ObjectDefineProperties()
210 … JSTaggedValue::GetProperty(thread, JSHandle<JSTaggedValue>::Cast(props), handleKey).GetValue(); in ObjectDefineProperties()
212 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ObjectDefineProperties()
214 PropertyDescriptor desc(thread); in ObjectDefineProperties()
215 JSObject::ToPropertyDescriptor(thread, descObj, desc); in ObjectDefineProperties()
217 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ObjectDefineProperties()
230 JSTaggedValue::DefinePropertyOrThrow(thread, obj, desArr[i].GetKey(), desArr[i]); in ObjectDefineProperties()
233 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ObjectDefineProperties()
243 JSThread *thread = argv->GetThread(); in Create() local
244 BUILTINS_API_TRACE(thread, Object, Create); in Create()
245 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Create()
250 …THROW_TYPE_ERROR_AND_RETURN(thread, "Create: O is neither Object nor Null", JSTaggedValue::Excepti… in Create()
254 THROW_TYPE_ERROR_AND_RETURN(thread, GET_MESSAGE_STRING(CreateObjectWithSendableProto), in Create()
261 … JSHandle<JSObject> objCreate = thread->GetEcmaVM()->GetFactory()->OrdinaryNewJSObjectCreate(obj); in Create()
266 return ObjectDefineProperties(thread, JSHandle<JSTaggedValue>::Cast(objCreate), properties); in Create()
277 JSThread *thread = argv->GetThread(); in DefineProperties() local
278 BUILTINS_API_TRACE(thread, Object, DefineProperties); in DefineProperties()
279 [[maybe_unused]] EcmaHandleScope handleScope(thread); in DefineProperties()
281 return ObjectDefineProperties(thread, GetCallArg(argv, 0), GetCallArg(argv, 1)); in DefineProperties()
288 JSThread *thread = argv->GetThread(); in DefineProperty() local
289 BUILTINS_API_TRACE(thread, Object, DefineProperty); in DefineProperty()
290 [[maybe_unused]] EcmaHandleScope handleScope(thread); in DefineProperty()
296 …THROW_TYPE_ERROR_AND_RETURN(thread, "DefineProperty: O is not Object", JSTaggedValue::Exception()); in DefineProperty()
301 JSHandle<JSTaggedValue> key = JSTaggedValue::ToPropertyKey(thread, prop); in DefineProperty()
304 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in DefineProperty()
306 PropertyDescriptor desc(thread); in DefineProperty()
307 … JSObject::ToPropertyDescriptor(thread, GetCallArg(argv, BuiltinsBase::ArgsPosition::THIRD), desc); in DefineProperty()
310 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in DefineProperty()
313 [[maybe_unused]] bool success = JSTaggedValue::DefinePropertyOrThrow(thread, obj, key, desc); in DefineProperty()
316 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in DefineProperty()
325 JSThread *thread = argv->GetThread(); in Freeze() local
326 BUILTINS_API_TRACE(thread, Object, Freeze); in Freeze()
334 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Freeze()
338 status = JSObject::FreezeSharedObject(thread, JSHandle<JSObject>(obj)); in Freeze()
340 …THROW_TYPE_ERROR_AND_RETURN(thread, GET_MESSAGE_STRING(UpdateSendableAttributes), JSTaggedValue::E… in Freeze()
342 … status = JSObject::SetIntegrityLevel(thread, JSHandle<JSObject>(obj), IntegrityLevel::FROZEN); in Freeze()
346 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Freeze()
351 THROW_TYPE_ERROR_AND_RETURN(thread, "Freeze: freeze failed", JSTaggedValue::Exception()); in Freeze()
362 JSThread *thread = argv->GetThread(); in GetOwnPropertyDescriptor() local
363 BUILTINS_API_TRACE(thread, Object, GetOwnPropertyDescriptor); in GetOwnPropertyDescriptor()
364 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetOwnPropertyDescriptor()
368 JSHandle<JSObject> handle = JSTaggedValue::ToObject(thread, func); in GetOwnPropertyDescriptor()
371 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetOwnPropertyDescriptor()
375 JSHandle<JSTaggedValue> key = JSTaggedValue::ToPropertyKey(thread, prop); in GetOwnPropertyDescriptor()
378 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetOwnPropertyDescriptor()
381 PropertyDescriptor desc(thread); in GetOwnPropertyDescriptor()
382 JSTaggedValue::GetOwnProperty(thread, JSHandle<JSTaggedValue>::Cast(handle), key, desc); in GetOwnPropertyDescriptor()
385 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetOwnPropertyDescriptor()
388 JSHandle<JSTaggedValue> res = JSObject::FromPropertyDescriptor(thread, desc); in GetOwnPropertyDescriptor()
395 JSThread *thread = argv->GetThread(); in GetOwnPropertyDescriptors() local
396 BUILTINS_API_TRACE(thread, Object, GetOwnPropertyDescriptors); in GetOwnPropertyDescriptors()
397 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetOwnPropertyDescriptors()
401 JSHandle<JSObject> handle = JSTaggedValue::ToObject(thread, func); in GetOwnPropertyDescriptors()
404 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetOwnPropertyDescriptors()
408 JSTaggedValue::GetOwnPropertyKeys(thread, JSHandle<JSTaggedValue>(handle)); in GetOwnPropertyDescriptors()
411 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetOwnPropertyDescriptors()
414 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in GetOwnPropertyDescriptors()
415 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in GetOwnPropertyDescriptors()
424 JSMutableHandle<JSTaggedValue> handleKey(thread, JSTaggedValue::Undefined()); in GetOwnPropertyDescriptors()
427 PropertyDescriptor desc(thread); in GetOwnPropertyDescriptors()
428 … JSTaggedValue::GetOwnProperty(thread, JSHandle<JSTaggedValue>::Cast(handle), handleKey, desc); in GetOwnPropertyDescriptors()
429 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetOwnPropertyDescriptors()
430 JSHandle<JSTaggedValue> descriptor = JSObject::FromPropertyDescriptor(thread, desc); in GetOwnPropertyDescriptors()
432 JSObject::CreateDataPropertyOrThrow(thread, descriptors, handleKey, descriptor); in GetOwnPropertyDescriptors()
433 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetOwnPropertyDescriptors()
442 JSTaggedValue BuiltinsObject::GetOwnPropertyKeys(JSThread *thread, const JSHandle<JSTaggedValue> &o… in GetOwnPropertyKeys() argument
445 BUILTINS_API_TRACE(thread, Object, GetOwnPropertyKeys); in GetOwnPropertyKeys()
447 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in GetOwnPropertyKeys()
448 JSHandle<JSObject> obj = JSTaggedValue::ToObject(thread, object); in GetOwnPropertyKeys()
451 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetOwnPropertyKeys()
454 …JSHandle<TaggedArray> handleKeys = JSTaggedValue::GetOwnPropertyKeys(thread, JSHandle<JSTaggedValu… in GetOwnPropertyKeys()
457 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetOwnPropertyKeys()
471 nameList->Set(thread, copyLength, key); in GetOwnPropertyKeys()
481 nameList->Set(thread, copyLength, key); in GetOwnPropertyKeys()
493 JSHandle<JSArray> resultArray = JSArray::CreateArrayFromList(thread, resultList); in GetOwnPropertyKeys()
501 JSThread *thread = argv->GetThread(); in GetOwnPropertyNames() local
502 BUILTINS_API_TRACE(thread, Object, GetOwnPropertyNames); in GetOwnPropertyNames()
503 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetOwnPropertyNames()
508 return GetOwnPropertyKeys(thread, obj, type); in GetOwnPropertyNames()
515 JSThread *thread = argv->GetThread(); in GetOwnPropertySymbols() local
516 BUILTINS_API_TRACE(thread, Object, GetOwnPropertySymbols); in GetOwnPropertySymbols()
517 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetOwnPropertySymbols()
522 return GetOwnPropertyKeys(thread, obj, type); in GetOwnPropertySymbols()
529 JSThread *thread = argv->GetThread(); in GetPrototypeOf() local
530 BUILTINS_API_TRACE(thread, Object, GetPrototypeOf); in GetPrototypeOf()
531 [[maybe_unused]] EcmaHandleScope handleScope(thread); in GetPrototypeOf()
536 JSHandle<JSObject> obj = JSTaggedValue::ToObject(thread, func); in GetPrototypeOf()
539 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetPrototypeOf()
542 return JSTaggedValue::GetPrototype(thread, JSHandle<JSTaggedValue>(obj)); in GetPrototypeOf()
560 JSThread *thread = argv->GetThread(); in IsExtensible() local
561 BUILTINS_API_TRACE(thread, Object, IsExtensible); in IsExtensible()
567 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IsExtensible()
569 return GetTaggedBoolean(obj.IsExtensible(thread)); in IsExtensible()
583 JSThread *thread = argv->GetThread(); in IsFrozen() local
584 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IsFrozen()
587 …bool status = JSObject::TestIntegrityLevel(thread, JSHandle<JSObject>(obj), IntegrityLevel::FROZEN… in IsFrozen()
602 JSThread *thread = argv->GetThread(); in IsSealed() local
603 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IsSealed()
606 …bool status = JSObject::TestIntegrityLevel(thread, JSHandle<JSObject>(obj), IntegrityLevel::SEALED… in IsSealed()
614 JSThread *thread = argv->GetThread(); in Keys() local
615 BUILTINS_API_TRACE(thread, Object, Keys); in Keys()
616 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Keys()
621 JSHandle<JSObject> obj = JSTaggedValue::ToObject(thread, msg); in Keys()
624 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Keys()
627 JSHandle<TaggedArray> nameList = JSObject::EnumerableOwnNames(thread, obj); in Keys()
630 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Keys()
633 JSHandle<JSArray> result = JSArray::CreateArrayFromList(thread, nameList); in Keys()
641 JSThread *thread = argv->GetThread(); in Values() local
642 BUILTINS_API_TRACE(thread, Object, Values); in Values()
643 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Values()
647 JSHandle<JSObject> obj = JSTaggedValue::ToObject(thread, msg); in Values()
650 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Values()
653 …JSHandle<TaggedArray> nameList = JSObject::EnumerableOwnPropertyNames(thread, obj, PropertyKind::V… in Values()
656 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Values()
659 JSHandle<JSArray> result = JSArray::CreateArrayFromList(thread, nameList); in Values()
667 JSThread *thread = argv->GetThread(); in PreventExtensions() local
668 BUILTINS_API_TRACE(thread, Object, PreventExtensions); in PreventExtensions()
674 [[maybe_unused]] EcmaHandleScope handleScope(thread); in PreventExtensions()
676 bool status = JSTaggedValue::PreventExtensions(thread, obj); in PreventExtensions()
679 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in PreventExtensions()
684 THROW_TYPE_ERROR_AND_RETURN(thread, "PreventExtensions: preventExtensions failed", in PreventExtensions()
697 JSThread *thread = argv->GetThread(); in Seal() local
698 BUILTINS_API_TRACE(thread, Object, Seal); in Seal()
706 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Seal()
709 JSHandle<JSObject> object = JSTaggedValue::ToObject(thread, msg); in Seal()
710 bool status = JSObject::SetIntegrityLevel(thread, object, IntegrityLevel::SEALED); in Seal()
713 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Seal()
718 THROW_TYPE_ERROR_AND_RETURN(thread, "Seal: seal failed", JSTaggedValue::Exception()); in Seal()
729 JSThread *thread = argv->GetThread(); in SetPrototypeOf() local
730 BUILTINS_API_TRACE(thread, Object, SetPrototypeOf); in SetPrototypeOf()
731 [[maybe_unused]] EcmaHandleScope handleScope(thread); in SetPrototypeOf()
733 …JSHandle<JSTaggedValue> object = JSTaggedValue::RequireObjectCoercible(thread, GetCallArg(argv, 0)… in SetPrototypeOf()
736 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in SetPrototypeOf()
742 THROW_TYPE_ERROR_AND_RETURN(thread, "SetPrototypeOf: proto is neither Object nor Null", in SetPrototypeOf()
752 bool status = JSTaggedValue::SetPrototype(thread, object, proto); in SetPrototypeOf()
755 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in SetPrototypeOf()
760 …THROW_TYPE_ERROR_AND_RETURN(thread, "SetPrototypeOf: prototype set failed", JSTaggedValue::Excepti… in SetPrototypeOf()
773 JSThread *thread = argv->GetThread(); in HasOwnProperty() local
774 BUILTINS_API_TRACE(thread, Object, HasOwnProperty); in HasOwnProperty()
775 [[maybe_unused]] EcmaHandleScope handleScope(thread); in HasOwnProperty()
778 return HasOwnPropertyInternal(thread, thisValue, prop); in HasOwnProperty()
781 JSTaggedValue BuiltinsObject::HasOwnPropertyInternal(JSThread *thread, JSHandle<JSTaggedValue> this… in HasOwnPropertyInternal() argument
784 [[maybe_unused]] EcmaHandleScope handleScope(thread); in HasOwnPropertyInternal()
785 …std::pair<JSTaggedValue, bool> result = ObjectFastOperator::HasOwnProperty(thread, thisValue.GetTa… in HasOwnPropertyInternal()
794 JSHandle<JSTaggedValue> property = JSTaggedValue::ToPropertyKey(thread, prop); in HasOwnPropertyInternal()
797 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in HasOwnPropertyInternal()
800 JSHandle<JSObject> object = JSTaggedValue::ToObject(thread, thisValue); in HasOwnPropertyInternal()
803 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in HasOwnPropertyInternal()
806 … bool res = JSTaggedValue::HasOwnProperty(thread, JSHandle<JSTaggedValue>::Cast(object), property); in HasOwnPropertyInternal()
814 JSThread *thread = argv->GetThread(); in IsPrototypeOf() local
815 BUILTINS_API_TRACE(thread, Object, IsPrototypeOf); in IsPrototypeOf()
821 [[maybe_unused]] EcmaHandleScope handleScope(thread); in IsPrototypeOf()
823 JSHandle<JSObject> object = JSTaggedValue::ToObject(thread, GetThis(argv)); in IsPrototypeOf()
825 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in IsPrototypeOf()
831 JSMutableHandle<JSTaggedValue> msgValueHandle(thread, msg.GetTaggedValue()); in IsPrototypeOf()
833 msgValueHandle.Update(JSTaggedValue::GetPrototype(thread, msgValueHandle)); in IsPrototypeOf()
834 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in IsPrototypeOf()
848 JSThread *thread = argv->GetThread(); in PropertyIsEnumerable() local
849 BUILTINS_API_TRACE(thread, Object, PropertyIsEnumerable); in PropertyIsEnumerable()
850 [[maybe_unused]] EcmaHandleScope handleScope(thread); in PropertyIsEnumerable()
852 JSHandle<JSTaggedValue> property = JSTaggedValue::ToPropertyKey(thread, msg); in PropertyIsEnumerable()
855 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in PropertyIsEnumerable()
858 JSHandle<JSObject> object = JSTaggedValue::ToObject(thread, GetThis(argv)); in PropertyIsEnumerable()
860 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in PropertyIsEnumerable()
863 PropertyDescriptor desc(thread); in PropertyIsEnumerable()
864 JSTaggedValue::GetOwnProperty(thread, JSHandle<JSTaggedValue>::Cast(object), property, desc); in PropertyIsEnumerable()
867 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in PropertyIsEnumerable()
882 JSThread *thread = argv->GetThread(); in ToLocaleString() local
883 BUILTINS_API_TRACE(thread, Object, ToLocaleString); in ToLocaleString()
884 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ToLocaleString()
887 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ToLocaleString()
890 JSHandle<JSTaggedValue> calleeKey = thread->GlobalConstants()->GetHandledToStringString(); in ToLocaleString()
892 JSHandle<JSTaggedValue> undefined = thread->GlobalConstants()->GetHandledUndefined(); in ToLocaleString()
893 …EcmaRuntimeCallInfo *info = EcmaInterpreter::NewRuntimeCallInfo(thread, undefined, object, undefin… in ToLocaleString()
894 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ToLocaleString()
899 JSTaggedValue BuiltinsObject::GetBuiltinObjectToString(JSThread *thread, const JSHandle<JSObject> &… in GetBuiltinObjectToString() argument
901 BUILTINS_API_TRACE(thread, Object, GetBuiltinObjectToString); in GetBuiltinObjectToString()
903 bool isArray = object.GetTaggedValue().IsArray(thread); in GetBuiltinObjectToString()
905 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in GetBuiltinObjectToString()
909 return thread->GlobalConstants()->GetArrayToString(); in GetBuiltinObjectToString()
914 return thread->GlobalConstants()->GetStringToString(); in GetBuiltinObjectToString()
917 return thread->GlobalConstants()->GetBooleanToString(); in GetBuiltinObjectToString()
920 return thread->GlobalConstants()->GetNumberToString(); in GetBuiltinObjectToString()
924 return thread->GlobalConstants()->GetArgumentsToString(); in GetBuiltinObjectToString()
927 return thread->GlobalConstants()->GetFunctionToString(); in GetBuiltinObjectToString()
930 return thread->GlobalConstants()->GetErrorToString(); in GetBuiltinObjectToString()
933 return thread->GlobalConstants()->GetDateToString(); in GetBuiltinObjectToString()
936 return thread->GlobalConstants()->GetRegExpToString(); in GetBuiltinObjectToString()
939 return thread->GlobalConstants()->GetObjectToString(); in GetBuiltinObjectToString()
946 JSThread *thread = argv->GetThread(); in ToString() local
947 BUILTINS_API_TRACE(thread, Object, ToString); in ToString()
948 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ToString()
953 return thread->GlobalConstants()->GetUndefinedToString(); in ToString()
957 return thread->GlobalConstants()->GetNullToString(); in ToString()
961 JSHandle<JSObject> object = JSTaggedValue::ToObject(thread, GetThis(argv)); in ToString()
962 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ToString()
965 auto ecmaVm = thread->GetEcmaVM(); in ToString()
969 …JSHandle<JSTaggedValue> tag = JSTaggedValue::GetProperty(thread, msg, env->GetToStringTagSymbol())… in ToString()
972 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ToString()
976 return GetBuiltinObjectToString(thread, object); in ToString()
984 factory->ConcatFromString(leftString, JSTaggedValue::ToString(thread, tag)); in ToString()
985 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ToString()
994 JSThread *thread = argv->GetThread(); in ValueOf() local
995 BUILTINS_API_TRACE(thread, Object, ValueOf); in ValueOf()
996 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ValueOf()
999 JSHandle<JSObject> object = JSTaggedValue::ToObject(thread, GetThis(argv)); in ValueOf()
1000 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ValueOf()
1007 JSThread *thread = argv->GetThread(); in ProtoGetter() local
1008 BUILTINS_API_TRACE(thread, Object, ProtoGetter); in ProtoGetter()
1009 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ProtoGetter()
1012 JSHandle<JSObject> obj = JSTaggedValue::ToObject(thread, GetThis(argv)); in ProtoGetter()
1015 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ProtoGetter()
1018 return JSTaggedValue::GetPrototype(thread, JSHandle<JSTaggedValue>(obj)); in ProtoGetter()
1024 JSThread *thread = argv->GetThread(); in ProtoSetter() local
1025 BUILTINS_API_TRACE(thread, Object, ProtoSetter); in ProtoSetter()
1026 [[maybe_unused]] EcmaHandleScope handleScope(thread); in ProtoSetter()
1028 JSHandle<JSTaggedValue> obj = JSTaggedValue::RequireObjectCoercible(thread, GetThis(argv)); in ProtoSetter()
1031 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ProtoSetter()
1045 bool status = JSTaggedValue::SetPrototype(thread, obj, proto, true); in ProtoSetter()
1048 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in ProtoSetter()
1053 … THROW_TYPE_ERROR_AND_RETURN(thread, "ProtoSetter: proto set failed", JSTaggedValue::Exception()); in ProtoSetter()
1063 JSThread *thread = argv->GetThread(); in CreateRealm() local
1064 BUILTINS_API_TRACE(thread, Object, CreateRealm); in CreateRealm()
1065 [[maybe_unused]] EcmaHandleScope handleScope(thread); in CreateRealm()
1066 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in CreateRealm()
1074 JSThread *thread = argv->GetThread(); in Entries() local
1075 BUILTINS_API_TRACE(thread, Object, ToString); in Entries()
1076 [[maybe_unused]] EcmaHandleScope handleScope(thread); in Entries()
1081 …THROW_RANGE_ERROR_AND_RETURN(thread, "Object entries is not supported IsJSUint8Array or IsJSUint16… in Entries()
1084 JSHandle<JSObject> object = JSTaggedValue::ToObject(thread, obj); in Entries()
1085 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Entries()
1087 …JSHandle<TaggedArray> nameList = JSObject::EnumerableOwnPropertyNames(thread, object, PropertyKind… in Entries()
1088 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in Entries()
1090 return JSArray::CreateArrayFromList(thread, nameList).GetTaggedValue(); in Entries()
1096 JSThread *thread = argv->GetThread(); in FromEntries() local
1097 BUILTINS_API_TRACE(thread, Object, FromEntries); in FromEntries()
1098 [[maybe_unused]] EcmaHandleScope handleScope(thread); in FromEntries()
1103 … THROW_TYPE_ERROR_AND_RETURN(thread, "iterable is undefined or null", JSTaggedValue::Exception()); in FromEntries()
1108 ObjectFactory *factory = thread->GetEcmaVM()->GetFactory(); in FromEntries()
1109 JSHandle<GlobalEnv> env = thread->GetEcmaVM()->GetGlobalEnv(); in FromEntries()
1117 JSHandle<Method> method(thread, in FromEntries()
1118thread->GetEcmaVM()->GetMethodByIndex(MethodIndex::BUILTINS_OBJECT_CREATE_DATA_PROPERTY_ON_OBJECT_… in FromEntries()
1121 JSHandle<JSTaggedValue> adder(thread, addrFunc.GetTaggedValue()); in FromEntries()
1124 return BuiltinsMap::AddEntriesFromIterable(thread, obj, iterable, adder, factory); in FromEntries()
1130 JSThread *thread = argv->GetThread(); in CreateDataPropertyOnObjectFunctions() local
1131 BUILTINS_API_TRACE(thread, Object, CreateDataPropertyOnObjectFunctions); in CreateDataPropertyOnObjectFunctions()
1132 [[maybe_unused]] EcmaHandleScope handleScope(thread); in CreateDataPropertyOnObjectFunctions()
1146 JSHandle<JSTaggedValue> propertyKey = JSTaggedValue::ToPropertyKey(thread, key); in CreateDataPropertyOnObjectFunctions()
1147 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in CreateDataPropertyOnObjectFunctions()
1150 JSObject::CreateDataPropertyOrThrow(thread, thisObjHandle, propertyKey, value); in CreateDataPropertyOnObjectFunctions()
1151 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in CreateDataPropertyOnObjectFunctions()
1160 JSThread *thread = argv->GetThread(); in HasOwn() local
1161 BUILTINS_API_TRACE(thread, Object, HasOwn); in HasOwn()
1162 [[maybe_unused]] EcmaHandleScope handleScope(thread); in HasOwn()
1166 JSHandle<JSObject> object = JSTaggedValue::ToObject(thread, obj); in HasOwn()
1169 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in HasOwn()
1173 JSHandle<JSTaggedValue> key = JSTaggedValue::ToPropertyKey(thread, prop); in HasOwn()
1176 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread); in HasOwn()
1179 bool res = JSTaggedValue::HasOwnProperty(thread, JSHandle<JSTaggedValue>::Cast(object), key); in HasOwn()