• Home
  • Raw
  • Download

Lines Matching full:func

29 void JSFunction::InitializeJSFunction(JSThread *thread, const JSHandle<JSFunction> &func, FunctionK…  in InitializeJSFunction()  argument
31 InitializeWithDefaultValue(thread, func); in InitializeJSFunction()
37func->SetPropertyInlinedProps(thread, PROTOTYPE_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
39func->SetPropertyInlinedProps(thread, NAME_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
41func->SetPropertyInlinedProps(thread, LENGTH_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
49 func->SetProtoOrHClass(thread, initialGeneratorFuncPrototype); in InitializeJSFunction()
58 func->SetProtoOrHClass(thread, initialGeneratorFuncPrototype); in InitializeJSFunction()
63 …thread, JSHandle<JSObject>(func), globalConst->GetHandledPrototypeString(), desc, SCheckMode::SKIP… in InitializeJSFunction()
68func->SetPropertyInlinedProps(thread, NAME_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
70func->SetPropertyInlinedProps(thread, LENGTH_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
74 void JSFunction::InitializeSFunction(JSThread *thread, const JSHandle<JSFunction> &func, FunctionKi… in InitializeSFunction() argument
76 InitializeWithDefaultValue(thread, func); in InitializeSFunction()
81func->SetPropertyInlinedProps(thread, PROTOTYPE_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeSFunction()
84func->SetPropertyInlinedProps(thread, NAME_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeSFunction()
86func->SetPropertyInlinedProps(thread, LENGTH_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeSFunction()
90 void JSFunction::InitializeWithDefaultValue(JSThread *thread, const JSHandle<JSFunction> &func) in InitializeWithDefaultValue() argument
92 func->SetProtoOrHClass(thread, JSTaggedValue::Hole(), SKIP_BARRIER); in InitializeWithDefaultValue()
93 func->SetHomeObject(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
94 func->SetWorkNodePointer(reinterpret_cast<uintptr_t>(nullptr)); in InitializeWithDefaultValue()
95 func->SetLexicalEnv(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
96 func->SetMachineCode(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
97 func->SetBaselineCode(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
98func->SetRawProfileTypeInfo(thread, thread->GlobalConstants()->GetEmptyProfileTypeInfoCell(), SKIP… in InitializeWithDefaultValue()
99 func->SetMethod(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
100 func->SetModule(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeWithDefaultValue()
101 func->SetProtoTransRootHClass(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()
107 …le<JSObject> JSFunction::NewJSFunctionPrototype(JSThread *thread, const JSHandle<JSFunction> &func) in NewJSFunctionPrototype() argument
112 if (func->IsSharedFunction()) { in NewJSFunctionPrototype()
118 SetFunctionPrototypeOrInstanceHClass(thread, func, funPro.GetTaggedValue()); in NewJSFunctionPrototype()
122 PropertyDescriptor descriptor(thread, JSHandle<JSTaggedValue>::Cast(func), true, false, true); in NewJSFunctionPrototype()
163 JSHandle<JSFunction> func = JSHandle<JSFunction>::Cast(self); in PrototypeGetter() local
164 if (!func->HasFunctionPrototype()) { in PrototypeGetter()
165 …SHandle<JSTaggedValue> proto = JSHandle<JSTaggedValue>::Cast(NewJSFunctionPrototype(thread, func)); in PrototypeGetter()
167 thread->GetEcmaVM()->GetPGOProfiler()->ProfileClassRootHClass(func.GetTaggedType(), in PrototypeGetter()
177 JSHandle<JSFunction> func(self); in PrototypeSetter() local
178 JSTaggedValue protoOrHClass = func->GetProtoOrHClass(); in PrototypeSetter()
183 func->SetProtoOrHClass(thread, newClass); in PrototypeSetter()
186 … EntityId ctorMethodId = Method::Cast(func->GetMethod().GetTaggedObject())->GetMethodId(); in PrototypeSetter()
191 func->SetProtoOrHClass(thread, value.GetTaggedValue()); in PrototypeSetter()
196 JSMutableHandle<JSTaggedValue> oldPrototype(thread, func->GetProtoOrHClass()); in PrototypeSetter()
199 … oldPrototype.Update(JSHandle<JSTaggedValue>::Cast(NewJSFunctionPrototype(thread, func))); in PrototypeSetter()
202 func->SetProtoOrHClass(thread, value.GetTaggedValue()); in PrototypeSetter()
205 …thread->GetEcmaVM()->GetPGOProfiler()->ProfileProtoTransitionPrototype(func, value, oldPrototype, … in PrototypeSetter()
328 JSHandle<JSFunction> func(self); in LengthGetter() local
329 return JSTaggedValue(func->GetLength()); in LengthGetter()
400 bool JSFunction::MakeConstructor(JSThread *thread, const JSHandle<JSFunction> &func, in MakeConstructor() argument
404 ASSERT_PRINT(func->IsConstructor(), "func must be Constructor type"); in MakeConstructor()
409 ASSERT_PRINT(func->GetProtoOrHClass().IsHole() && func->IsExtensible(), in MakeConstructor()
411 ASSERT_PRINT(JSObject::HasProperty(thread, JSHandle<JSObject>(func), constructorKey), in MakeConstructor()
414 // proto.constructor = func in MakeConstructor()
419 …PropertyDescriptor constructorDesc(thread, JSHandle<JSTaggedValue>::Cast(func), writable, false, t… in MakeConstructor()
422 …PropertyDescriptor constructorDesc(thread, JSHandle<JSTaggedValue>::Cast(func), writable, false, t… in MakeConstructor()
428 // func.prototype = proto in MakeConstructor()
431 SetFunctionPrototypeOrInstanceHClass(thread, func, proto.GetTaggedValue()); in MakeConstructor()
446 JSHandle<JSTaggedValue> func = info->GetFunction(); in Call() local
449 if (!func->IsCallable()) { in Call()
454 auto *hclass = func->GetTaggedObject()->GetClass(); in Call()
469 JSHandle<JSTaggedValue> func(info->GetFunction()); in Construct() local
472 target = func; in Construct()
475 if (!(func->IsConstructor() && target->IsConstructor())) { in Construct()
480 if (func->IsJSFunction()) { in Construct()
482 } else if (func->IsJSProxy()) { in Construct()
485 ASSERT(func->IsBoundFunction()); in Construct()
499 JSHandle<JSTaggedValue> func(JSTaggedValue::GetProperty(thread, thisArg, key).GetValue()); in Invoke() local
501 info->SetFunction(func.GetTaggedValue()); in Invoke()
575 JSTaggedValue JSFunction::InvokeOptimizedEntrypoint(JSThread *thread, JSHandle<JSFunction> func, in InvokeOptimizedEntrypoint() argument
579 Method *method = func->GetCallTarget(); in InvokeOptimizedEntrypoint()
585 RuntimeStubs::StartCallTimer(thread->GetGlueAddr(), func.GetTaggedType(), true); in InvokeOptimizedEntrypoint()
587 if (func->IsCompiledFastCall()) { in InvokeOptimizedEntrypoint()
600 RuntimeStubs::EndCallTimer(thread->GetGlueAddr(), func.GetTaggedType()); in InvokeOptimizedEntrypoint()
610 …// func need to create a new handle, because optimized EcmaRuntimeCallInfo may overwrite this posi… in ConstructInternal()
611 JSHandle<JSFunction> func(thread, info->GetFunction().GetTaggedValue()); in ConstructInternal() local
614 if (!func->IsConstructor()) { in ConstructInternal()
620 if (func->IsBase()) { in ConstructInternal()
622 obj = JSHandle<JSTaggedValue>(factory->NewJSObjectByConstructor(func, newTarget)); in ConstructInternal()
628 if (func->IsCompiledCode()) { in ConstructInternal()
629 resultValue = InvokeOptimizedEntrypoint(thread, func, info); in ConstructInternal()
642 if (func->IsBase()) { in ConstructInternal()
646 if (func->IsDerivedConstructor()) { in ConstructInternal()
660 …aggedValue> JSFunctionBase::GetFunctionName(JSThread *thread, const JSHandle<JSFunctionBase> &func) in GetFunctionName() argument
664 return JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(func), nameKey).GetValue(); in GetFunctionName()
667 bool JSFunctionBase::SetFunctionName(JSThread *thread, const JSHandle<JSFunctionBase> &func, in SetFunctionName() argument
670 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionName()
720 JSHandle<JSTaggedValue> funcHandle(func); in SetFunctionName()
724 bool JSFunction::SetFunctionLength(JSThread *thread, const JSHandle<JSFunction> &func, JSTaggedValu… in SetFunctionLength() argument
726 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionLength()
733 JSHandle<JSTaggedValue> funcHandle(func); in SetFunctionLength()
741 JSHandle<JSBoundFunction> func(info->GetFunction()); in ConstructInternal() local
742 JSHandle<JSTaggedValue> target(thread, func->GetBoundTarget()); in ConstructInternal()
748 if (JSTaggedValue::SameValue(func.GetTaggedValue(), newTarget.GetTaggedValue())) { in ConstructInternal()
752 JSHandle<TaggedArray> boundArgs(thread, func->GetBoundArguments()); in ConstructInternal()
811 void JSFunction::SetFunctionNameNoPrefix(JSThread *thread, JSFunction *func, JSTaggedValue name) in SetFunctionNameNoPrefix() argument
813 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionNameNoPrefix()
817 JSHandle<JSTaggedValue> funcHandle(thread, func); in SetFunctionNameNoPrefix()
937 const JSHandle<JSFunction> &func, FunctionKind kind) in InitializeJSFunction() argument
939 InitializeJSFunction(thread, func, kind); in InitializeJSFunction()
1046 void JSFunction::SetProfileTypeInfo(const JSThread *thread, const JSHandle<JSFunction> &func, in SetProfileTypeInfo() argument
1049 JSHandle<ProfileTypeInfoCell> handleRaw(thread, func->GetRawProfileTypeInfo()); in SetProfileTypeInfo()
1053 func->SetRawProfileTypeInfo(thread, handleProfileTypeInfoCell, WRITE_BARRIER); in SetProfileTypeInfo()
1118 void JSFunction::InitializeForConcurrentFunction(JSThread *thread, JSHandle<JSFunction> &func) in InitializeForConcurrentFunction() argument
1120 JSHandle<Method> method(thread, func->GetMethod()); in InitializeForConcurrentFunction()
1122 if (func->IsSharedFunction() && !func->GetModule().IsUndefined()) { in InitializeForConcurrentFunction()
1123 sendableEnv.Update(SourceTextModule::Cast(func->GetModule())->GetSendableEnv()); in InitializeForConcurrentFunction()
1160 if (!jsPandaFile->IsBundlePack() && func->IsSharedFunction()) { in InitializeForConcurrentFunction()
1163 func->SetModule(thread, sendableClassRecord); in InitializeForConcurrentFunction()
1165 func->SetModule(thread, moduleRecord); in InitializeForConcurrentFunction()