• 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()
325 JSHandle<JSFunction> func(self); in LengthGetter() local
326 return JSTaggedValue(func->GetLength()); in LengthGetter()
397 bool JSFunction::MakeConstructor(JSThread *thread, const JSHandle<JSFunction> &func, in MakeConstructor() argument
401 ASSERT_PRINT(func->IsConstructor(), "func must be Constructor type"); in MakeConstructor()
406 ASSERT_PRINT(func->GetProtoOrHClass().IsHole() && func->IsExtensible(), in MakeConstructor()
408 ASSERT_PRINT(JSObject::HasProperty(thread, JSHandle<JSObject>(func), constructorKey), in MakeConstructor()
411 // proto.constructor = func in MakeConstructor()
416 …PropertyDescriptor constructorDesc(thread, JSHandle<JSTaggedValue>::Cast(func), writable, false, t… in MakeConstructor()
419 …PropertyDescriptor constructorDesc(thread, JSHandle<JSTaggedValue>::Cast(func), writable, false, t… in MakeConstructor()
425 // func.prototype = proto in MakeConstructor()
428 SetFunctionPrototypeOrInstanceHClass(thread, func, proto.GetTaggedValue()); in MakeConstructor()
443 JSHandle<JSTaggedValue> func = info->GetFunction(); in Call() local
446 if (!func->IsCallable()) { in Call()
451 auto *hclass = func->GetTaggedObject()->GetClass(); in Call()
466 JSHandle<JSTaggedValue> func(info->GetFunction()); in Construct() local
469 target = func; in Construct()
472 if (!(func->IsConstructor() && target->IsConstructor())) { in Construct()
477 if (func->IsJSFunction()) { in Construct()
479 } else if (func->IsJSProxy()) { in Construct()
482 ASSERT(func->IsBoundFunction()); in Construct()
496 JSHandle<JSTaggedValue> func(JSTaggedValue::GetProperty(thread, thisArg, key).GetValue()); in Invoke() local
498 info->SetFunction(func.GetTaggedValue()); in Invoke()
572 JSTaggedValue JSFunction::InvokeOptimizedEntrypoint(JSThread *thread, JSHandle<JSFunction> func, in InvokeOptimizedEntrypoint() argument
576 Method *method = func->GetCallTarget(); in InvokeOptimizedEntrypoint()
582 RuntimeStubs::StartCallTimer(thread->GetGlueAddr(), func.GetTaggedType(), true); in InvokeOptimizedEntrypoint()
584 if (func->IsCompiledFastCall()) { in InvokeOptimizedEntrypoint()
597 RuntimeStubs::EndCallTimer(thread->GetGlueAddr(), func.GetTaggedType()); in InvokeOptimizedEntrypoint()
607 …// func need to create a new handle, because optimized EcmaRuntimeCallInfo may overwrite this posi… in ConstructInternal()
608 JSHandle<JSFunction> func(thread, info->GetFunction().GetTaggedValue()); in ConstructInternal() local
611 if (!func->IsConstructor()) { in ConstructInternal()
617 if (func->IsBase()) { in ConstructInternal()
619 obj = JSHandle<JSTaggedValue>(factory->NewJSObjectByConstructor(func, newTarget)); in ConstructInternal()
625 if (func->IsCompiledCode()) { in ConstructInternal()
626 resultValue = InvokeOptimizedEntrypoint(thread, func, info); in ConstructInternal()
639 if (func->IsBase()) { in ConstructInternal()
643 if (func->IsDerivedConstructor()) { in ConstructInternal()
657 …aggedValue> JSFunctionBase::GetFunctionName(JSThread *thread, const JSHandle<JSFunctionBase> &func) in GetFunctionName() argument
661 return JSObject::GetProperty(thread, JSHandle<JSTaggedValue>(func), nameKey).GetValue(); in GetFunctionName()
664 bool JSFunctionBase::SetFunctionName(JSThread *thread, const JSHandle<JSFunctionBase> &func, in SetFunctionName() argument
667 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionName()
717 JSHandle<JSTaggedValue> funcHandle(func); in SetFunctionName()
721 bool JSFunction::SetFunctionLength(JSThread *thread, const JSHandle<JSFunction> &func, JSTaggedValu… in SetFunctionLength() argument
723 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionLength()
730 JSHandle<JSTaggedValue> funcHandle(func); in SetFunctionLength()
738 JSHandle<JSBoundFunction> func(info->GetFunction()); in ConstructInternal() local
739 JSHandle<JSTaggedValue> target(thread, func->GetBoundTarget()); in ConstructInternal()
745 if (JSTaggedValue::SameValue(func.GetTaggedValue(), newTarget.GetTaggedValue())) { in ConstructInternal()
749 JSHandle<TaggedArray> boundArgs(thread, func->GetBoundArguments()); in ConstructInternal()
808 void JSFunction::SetFunctionNameNoPrefix(JSThread *thread, JSFunction *func, JSTaggedValue name) in SetFunctionNameNoPrefix() argument
810 ASSERT_PRINT(func->IsExtensible(), "Function must be extensible"); in SetFunctionNameNoPrefix()
814 JSHandle<JSTaggedValue> funcHandle(thread, func); in SetFunctionNameNoPrefix()
934 const JSHandle<JSFunction> &func, FunctionKind kind) in InitializeJSFunction() argument
936 InitializeJSFunction(thread, func, kind); in InitializeJSFunction()
1043 void JSFunction::SetProfileTypeInfo(const JSThread *thread, const JSHandle<JSFunction> &func, in SetProfileTypeInfo() argument
1046 JSHandle<ProfileTypeInfoCell> handleRaw(thread, func->GetRawProfileTypeInfo()); in SetProfileTypeInfo()
1050 func->SetRawProfileTypeInfo(thread, handleProfileTypeInfoCell, WRITE_BARRIER); in SetProfileTypeInfo()
1115 void JSFunction::InitializeForConcurrentFunction(JSThread *thread, JSHandle<JSFunction> &func) in InitializeForConcurrentFunction() argument
1117 JSHandle<Method> method(thread, func->GetMethod()); in InitializeForConcurrentFunction()
1119 if (func->IsSharedFunction() && !func->GetModule().IsUndefined()) { in InitializeForConcurrentFunction()
1120 sendableEnv.Update(SourceTextModule::Cast(func->GetModule())->GetSendableEnv()); in InitializeForConcurrentFunction()
1157 if (!jsPandaFile->IsBundlePack() && func->IsSharedFunction()) { in InitializeForConcurrentFunction()
1160 func->SetModule(thread, sendableClassRecord); in InitializeForConcurrentFunction()
1162 func->SetModule(thread, moduleRecord); in InitializeForConcurrentFunction()