mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-11-23 10:09:54 +00:00
commit
c45e2140c1
@ -1942,6 +1942,12 @@ JSHandle<JSHClass> ObjectFactory::CreateDefaultClassConstructorHClass(JSHClass *
|
||||
return defaultHclass;
|
||||
}
|
||||
|
||||
void ObjectFactory::SetCodeEntryToFunctionFromMethod(const JSHandle<JSFunction> &func, const JSHandle<Method> &mothed)
|
||||
{
|
||||
uintptr_t entry = mothed->GetCodeEntryOrLiteral();
|
||||
func->SetCodeEntry(entry);
|
||||
}
|
||||
|
||||
JSHandle<JSFunction> ObjectFactory::NewJSFunctionByHClass(const JSHandle<Method> &method,
|
||||
const JSHandle<JSHClass> &clazz,
|
||||
MemSpaceType type)
|
||||
@ -1969,6 +1975,8 @@ JSHandle<JSFunction> ObjectFactory::NewJSFunctionByHClass(const JSHandle<Method>
|
||||
if (method->IsAotWithCallField()) {
|
||||
thread_->GetEcmaVM()->GetAOTFileManager()->
|
||||
SetAOTFuncEntry(method->GetJSPandaFile(), *function, *method);
|
||||
} else {
|
||||
SetCodeEntryToFunctionFromMethod(function, method);
|
||||
}
|
||||
return function;
|
||||
}
|
||||
|
@ -892,6 +892,8 @@ public:
|
||||
JSHandle<SendableEnv> NewSendableEnv(int numSlots);
|
||||
JSHandle<JSFunction> NewJSSendableFunction(const JSHandle<Method> &methodHandle);
|
||||
|
||||
void SetCodeEntryToFunctionFromMethod(const JSHandle<JSFunction> &func, const JSHandle<Method> &mothed);
|
||||
|
||||
private:
|
||||
friend class GlobalEnv;
|
||||
friend class GlobalEnvConstants;
|
||||
|
@ -245,6 +245,8 @@ JSHandle<JSFunction> ObjectFactory::NewSFunctionByHClass(const JSHandle<Method>
|
||||
if (method->IsAotWithCallField()) {
|
||||
thread_->GetEcmaVM()->GetAOTFileManager()->
|
||||
SetAOTFuncEntry(method->GetJSPandaFile(), *function, *method);
|
||||
} else {
|
||||
SetCodeEntryToFunctionFromMethod(function, method);
|
||||
}
|
||||
return function;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user