optimize primitive type ACCESSORS

Signed-off-by: wengchangcheng <wengchangcheng@huawei.com>
This commit is contained in:
wengchangcheng
2022-01-25 18:05:12 +08:00
parent 750850455e
commit 9a2b7d04e8
101 changed files with 1056 additions and 1449 deletions
+4 -2
View File
@@ -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)) {