mirror of
https://gitee.com/openharmony/arkcompiler_ets_runtime
synced 2024-10-07 16:13:49 +00:00
Modify code warning
Issue: https://gitee.com/openharmony/arkcompiler_ets_runtime/issues/I8UTG3 Signed-off-by: liushitong <liushitong@huawei.com>
This commit is contained in:
parent
244e2fe1f7
commit
e3ab474203
@ -770,12 +770,12 @@ public:
|
||||
|
||||
bool IsReceiverNoEqNewHolder(size_t index) const
|
||||
{
|
||||
return std::get<0>(types_[index]) != std::get<2>(types_[index]);
|
||||
return std::get<0>(types_[index]) != std::get<2>(types_[index]); // 2 means 3rd object
|
||||
}
|
||||
|
||||
bool IsHolderEqNewHolder(size_t index) const
|
||||
{
|
||||
return std::get<1>(types_[index]) == std::get<2>(types_[index]);
|
||||
return std::get<1>(types_[index]) == std::get<2>(types_[index]); // 2 means 3rd object
|
||||
}
|
||||
|
||||
GateRef GetValue() const
|
||||
|
@ -921,7 +921,7 @@ bool JSObject::SetPropertyForDataDescriptor(ObjectOperator *op, const JSHandle<J
|
||||
if (hasReceiver || isInternalAccessor) {
|
||||
return op->AddProperty(JSHandle<JSObject>(receiver), value, PropertyAttributes::Default());
|
||||
} else if (op->IsFound() && receiver.GetTaggedValue() != op->GetHolder().GetTaggedValue()) {
|
||||
return op->AddProperty(JSHandle<JSObject>(receiver), value, PropertyAttributes::Default());
|
||||
return op->AddProperty(JSHandle<JSObject>(receiver), value, PropertyAttributes::Default());
|
||||
} else {
|
||||
return op->AddProperty(JSHandle<JSObject>(receiver), value, op->GetAttr());
|
||||
}
|
||||
|
@ -385,7 +385,7 @@ public:
|
||||
auto count = protoChain.size();
|
||||
size_t size = sizeof(PGOProtoChainTemplate);
|
||||
if (count != 0) {
|
||||
size += sizeof(PGOProfileType) * (count - 1) * 2;
|
||||
size += sizeof(PGOProfileType) * (count - 1) * 2; // 2 means mul by 2
|
||||
}
|
||||
auto result = reinterpret_cast<PGOProtoChainTemplate *>(malloc(size));
|
||||
new (result) PGOProtoChainTemplate(size, count);
|
||||
@ -410,7 +410,7 @@ public:
|
||||
auto count = from->GetCount();
|
||||
size_t size = sizeof(PGOProtoChainTemplate);
|
||||
if (count != 0) {
|
||||
size += sizeof(PGOProfileType) * (count - 1) * 2;
|
||||
size += sizeof(PGOProfileType) * (count - 1) * 2; // 2 means mul by 2
|
||||
}
|
||||
auto result = reinterpret_cast<PGOProtoChainTemplate *>(malloc(size));
|
||||
new (result) PGOProtoChainTemplate(size, count);
|
||||
|
Loading…
Reference in New Issue
Block a user