mirror of
https://github.com/openharmony/ark_js_runtime.git
synced 2026-07-19 11:34:49 -04:00
optimize primitive type ACCESSORS
Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
This commit is contained in:
@@ -43,14 +43,16 @@ void JSFunction::InitializeJSFunction(JSThread *thread, const JSHandle<JSFunctio
|
||||
thisMode = FunctionMode::GLOBAL;
|
||||
}
|
||||
|
||||
int32_t flag = FunctionKindBit::Encode(kind) | StrictBit::Encode(strict) | ThisModeBit::Encode(thisMode);
|
||||
func->SetProtoOrDynClass(thread, JSTaggedValue::Hole(), SKIP_BARRIER);
|
||||
func->SetHomeObject(thread, JSTaggedValue::Undefined(), SKIP_BARRIER);
|
||||
func->SetLexicalEnv(thread, JSTaggedValue::Undefined(), SKIP_BARRIER);
|
||||
func->SetConstantPool(thread, JSTaggedValue::Undefined(), SKIP_BARRIER);
|
||||
func->SetProfileTypeInfo(thread, JSTaggedValue::Undefined(), SKIP_BARRIER);
|
||||
func->SetFunctionExtraInfo(thread, JSTaggedValue::Undefined());
|
||||
func->SetFunctionInfoFlag(thread, JSTaggedValue(flag));
|
||||
func->SetFunctionKind(kind);
|
||||
func->SetStrict(strict);
|
||||
func->SetThisMode(thisMode);
|
||||
func->SetResolved(false);
|
||||
|
||||
auto globalConst = thread->GlobalConstants();
|
||||
if (HasPrototype(kind)) {
|
||||
|
||||
Reference in New Issue
Block a user