Lines Matching refs:thread_
27 factory_ = thread_->GetEcmaVM()->GetFactory();
28 JSHandle<JSTaggedValue> jsonCache = thread_->GetEcmaVM()->GetGlobalEnv()->GetJsonObjectHclassCache();
35 handleValue_ = JSMutableHandle<JSTaggedValue>(thread_, tagValue);
36 handleKey_ = JSMutableHandle<JSTaggedValue>(thread_, factory_->GetEmptyString());
40 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSTaggedValue, thread_);
46 RETURN_HANDLE_IF_ABRUPT_COMPLETION(JSTaggedValue, thread_);
51 return thread_->GlobalConstants()->GetHandledUndefined();
58 JSHandle<JSTaggedValue> undefined = thread_->GlobalConstants()->GetHandledUndefined();
60 JSHandle<JSTaggedValue> toJson = thread_->GlobalConstants()->GetHandledToJsonString();
62 thread_, ObjectFastOperator::FastGetPropertyByValue(thread_, tagValue, toJson.GetTaggedValue()));
64 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_);
69 EcmaRuntimeCallInfo *info = EcmaInterpreter::NewRuntimeCallInfo(thread_, toJsonFun, value, undefined, 1);
70 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_);
74 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_);
102 result_ += ConvertToString(*base::NumberHelper::NumberToString(thread_, tagValue));
112 JSHandle<JSTaggedValue> valHandle(thread_, tagValue);
117 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_);
126 auto string = JSHandle<EcmaString>(thread_,
127 EcmaStringAccessor::Flatten(thread_->GetEcmaVM(), strHandle));
134 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, JSTaggedValue::Exception());
140 THROW_TYPE_ERROR_AND_RETURN(thread_, "cannot serialize a BigInt", JSTaggedValue::Exception());
146 JSProxy::Cast(tagValue.GetTaggedObject())->IsArray(thread_))) {
148 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_);
151 RETURN_EXCEPTION_IF_ABRUPT_COMPLETION(thread_);
173 str = ConvertToString(*JSTaggedValue::ToString(thread_, key), StringConvertedUsage::LOGICOPERATION);
205 THROW_TYPE_ERROR_AND_RETURN(thread_, "stack contains value, usually caused by circular structure", true);
214 JSHandle<TaggedArray> propertyArray = JSObject::EnumerableOwnNames(thread_, obj);
215 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
219 JSHandle<JSTaggedValue> valueHandle = JSTaggedValue::GetProperty(thread_, value, handleKey_).GetValue();
220 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
223 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
234 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
245 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
249 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
255 auto strCache = thread_->GetCurrentEcmaContext()->GetJsonStringifyCache(index);
259 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
263 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
269 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
273 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
291 THROW_TYPE_ERROR_AND_RETURN(thread_, "stack contains value, usually caused by circular structure", true);
296 JSHandle<JSTaggedValue> lengthKey = thread_->GlobalConstants()->GetHandledLengthString();
297 JSHandle<JSTaggedValue> lenghHandle = JSProxy::GetProperty(thread_, proxy, lengthKey).GetValue();
298 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
299 JSTaggedNumber lenNumber = JSTaggedValue::ToLength(thread_, lenghHandle);
300 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
304 JSHandle<JSTaggedValue> valHandle = JSProxy::GetProperty(thread_, proxy, handleKey_).GetValue();
305 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
311 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
317 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
333 THROW_TYPE_ERROR_AND_RETURN(thread_, "stack contains value, usually caused by circular structure", true);
347 JSTaggedValue tagVal = ObjectFastOperator::FastGetPropertyByIndex(thread_, value.GetTaggedValue(), i);
348 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
350 tagVal = JSObject::CallGetter(thread_, AccessorData::Cast(tagVal.GetTaggedObject()), value);
351 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
361 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
365 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
381 auto priStr = JSTaggedValue::ToString(thread_, primitiveRef);
382 RETURN_IF_ABRUPT_COMPLETION(thread_);
386 auto priNum = JSTaggedValue::ToNumber(thread_, primitiveRef);
387 RETURN_IF_ABRUPT_COMPLETION(thread_);
389 result_ += ConvertToString(*base::NumberHelper::NumberToString(thread_, priNum));
396 THROW_TYPE_ERROR(thread_, "cannot serialize a BigInt");
410 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
414 JSHandle<TaggedArray> elementsArr(thread_, obj->GetElements());
424 sortArr.emplace_back(JSHandle<JSTaggedValue>(thread_, numberKey));
435 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
437 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
441 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
457 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
461 JSHandle<TaggedArray> elementsArr(thread_, obj->GetElements());
468 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
470 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
474 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
483 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties());
498 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties());
499 JSHandle<JSHClass> jsHclass(thread_, obj->GetJSHClass());
501 if (JSObject::GetEnumCacheKind(thread_, enumCache) == EnumCacheKind::ONLY_OWN_KEYS) {
516 int index = JSHClass::FindPropertyEntry(thread_, *jsHclass, key);
526 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
528 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
532 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
541 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties());
542 JSHandle<JSHClass> jsHclass(thread_, obj->GetJSHClass());
543 JSHandle<TaggedArray> cache(thread_, jsHclass->GetEnumCache());
553 int index = JSHClass::FindPropertyEntry(thread_, *jsHclass, key);
563 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
565 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
569 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
577 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties());
590 std::pair<JSHandle<JSTaggedValue>, PropertyAttributes> pair(JSHandle<JSTaggedValue>(thread_, key), attr);
600 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
602 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
606 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
614 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties());
627 std::pair<JSHandle<JSTaggedValue>, PropertyAttributes> pair(JSHandle<JSTaggedValue>(thread_, key), attr);
637 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
639 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
643 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
651 JSHandle<JSHClass> jsHclass(thread_, obj->GetJSHClass());
652 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties());
664 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
666 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
670 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
682 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
684 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
688 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
699 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
701 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
705 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
714 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
724 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
736 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
745 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
762 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
766 JSHandle<TaggedArray> elementsArr(thread_, obj->GetElements());
776 sortArr.emplace_back(JSHandle<JSTaggedValue>(thread_, numberKey));
787 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
789 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
793 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
801 JSHandle<TaggedArray> propertiesArr(thread_, obj->GetProperties());
803 JSHandle<JSHClass> jsHclass(thread_, obj->GetJSHClass());
805 if (JSObject::GetEnumCacheKind(thread_, enumCache) == EnumCacheKind::ONLY_OWN_KEYS) {
820 JSHandle<TaggedArray> cache(thread_, enumCache);
828 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
845 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
867 std::pair<JSHandle<JSTaggedValue>, PropertyAttributes> pair(JSHandle<JSTaggedValue>(thread_, key), attr);
877 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
879 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
883 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
904 std::pair<JSHandle<JSTaggedValue>, PropertyAttributes> pair(JSHandle<JSTaggedValue>(thread_, key), attr);
914 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
916 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
920 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
929 JSHandle<JSHClass> jsHclass(thread_, obj->GetJSHClass());
930 int index = JSHClass::FindPropertyEntry(thread_, *jsHclass, key);
941 value = JSObject::CallGetter(thread_, AccessorData::Cast(value.GetTaggedObject()),
943 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
947 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
955 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
964 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
975 JSHandle<JSTaggedValue> value(thread_, object);
978 THROW_TYPE_ERROR_AND_RETURN(thread_, "stack contains value, usually caused by circular structure", true);
987 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);
991 RETURN_VALUE_IF_ABRUPT_COMPLETION(thread_, false);