Lines Matching full:func
35 void JSFunction::InitializeJSFunction(JSThread *thread, const JSHandle<JSFunction> &func, FunctionK… in InitializeJSFunction() argument
37 func->SetProtoOrHClass(thread, JSTaggedValue::Hole(), SKIP_BARRIER); in InitializeJSFunction()
38 func->SetHomeObject(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeJSFunction()
39 func->SetLexicalEnv(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeJSFunction()
40 func->SetModule(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeJSFunction()
41 func->SetMethod(thread, JSTaggedValue::Undefined(), SKIP_BARRIER); in InitializeJSFunction()
48 … func->SetPropertyInlinedProps(thread, PROTOTYPE_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
50 … func->SetPropertyInlinedProps(thread, NAME_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
57 func->SetProtoOrHClass(thread, initialGeneratorFuncPrototype); in InitializeJSFunction()
63 func->SetProtoOrHClass(thread, initialGeneratorFuncPrototype); in InitializeJSFunction()
67 … [[maybe_unused]] bool success = JSObject::DefineOwnProperty(thread, JSHandle<JSObject>(func), in InitializeJSFunction()
73 … func->SetPropertyInlinedProps(thread, NAME_INLINE_PROPERTY_INDEX, accessor.GetTaggedValue()); in InitializeJSFunction()
78 const JSHandle<JSFunction> &func) in NewJSFunctionPrototype() argument
84 func->SetFunctionPrototype(thread, funPro.GetTaggedValue()); in NewJSFunctionPrototype()
88 PropertyDescriptor descriptor(thread, JSHandle<JSTaggedValue>::Cast(func), true, false, true); in NewJSFunctionPrototype()
116 JSHandle<JSFunction> func = JSHandle<JSFunction>::Cast(self); in PrototypeGetter() local
117 if (!func->HasFunctionPrototype()) { in PrototypeGetter()
119 NewJSFunctionPrototype(thread, factory, func); in PrototypeGetter()
127 JSHandle<JSFunction> func(self); in PrototypeSetter() local
128 JSTaggedValue protoOrHClass = func->GetProtoOrHClass(); in PrototypeSetter()
136 func->SetProtoOrHClass(thread, newClass); in PrototypeSetter()
138 func->SetFunctionPrototype(thread, value.GetTaggedValue()); in PrototypeSetter()
219 bool JSFunction::MakeConstructor(JSThread *thread, const JSHandle<JSFunction> &func, in MakeConstructor() argument
223 ASSERT_PRINT(func->IsConstructor(), "func must be Constructor type"); in MakeConstructor()
228 ASSERT_PRINT(func->GetProtoOrHClass().IsHole() && func->IsExtensible(), in MakeConstructor()
230 ASSERT_PRINT(JSObject::HasProperty(thread, JSHandle<JSObject>(func), constructorKey), in MakeConstructor()
233 // proto.constructor = func in MakeConstructor()
238 …PropertyDescriptor constructorDesc(thread, JSHandle<JSTaggedValue>::Cast(func), writable, false, t… in MakeConstructor()
241 …PropertyDescriptor constructorDesc(thread, JSHandle<JSTaggedValue>::Cast(func), writable, false, t… in MakeConstructor()
246 // func.prototype = proto in MakeConstructor()
249 func->SetFunctionPrototype(thread, proto.GetTaggedValue()); in MakeConstructor()
264 JSHandle<JSTaggedValue> func = info->GetFunction(); in Call() local
267 if (!func->IsCallable()) { in Call()
271 auto *hclass = func->GetTaggedObject()->GetClass(); in Call()
285 JSHandle<JSTaggedValue> func(info->GetFunction()); in Construct() local
288 target = func; in Construct()
291 if (!(func->IsConstructor() && target->IsConstructor())) { in Construct()
295 if (func->IsJSFunction()) { in Construct()
297 } else if (func->IsJSProxy()) { in Construct()
300 ASSERT(func->IsBoundFunction()); in Construct()
314 JSHandle<JSTaggedValue> func(JSTaggedValue::GetProperty(thread, thisArg, key).GetValue()); in Invoke() local
316 info->SetFunction(func.GetTaggedValue()); in Invoke()
328 JSHandle<JSFunction> func(info->GetFunction()); in ConstructInternal() local
331 if (!func->IsConstructor()) { in ConstructInternal()
336 if (func->IsBase()) { in ConstructInternal()
338 obj = JSHandle<JSTaggedValue>(factory->NewJSObjectByConstructor(func, newTarget)); in ConstructInternal()
344 Method *method = func->GetCallTarget(); in ConstructInternal()
362 if (func->IsBase()) { in ConstructInternal()
367 if (func->IsDerivedConstructor()) { in ConstructInternal()
377 …aggedValue> JSFunctionBase::GetFunctionName(JSThread *thread, const JSHandle<JSFunctionBase> &func) in GetFunctionName() argument
381 return JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(func), nameKey).GetValue(); in GetFunctionName()
384 bool JSFunctionBase::SetFunctionName(JSThread *thread, const JSHandle<JSFunctionBase> &func, in SetFunctionName() argument
387 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionName()
429 JSHandle<JSTaggedValue> funcHandle(func); in SetFunctionName()
433 bool JSFunction::SetFunctionLength(JSThread *thread, const JSHandle<JSFunction> &func, JSTaggedValu… in SetFunctionLength() argument
435 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionLength()
442 JSHandle<JSTaggedValue> funcHandle(func); in SetFunctionLength()
450 JSHandle<JSBoundFunction> func(info->GetFunction()); in ConstructInternal() local
451 JSHandle<JSTaggedValue> target(thread, func->GetBoundTarget()); in ConstructInternal()
455 if (JSTaggedValue::SameValue(func.GetTaggedValue(), newTarget.GetTaggedValue())) { in ConstructInternal()
459 JSHandle<TaggedArray> boundArgs(thread, func->GetBoundArguments()); in ConstructInternal()
509 void JSFunction::SetFunctionNameNoPrefix(JSThread *thread, JSFunction *func, JSTaggedValue name) in SetFunctionNameNoPrefix() argument
511 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionNameNoPrefix()
515 JSHandle<JSTaggedValue> funcHandle(thread, func); in SetFunctionNameNoPrefix()
617 const JSHandle<JSFunction> &func, FunctionKind kind) in InitializeJSFunction() argument
619 InitializeJSFunction(thread, func, kind); in InitializeJSFunction()