• Home
  • Raw
  • Download

Lines Matching full:func

30 void JSFunction::InitializeJSFunction(JSThread *thread, const JSHandle<JSFunction> &func, FunctionK…  in InitializeJSFunction()  argument
32 InitializeWithDefaultValue(thread, func); in InitializeJSFunction()
38func->SetPropertyInlinedProps(thread, PROTOTYPE_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
40func->SetPropertyInlinedProps(thread, NAME_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
42func->SetPropertyInlinedProps(thread, LENGTH_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
50 func->SetProtoOrHClass(thread, initialGeneratorFuncPrototype); in InitializeJSFunction()
59 func->SetProtoOrHClass(thread, initialGeneratorFuncPrototype); in InitializeJSFunction()
64 …thread, JSHandle<JSObject>(func), globalConst->GetHandledPrototypeString(), desc, SCheckMode::SKIP… in InitializeJSFunction()
69func->SetPropertyInlinedProps(thread, NAME_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
71func->SetPropertyInlinedProps(thread, LENGTH_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
75 void JSFunction::InitializeSFunction(JSThread *thread, const JSHandle<JSFunction> &func, FunctionKi… in InitializeSFunction() argument
77 InitializeWithDefaultValue(thread, func); in InitializeSFunction()
82func->SetPropertyInlinedProps(thread, PROTOTYPE_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeSFunction()
85func->SetPropertyInlinedProps(thread, NAME_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeSFunction()
87func->SetPropertyInlinedProps(thread, LENGTH_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeSFunction()
91 void JSFunction::InitializeWithDefaultValue(JSThread *thread, const JSHandle<JSFunction> &func) in InitializeWithDefaultValue() argument
93 func->SetProtoOrHClass(thread, JSTaggedValue::Hole(), SKIP_BARRIER); in InitializeWithDefaultValue()
94 func->SetHomeObject(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
95 func->SetWorkNodePointer(reinterpret_cast<uintptr_t>(nullptr)); in InitializeWithDefaultValue()
96 func->SetLexicalEnv(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
97 func->SetMachineCode(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
98 func->SetBaselineCode(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
99func->SetRawProfileTypeInfo(thread, thread->GlobalConstants()->GetEmptyProfileTypeInfoCell(), SKIP… in InitializeWithDefaultValue()
100 func->SetMethod(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
101 func->SetModule(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
102 func->SetCodeEntry(reinterpret_cast<uintptr_t>(nullptr)); in InitializeWithDefaultValue()
103 func->ClearCompiledCodeFlags(); in InitializeWithDefaultValue()
104 func->SetTaskConcurrentFuncFlag(0); // 0 : default value in InitializeWithDefaultValue()
105 func->SetCallNapi(false); in InitializeWithDefaultValue()
108 …le<JSObject> JSFunction::NewJSFunctionPrototype(JSThread *thread, const JSHandle<JSFunction> &func) in NewJSFunctionPrototype() argument
113 if (func->IsSharedFunction()) { in NewJSFunctionPrototype()
119 SetFunctionPrototypeOrInstanceHClass(thread, func, funPro.GetTaggedValue()); in NewJSFunctionPrototype()
123 PropertyDescriptor descriptor(thread, JSHandle<JSTaggedValue>::Cast(func), true, false, true); in NewJSFunctionPrototype()
187 // if equal DEFAULT_CAPACITY_OF_IN_OBJECTS mean none expectedProperty in func in CalcuExpotedOfProperties()
200 JSHandle<JSFunction> func = JSHandle<JSFunction>::Cast(self); in PrototypeGetter() local
201 if (!func->HasFunctionPrototype()) { in PrototypeGetter()
202 …SHandle<JSTaggedValue> proto = JSHandle<JSTaggedValue>::Cast(NewJSFunctionPrototype(thread, func)); in PrototypeGetter()
204 thread->GetEcmaVM()->GetPGOProfiler()->ProfileClassRootHClass(func.GetTaggedType(), in PrototypeGetter()
214 JSHandle<JSFunction> func(self); in PrototypeSetter() local
215 JSTaggedValue protoOrHClass = func->GetProtoOrHClass(); in PrototypeSetter()
221 func->SetProtoOrHClass(thread, newClass); in PrototypeSetter()
224 … EntityId ctorMethodId = Method::Cast(func->GetMethod().GetTaggedObject())->GetMethodId(); in PrototypeSetter()
229 func->SetProtoOrHClass(thread, value.GetTaggedValue()); in PrototypeSetter()
234 JSMutableHandle<JSTaggedValue> oldPrototype(thread, func->GetProtoOrHClass()); in PrototypeSetter()
237 … oldPrototype.Update(JSHandle<JSTaggedValue>::Cast(NewJSFunctionPrototype(thread, func))); in PrototypeSetter()
240 func->SetProtoOrHClass(thread, value.GetTaggedValue()); in PrototypeSetter()
243 …thread->GetEcmaVM()->GetPGOProfiler()->ProfileProtoTransitionPrototype(func, value, oldPrototype, … in PrototypeSetter()
363 JSHandle<JSFunction> func(self); in LengthGetter() local
364 return JSTaggedValue(func->GetLength()); in LengthGetter()
435 bool JSFunction::MakeConstructor(JSThread *thread, const JSHandle<JSFunction> &func, in MakeConstructor() argument
439 ASSERT_PRINT(func->IsConstructor(), "func must be Constructor type"); in MakeConstructor()
444 ASSERT_PRINT(func->GetProtoOrHClass().IsHole() && func->IsExtensible(), in MakeConstructor()
446 ASSERT_PRINT(JSObject::HasProperty(thread, JSHandle<JSObject>(func), constructorKey), in MakeConstructor()
449 // proto.constructor = func in MakeConstructor()
454 …PropertyDescriptor constructorDesc(thread, JSHandle<JSTaggedValue>::Cast(func), writable, false, t… in MakeConstructor()
457 …PropertyDescriptor constructorDesc(thread, JSHandle<JSTaggedValue>::Cast(func), writable, false, t… in MakeConstructor()
463 // func.prototype = proto in MakeConstructor()
466 SetFunctionPrototypeOrInstanceHClass(thread, func, proto.GetTaggedValue()); in MakeConstructor()
481 JSHandle<JSTaggedValue> func = info->GetFunction(); in Call() local
484 if (!func->IsCallable()) { in Call()
489 auto *hclass = func->GetTaggedObject()->GetClass(); in Call()
504 JSHandle<JSTaggedValue> func(info->GetFunction()); in Construct() local
507 target = func; in Construct()
510 if (!(func->IsConstructor() && target->IsConstructor())) { in Construct()
515 if (func->IsJSFunction()) { in Construct()
517 } else if (func->IsJSProxy()) { in Construct()
520 ASSERT(func->IsBoundFunction()); in Construct()
534 JSHandle<JSTaggedValue> func(JSTaggedValue::GetProperty(thread, thisArg, key).GetValue()); in Invoke() local
536 info->SetFunction(func.GetTaggedValue()); in Invoke()
610 JSTaggedValue JSFunction::InvokeOptimizedEntrypoint(JSThread *thread, JSHandle<JSFunction> func, in InvokeOptimizedEntrypoint() argument
614 Method *method = func->GetCallTarget(); in InvokeOptimizedEntrypoint()
620 RuntimeStubs::StartCallTimer(thread->GetGlueAddr(), func.GetTaggedType(), true); in InvokeOptimizedEntrypoint()
622 if (func->IsCompiledFastCall()) { in InvokeOptimizedEntrypoint()
635 RuntimeStubs::EndCallTimer(thread->GetGlueAddr(), func.GetTaggedType()); in InvokeOptimizedEntrypoint()
645 …// func need to create a new handle, because optimized EcmaRuntimeCallInfo may overwrite this posi… in ConstructInternal()
646 JSHandle<JSFunction> func(thread, info->GetFunction().GetTaggedValue()); in ConstructInternal() local
649 if (!func->IsConstructor()) { in ConstructInternal()
655 if (func->IsBase()) { in ConstructInternal()
657 obj = JSHandle<JSTaggedValue>(factory->NewJSObjectByConstructor(func, newTarget)); in ConstructInternal()
663 if (func->IsCompiledCode()) { in ConstructInternal()
664 resultValue = InvokeOptimizedEntrypoint(thread, func, info); in ConstructInternal()
677 if (func->IsBase()) { in ConstructInternal()
681 if (func->IsDerivedConstructor()) { in ConstructInternal()
695 …aggedValue> JSFunctionBase::GetFunctionName(JSThread *thread, const JSHandle<JSFunctionBase> &func) in GetFunctionName() argument
699 return JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(func), nameKey).GetValue(); in GetFunctionName()
702 bool JSFunctionBase::SetFunctionName(JSThread *thread, const JSHandle<JSFunctionBase> &func, in SetFunctionName() argument
705 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionName()
755 JSHandle<JSTaggedValue> funcHandle(func); in SetFunctionName()
759 bool JSFunction::SetFunctionLength(JSThread *thread, const JSHandle<JSFunction> &func, JSTaggedValu… in SetFunctionLength() argument
761 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionLength()
768 JSHandle<JSTaggedValue> funcHandle(func); in SetFunctionLength()
776 JSHandle<JSBoundFunction> func(info->GetFunction()); in ConstructInternal() local
777 JSHandle<JSTaggedValue> target(thread, func->GetBoundTarget()); in ConstructInternal()
783 if (JSTaggedValue::SameValue(func.GetTaggedValue(), newTarget.GetTaggedValue())) { in ConstructInternal()
787 JSHandle<TaggedArray> boundArgs(thread, func->GetBoundArguments()); in ConstructInternal()
846 void JSFunction::SetFunctionNameNoPrefix(JSThread *thread, JSFunction *func, JSTaggedValue name) in SetFunctionNameNoPrefix() argument
848 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionNameNoPrefix()
852 JSHandle<JSTaggedValue> funcHandle(thread, func); in SetFunctionNameNoPrefix()
983 const JSHandle<JSFunction> &func, FunctionKind kind) in InitializeJSFunction() argument
985 InitializeJSFunction(thread, func, kind); in InitializeJSFunction()
1008 void JSFunction::SetFunctionExtraInfo(JSThread *thread, const JSHandle<JSFunction> &func, void *nat… in SetFunctionExtraInfo() argument
1012 JSTaggedType hashField = Barriers::GetValue<JSTaggedType>(*func, HASH_OFFSET); in SetFunctionExtraInfo()
1017 if (!func->HasHash()) { in SetFunctionExtraInfo()
1018 … Barriers::SetObject<true>(thread, *func, HASH_OFFSET, pointer.GetTaggedValue().GetRawData()); in SetFunctionExtraInfo()
1023 … Barriers::SetObject<true>(thread, *func, HASH_OFFSET, pointer.GetTaggedValue().GetRawData()); in SetFunctionExtraInfo()
1039 … Barriers::SetObject<true>(thread, *func, HASH_OFFSET, newArray.GetTaggedValue().GetRawData()); in SetFunctionExtraInfo()
1046 … Barriers::SetObject<true>(thread, *func, HASH_OFFSET, newArray.GetTaggedValue().GetRawData()); in SetFunctionExtraInfo()
1051 void JSFunction::SetSFunctionExtraInfo(JSThread *thread, const JSHandle<JSFunction> &func, void *na… in SetSFunctionExtraInfo() argument
1054 JSTaggedType hashField = Barriers::GetValue<JSTaggedType>(*func, HASH_OFFSET); in SetSFunctionExtraInfo()
1059 if (!func->HasHash()) { in SetSFunctionExtraInfo()
1060 … Barriers::SetObject<true>(thread, *func, HASH_OFFSET, pointer.GetTaggedValue().GetRawData()); in SetSFunctionExtraInfo()
1065 … Barriers::SetObject<true>(thread, *func, HASH_OFFSET, pointer.GetTaggedValue().GetRawData()); in SetSFunctionExtraInfo()
1082 … Barriers::SetObject<true>(thread, *func, HASH_OFFSET, newArray.GetTaggedValue().GetRawData()); in SetSFunctionExtraInfo()
1089 … Barriers::SetObject<true>(thread, *func, HASH_OFFSET, newArray.GetTaggedValue().GetRawData()); in SetSFunctionExtraInfo()
1093 void JSFunction::SetProfileTypeInfo(const JSThread *thread, const JSHandle<JSFunction> &func, in SetProfileTypeInfo() argument
1096 JSHandle<ProfileTypeInfoCell> handleRaw(thread, func->GetRawProfileTypeInfo()); in SetProfileTypeInfo()
1100 func->SetRawProfileTypeInfo(thread, handleProfileTypeInfoCell, WRITE_BARRIER); in SetProfileTypeInfo()
1175 void JSFunction::InitializeForConcurrentFunction(JSThread *thread, JSHandle<JSFunction> &func) in InitializeForConcurrentFunction() argument
1177 JSHandle<Method> method(thread, func->GetMethod()); in InitializeForConcurrentFunction()
1179 if (func->IsSharedFunction() && !func->GetModule().IsUndefined()) { in InitializeForConcurrentFunction()
1180 sendableEnv.Update(SourceTextModule::Cast(func->GetModule())->GetSendableEnv()); in InitializeForConcurrentFunction()
1213 if (!jsPandaFile->IsBundlePack() && func->IsSharedFunction()) { in InitializeForConcurrentFunction()
1216 func->SetModule(thread, sendableClassRecord); in InitializeForConcurrentFunction()
1218 func->SetModule(thread, moduleRecord); in InitializeForConcurrentFunction()