ART: Refactor for bugprone-argument-comment
Handles runtime.
Bug: 116054210
Test: WITH_TIDY=1 mmma art
Change-Id: Ibc0d5086809d647f0ce4df5452eb84442d27ecf0
diff --git a/runtime/entrypoints/entrypoint_utils-inl.h b/runtime/entrypoints/entrypoint_utils-inl.h
index 35bfa91..120a0e9 100644
--- a/runtime/entrypoints/entrypoint_utils-inl.h
+++ b/runtime/entrypoints/entrypoint_utils-inl.h
@@ -191,7 +191,7 @@
return nullptr;
}
// CheckObjectAlloc can cause thread suspension which means we may now be instrumented.
- return klass->Alloc</*kInstrumented*/true>(
+ return klass->Alloc</*kInstrumented=*/true>(
self,
Runtime::Current()->GetHeap()->GetCurrentAllocator()).Ptr();
}
@@ -216,7 +216,7 @@
// Pass in false since the object cannot be finalizable.
// CheckClassInitializedForObjectAlloc can cause thread suspension which means we may now be
// instrumented.
- return klass->Alloc</*kInstrumented*/true, false>(self, heap->GetCurrentAllocator()).Ptr();
+ return klass->Alloc</*kInstrumented=*/true, false>(self, heap->GetCurrentAllocator()).Ptr();
}
// Pass in false since the object cannot be finalizable.
return klass->Alloc<kInstrumented, false>(self, allocator_type).Ptr();
@@ -287,11 +287,11 @@
}
gc::Heap* heap = Runtime::Current()->GetHeap();
// CheckArrayAlloc can cause thread suspension which means we may now be instrumented.
- return mirror::Array::Alloc</*kInstrumented*/true>(self,
- klass,
- component_count,
- klass->GetComponentSizeShift(),
- heap->GetCurrentAllocator());
+ return mirror::Array::Alloc</*kInstrumented=*/true>(self,
+ klass,
+ component_count,
+ klass->GetComponentSizeShift(),
+ heap->GetCurrentAllocator());
}
return mirror::Array::Alloc<kInstrumented>(self, klass, component_count,
klass->GetComponentSizeShift(), allocator_type);
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc
index 5421f69..12136bf 100644
--- a/runtime/entrypoints/entrypoint_utils.cc
+++ b/runtime/entrypoints/entrypoint_utils.cc
@@ -244,7 +244,7 @@
result.outer_method = outer_caller_and_pc.first;
uintptr_t caller_pc = outer_caller_and_pc.second;
result.caller =
- DoGetCalleeSaveMethodCaller(result.outer_method, caller_pc, /* do_caller_check */ true);
+ DoGetCalleeSaveMethodCaller(result.outer_method, caller_pc, /* do_caller_check= */ true);
return result;
}
diff --git a/runtime/entrypoints/quick/quick_default_init_entrypoints.h b/runtime/entrypoints/quick/quick_default_init_entrypoints.h
index 8e784c1..ce12fde 100644
--- a/runtime/entrypoints/quick/quick_default_init_entrypoints.h
+++ b/runtime/entrypoints/quick/quick_default_init_entrypoints.h
@@ -31,7 +31,7 @@
jpoints->pDlsymLookup = art_jni_dlsym_lookup_stub;
// Alloc
- ResetQuickAllocEntryPoints(qpoints, /* is_marking */ true);
+ ResetQuickAllocEntryPoints(qpoints, /* is_marking= */ true);
// Resolution and initialization
qpoints->pInitializeStaticStorage = art_quick_initialize_static_storage;
diff --git a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
index c782c9c..2431bce 100644
--- a/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_deoptimization_entrypoints.cc
@@ -74,9 +74,9 @@
JValue return_value;
return_value.SetJ(0); // we never deoptimize from compiled code with an invoke result.
self->PushDeoptimizationContext(return_value,
- false /* is_reference */,
+ /* is_reference= */ false,
self->GetException(),
- true /* from_code */,
+ /* from_code= */ true,
DeoptimizationMethodType::kDefault);
artDeoptimizeImpl(self, kind, true);
}
diff --git a/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc b/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
index c4d85a3..e939982 100644
--- a/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_dexcache_entrypoints.cc
@@ -140,7 +140,7 @@
StackHandleScope<1> hs(self);
Handle<mirror::Class> h_klass = hs.NewHandle(klass);
bool success = class_linker->EnsureInitialized(
- self, h_klass, /* can_init_fields */ true, /* can_init_parents */ true);
+ self, h_klass, /* can_init_fields= */ true, /* can_init_parents= */ true);
if (UNLIKELY(!success)) {
return nullptr;
}
@@ -157,8 +157,8 @@
ObjPtr<mirror::Class> result = ResolveVerifyAndClinit(dex::TypeIndex(type_idx),
caller,
self,
- /* can_run_clinit */ false,
- /* verify_access */ false);
+ /* can_run_clinit= */ false,
+ /* verify_access= */ false);
if (LIKELY(result != nullptr) && CanReferenceBss(caller_and_outer.outer_method, caller)) {
StoreTypeInBss(caller_and_outer.outer_method, dex::TypeIndex(type_idx), result);
}
@@ -175,8 +175,8 @@
ObjPtr<mirror::Class> result = ResolveVerifyAndClinit(dex::TypeIndex(type_idx),
caller,
self,
- /* can_run_clinit */ false,
- /* verify_access */ true);
+ /* can_run_clinit= */ false,
+ /* verify_access= */ true);
// Do not StoreTypeInBss(); access check entrypoint is never used together with .bss.
return result.Ptr();
}
diff --git a/runtime/entrypoints/quick/quick_field_entrypoints.cc b/runtime/entrypoints/quick/quick_field_entrypoints.cc
index d38e3ed..56232c5 100644
--- a/runtime/entrypoints/quick/quick_field_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_field_entrypoints.cc
@@ -392,7 +392,7 @@
constexpr ReadBarrierOption kReadBarrierOption =
kUseReadBarrier ? kWithReadBarrier : kWithoutReadBarrier;
mirror::Object* result =
- ReadBarrier::Barrier<mirror::Object, /* kIsVolatile */ false, kReadBarrierOption>(
+ ReadBarrier::Barrier<mirror::Object, /* kIsVolatile= */ false, kReadBarrierOption>(
obj,
MemberOffset(offset),
ref_addr);
diff --git a/runtime/entrypoints/quick/quick_throw_entrypoints.cc b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
index ba7fb6b..2e447ec 100644
--- a/runtime/entrypoints/quick/quick_throw_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_throw_entrypoints.cc
@@ -67,7 +67,7 @@
ScopedQuickEntrypointChecks sqec(self);
// We come from an explicit check in the generated code. This path is triggered
// only if the object is indeed null.
- ThrowNullPointerExceptionFromDexPC(/* check_address */ false, 0U);
+ ThrowNullPointerExceptionFromDexPC(/* check_address= */ false, 0U);
self->QuickDeliverException();
}
@@ -75,7 +75,7 @@
extern "C" NO_RETURN void artThrowNullPointerExceptionFromSignal(uintptr_t addr, Thread* self)
REQUIRES_SHARED(Locks::mutator_lock_) {
ScopedQuickEntrypointChecks sqec(self);
- ThrowNullPointerExceptionFromDexPC(/* check_address */ true, addr);
+ ThrowNullPointerExceptionFromDexPC(/* check_address= */ true, addr);
self->QuickDeliverException();
}
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index 84631c3..1472490 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -763,7 +763,7 @@
uint16_t num_regs = accessor.RegistersSize();
// No last shadow coming from quick.
ShadowFrameAllocaUniquePtr shadow_frame_unique_ptr =
- CREATE_SHADOW_FRAME(num_regs, /* link */ nullptr, method, /* dex pc */ 0);
+ CREATE_SHADOW_FRAME(num_regs, /* link= */ nullptr, method, /* dex_pc= */ 0);
ShadowFrame* shadow_frame = shadow_frame_unique_ptr.get();
size_t first_arg_reg = accessor.RegistersSize() - accessor.InsSize();
BuildQuickShadowFrameVisitor shadow_frame_builder(sp, method->IsStatic(), shorty, shorty_len,
@@ -820,7 +820,7 @@
result,
shorty[0] == 'L' || shorty[0] == '[', /* class or array */
force_frame_pop ? nullptr : self->GetException(),
- false /* from_code */,
+ /* from_code= */ false,
DeoptimizationMethodType::kDefault);
// Set special exception to cause deoptimization.
@@ -912,7 +912,7 @@
uint32_t shorty_len = 0;
const char* shorty = non_proxy_method->GetShorty(&shorty_len);
BuildQuickArgumentVisitor local_ref_visitor(
- sp, /* is_static */ false, shorty, shorty_len, &soa, &args);
+ sp, /* is_static= */ false, shorty, shorty_len, &soa, &args);
local_ref_visitor.VisitArguments();
DCHECK_GT(args.size(), 0U) << proxy_method->PrettyMethod();
@@ -975,7 +975,7 @@
const char* shorty,
uint32_t shorty_len,
size_t arg_pos)
- : QuickArgumentVisitor(sp, /* is_static */ false, shorty, shorty_len),
+ : QuickArgumentVisitor(sp, /* is_static= */ false, shorty, shorty_len),
cur_pos_(0u),
arg_pos_(arg_pos),
ref_arg_(nullptr) {
@@ -1061,7 +1061,7 @@
<< proxy_method->PrettyMethod() << " " << non_proxy_method->PrettyMethod();
uint32_t shorty_len = 0;
const char* shorty = non_proxy_method->GetShorty(&shorty_len);
- GetQuickReferenceArgumentsVisitor ref_args_visitor(sp, /* is_static */ false, shorty, shorty_len);
+ GetQuickReferenceArgumentsVisitor ref_args_visitor(sp, /*is_static=*/ false, shorty, shorty_len);
ref_args_visitor.VisitArguments();
std::vector<StackReference<mirror::Object>*> ref_args = ref_args_visitor.GetReferenceArguments();
return ref_args;
@@ -2709,7 +2709,7 @@
conflict_method,
interface_method,
method,
- /*force_new_conflict_method*/false);
+ /*force_new_conflict_method=*/false);
if (new_conflict_method != conflict_method) {
// Update the IMT if we create a new conflict method. No fence needed here, as the
// data is consistent.
@@ -2784,7 +2784,7 @@
const size_t num_vregs = is_range ? inst.VRegA_4rcc() : inst.VRegA_45cc();
const size_t first_arg = 0;
ShadowFrameAllocaUniquePtr shadow_frame_unique_ptr =
- CREATE_SHADOW_FRAME(num_vregs, /* link */ nullptr, resolved_method, dex_pc);
+ CREATE_SHADOW_FRAME(num_vregs, /* link= */ nullptr, resolved_method, dex_pc);
ShadowFrame* shadow_frame = shadow_frame_unique_ptr.get();
ScopedStackedShadowFramePusher
frame_pusher(self, shadow_frame, StackedShadowFrameType::kShadowFrameUnderConstruction);
@@ -2877,7 +2877,7 @@
const size_t first_arg = 0;
const size_t num_vregs = ArtMethod::NumArgRegisters(shorty);
ShadowFrameAllocaUniquePtr shadow_frame_unique_ptr =
- CREATE_SHADOW_FRAME(num_vregs, /* link */ nullptr, caller_method, dex_pc);
+ CREATE_SHADOW_FRAME(num_vregs, /* link= */ nullptr, caller_method, dex_pc);
ShadowFrame* shadow_frame = shadow_frame_unique_ptr.get();
ScopedStackedShadowFramePusher
frame_pusher(self, shadow_frame, StackedShadowFrameType::kShadowFrameUnderConstruction);