fixed for code static check

Signed-off-by: getingke <getingke@huawei.com>
Change-Id: Ia58baf151cf0a161be73642ad339450b18fedec8
This commit is contained in:
getingke 2021-10-27 14:19:18 +08:00
parent eba840418b
commit 8b2b159e94
3 changed files with 15 additions and 10 deletions

View File

@ -959,7 +959,7 @@ AddrShift Stub::StringToElementIndex(AddrShift string)
{
c = ZExtInt16ToInt32(Load(INT16_TYPE, dataUtf16,
PtrMul(ChangeInt32ToPointer(*i),
GetPtrConstant(2)))); // 2 : 2 means utf16 char width is two bytes
GetPtrConstant(2)))); // 2 : 2 means utf16 char width is two bytes
Jump(&getChar2);
}
Bind(&notUtf16);

View File

@ -1358,5 +1358,4 @@ HWTEST_F_L0(StubTest, FastTypeOfTest)
EXPECT_EQ(resultVal9, globalConst->GetObjectString());
EXPECT_EQ(resultVal9, expectResult9);
}
} // namespace panda::test

View File

@ -34,7 +34,6 @@ public:
parser->Add(&enable_ark_tools_);
parser->Add(&enable_stub_aot_);
parser->Add(&stub_module_file_);
}
bool IsEnableArkTools() const
@ -52,34 +51,41 @@ public:
return enable_ark_tools_.WasSet();
}
bool IsEnableStubAot() const {
bool IsEnableStubAot() const
{
return enable_stub_aot_.GetValue();
}
void SetEnableStubAot(bool value) {
void SetEnableStubAot(bool value)
{
enable_stub_aot_.SetValue(value);
}
bool WasSetEnableStubAot() const {
bool WasSetEnableStubAot() const
{
return enable_stub_aot_.WasSet();
}
std::string GetStubModuleFile() const {
std::string GetStubModuleFile() const
{
return stub_module_file_.GetValue();
}
void SetStubModuleFile(std::string value) {
void SetStubModuleFile(std::string value)
{
stub_module_file_.SetValue(std::move(value));
}
bool WasSetStubModuleFile() const {
bool WasSetStubModuleFile() const
{
return stub_module_file_.WasSet();
}
private:
PandArg<bool> enable_ark_tools_{"enable-ark-tools", false, R"(Enable ark tools to debug. Default: false)"};
PandArg<bool> enable_stub_aot_{"enable-stub-aot", false, R"(enable aot of fast stub. Default: false)"};
PandArg<std::string> stub_module_file_{"stub-module-file", R"(stub.m)", R"(Path to stub module file. Default: "stub.m")"};
PandArg<std::string> stub_module_file_{"stub-module-file", R"(stub.m)",
R"(Path to stub module file. Default: "stub.m")"};
};
} // namespace panda::ecmascript