[vm] Fix Google3 ClangTidy warnings.
TEST=presubmit
Change-Id: Ifa4e77cc4548729526a90683ee163c68517e87ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/433001
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
diff --git a/runtime/.clang-tidy b/runtime/.clang-tidy
index 633aabf..15dc499 100644
--- a/runtime/.clang-tidy
+++ b/runtime/.clang-tidy
@@ -1 +1 @@
-Checks: -*,readability-implicit-bool-conversion
+Checks: -*,readability-implicit-bool-conversion,bugprone-argument-comment
diff --git a/runtime/bin/elf_loader.cc b/runtime/bin/elf_loader.cc
index 1ba6f00..3727f3f 100644
--- a/runtime/bin/elf_loader.cc
+++ b/runtime/bin/elf_loader.cc
@@ -487,7 +487,7 @@
return nullptr;
}
std::unique_ptr<LoadedElf> elf(
- new LoadedElf(std::move(mappable), /*file_offset=*/0));
+ new LoadedElf(std::move(mappable), /*elf_data_offset=*/0));
if (!elf->Load() ||
!elf->ResolveSymbols(vm_snapshot_data, vm_snapshot_instrs,
diff --git a/runtime/bin/main_impl.cc b/runtime/bin/main_impl.cc
index 0096d05..6dee82c 100644
--- a/runtime/bin/main_impl.cc
+++ b/runtime/bin/main_impl.cc
@@ -220,7 +220,7 @@
const bool isolate_run_app_snapshot =
isolate_group_data->RunFromAppSnapshot();
Dart_Handle result = SetupCoreLibraries(isolate, isolate_data,
- /*group_start=*/false,
+ /*is_isolate_group_start=*/false,
/*is_kernel_isolate=*/false,
/*resolved_packages_config=*/nullptr);
if (Dart_IsError(result)) goto failed;
diff --git a/runtime/bin/run_vm_tests.cc b/runtime/bin/run_vm_tests.cc
index b7c39c4..2a894bb 100644
--- a/runtime/bin/run_vm_tests.cc
+++ b/runtime/bin/run_vm_tests.cc
@@ -149,7 +149,8 @@
// Load embedder specific bits and return.
if (!bin::VmService::Setup("127.0.0.1", 0,
- /*dev_mode=*/false, /*auth_disabled=*/true,
+ /*dev_mode_server=*/false,
+ /*auth_codes_disabled=*/true,
/*write_service_info_filename=*/"",
/*trace_loading=*/false, /*deterministic=*/true,
/*enable_service_port_fallback=*/false,
diff --git a/runtime/bin/secure_socket_filter.cc b/runtime/bin/secure_socket_filter.cc
index 622d3aa..8be564a 100644
--- a/runtime/bin/secure_socket_filter.cc
+++ b/runtime/bin/secure_socket_filter.cc
@@ -162,12 +162,13 @@
Dart_NativeArguments args) {
// This is to be used only in conjunction with certificate trust evaluator
// running asynchronously, which is only used on mac/ios at the moment.
-#if !defined(DART_HOST_OS_MACOS)
- FATAL("This is to be used only on mac/ios platforms");
-#endif
+#if defined(DART_HOST_OS_MACOS)
intptr_t x509_pointer = DartUtils::GetNativeIntptrArgument(args, 0);
X509* x509 = reinterpret_cast<X509*>(x509_pointer);
Dart_SetReturnValue(args, X509Helper::WrappedX509Certificate(x509));
+#else
+ FATAL("This is to be used only on mac/ios platforms");
+#endif
}
void FUNCTION_NAME(SecureSocket_GetSelectedProtocol)(
diff --git a/runtime/bin/snapshot_utils.cc b/runtime/bin/snapshot_utils.cc
index 9060564..038d87a 100644
--- a/runtime/bin/snapshot_utils.cc
+++ b/runtime/bin/snapshot_utils.cc
@@ -945,7 +945,7 @@
snapshot_filename);
}
Dart_Handle result = Dart_CreateAppAOTSnapshotAsAssembly(
- StreamingWriteCallback, file, /*strip=*/false,
+ StreamingWriteCallback, file, /*stripped=*/false,
/*debug_callback_data=*/nullptr);
if (Dart_IsError(result)) {
ErrorExit(kErrorExitCode, "%s\n", Dart_GetError(result));
diff --git a/runtime/lib/regexp.cc b/runtime/lib/regexp.cc
index 1852c51..649b080 100644
--- a/runtime/lib/regexp.cc
+++ b/runtime/lib/regexp.cc
@@ -167,7 +167,7 @@
}
#endif
return BytecodeRegExpMacroAssembler::Interpret(regexp, subject, start_index,
- /*sticky=*/sticky, zone);
+ /*is_sticky=*/sticky, zone);
}
DEFINE_NATIVE_ENTRY(RegExp_ExecuteMatch, 0, 3) {
diff --git a/runtime/platform/utils.cc b/runtime/platform/utils.cc
index 3d1038a..4a02c56 100644
--- a/runtime/platform/utils.cc
+++ b/runtime/platform/utils.cc
@@ -359,27 +359,23 @@
void* Utils::ResolveSymbolInDynamicLibrary(void* library_handle,
const char* symbol,
char** error) {
- void* result = nullptr;
-
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_MACOS) || \
defined(DART_HOST_OS_ANDROID) || defined(DART_HOST_OS_FUCHSIA)
dlerror(); // Clear any errors.
- result = dlsym(library_handle, symbol);
+ void* result = dlsym(library_handle, symbol);
// Note: nullptr might be a valid return from dlsym. Must call dlerror
// to differentiate.
GetLastErrorAsString(error);
return result;
#elif defined(DART_HOST_OS_WINDOWS)
SetLastError(0);
- result = reinterpret_cast<void*>(
+ void* result = reinterpret_cast<void*>(
GetProcAddress(reinterpret_cast<HMODULE>(library_handle), symbol));
-#endif
-
if (result == nullptr) {
GetLastErrorAsString(error);
}
-
return result;
+#endif
}
void Utils::UnloadDynamicLibrary(void* library_handle, char** error) {
diff --git a/runtime/vm/app_snapshot.cc b/runtime/vm/app_snapshot.cc
index 754a79c..35420b2 100644
--- a/runtime/vm/app_snapshot.cc
+++ b/runtime/vm/app_snapshot.cc
@@ -3624,8 +3624,6 @@
is_canonical,
is_canonical && IsStringClassId(cid),
ImageWriter::TagObjectTypeAsReadOnly(zone, type)),
- zone_(zone),
- cid_(cid),
type_(type) {}
~RODataSerializationCluster() {}
@@ -3675,8 +3673,6 @@
}
private:
- Zone* zone_;
- const intptr_t cid_;
const char* const type_;
};
#endif // !DART_PRECOMPILED_RUNTIME && !DART_COMPRESSED_POINTERS
diff --git a/runtime/vm/code_descriptors.h b/runtime/vm/code_descriptors.h
index de4fe66..4f5c8b6 100644
--- a/runtime/vm/code_descriptors.h
+++ b/runtime/vm/code_descriptors.h
@@ -182,8 +182,8 @@
// Treat an instruction source without inlining id information as unset.
InstructionSource() : InstructionSource(TokenPosition::kNoSource) {}
explicit InstructionSource(TokenPosition pos) : InstructionSource(pos, -1) {}
- InstructionSource(TokenPosition pos, intptr_t id)
- : token_pos(pos), inlining_id(id) {}
+ InstructionSource(TokenPosition pos, intptr_t inlining_id)
+ : token_pos(pos), inlining_id(inlining_id) {}
const TokenPosition token_pos;
const intptr_t inlining_id;
diff --git a/runtime/vm/compiler/aot/aot_call_specializer.cc b/runtime/vm/compiler/aot/aot_call_specializer.cc
index 79bd4164..6f3f550 100644
--- a/runtime/vm/compiler/aot/aot_call_specializer.cc
+++ b/runtime/vm/compiler/aot/aot_call_specializer.cc
@@ -907,7 +907,7 @@
// the computed single_target.
ic_data = ICData::New(function, instr->function_name(),
args_desc_array, DeoptId::kNone,
- /* args_tested = */ 1, ICData::kOptimized);
+ /*num_args_tested=*/1, ICData::kOptimized);
for (intptr_t j = 0; j < i; j++) {
ic_data.AddReceiverCheck(class_ids[j], single_target);
}
@@ -928,7 +928,7 @@
const ICData& ic_data = ICData::Handle(
ICData::New(flow_graph()->function(), instr->function_name(),
args_desc_array, DeoptId::kNone,
- /* args_tested = */ 1, ICData::kOptimized));
+ /*num_args_tested=*/1, ICData::kOptimized));
cls = single_target.Owner();
ic_data.AddReceiverCheck(cls.id(), single_target);
instr->set_ic_data(&ic_data);
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.h b/runtime/vm/compiler/assembler/assembler_arm64.h
index 376c7f5..338eca0 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.h
+++ b/runtime/vm/compiler/assembler/assembler_arm64.h
@@ -1007,19 +1007,25 @@
EmitLoadStoreReg(STR, rt, a, sz);
}
- void ldp(Register rt, Register rt2, Address a, OperandSize sz = kEightBytes) {
- ASSERT((rt != CSP) && (rt != R31));
+ void ldp(Register low,
+ Register high,
+ Address a,
+ OperandSize sz = kEightBytes) {
+ ASSERT((low != CSP) && (low != R31));
ASSERT((a.type() == Address::PairOffset) ||
(a.type() == Address::PairPostIndex) ||
(a.type() == Address::PairPreIndex));
- EmitLoadStoreRegPair(LDP, rt, rt2, a, sz);
+ EmitLoadStoreRegPair(LDP, low, high, a, sz);
}
- void stp(Register rt, Register rt2, Address a, OperandSize sz = kEightBytes) {
- ASSERT((rt != CSP) && (rt != R31));
+ void stp(Register low,
+ Register high,
+ Address a,
+ OperandSize sz = kEightBytes) {
+ ASSERT((low != CSP) && (low != R31));
ASSERT((a.type() == Address::PairOffset) ||
(a.type() == Address::PairPostIndex) ||
(a.type() == Address::PairPreIndex));
- EmitLoadStoreRegPair(STP, rt, rt2, a, sz);
+ EmitLoadStoreRegPair(STP, low, high, a, sz);
}
void fldp(VRegister rt, VRegister rt2, Address a, OperandSize sz) {
ASSERT((a.type() == Address::PairOffset) ||
diff --git a/runtime/vm/compiler/assembler/assembler_x64.cc b/runtime/vm/compiler/assembler/assembler_x64.cc
index 343bfaf..b6b7ca7 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.cc
+++ b/runtime/vm/compiler/assembler/assembler_x64.cc
@@ -660,7 +660,7 @@
if (reg >= 4) {
// We need the Rex byte to give access to the SIL and DIL registers (the
// low bytes of RSI and RDI).
- EmitRegisterREX(reg, REX_NONE, /* force = */ true);
+ EmitRegisterREX(reg, REX_NONE, /*force_emit=*/true);
}
if (reg == RAX) {
EmitUint8(0xA8);
diff --git a/runtime/vm/compiler/assembler/disassembler_x86.cc b/runtime/vm/compiler/assembler/disassembler_x86.cc
index 3c6b147..7a9c9dc 100644
--- a/runtime/vm/compiler/assembler/disassembler_x86.cc
+++ b/runtime/vm/compiler/assembler/disassembler_x86.cc
@@ -515,8 +515,6 @@
break;
default:
UNREACHABLE();
- value = 0; // Initialize variables on all paths to satisfy the compiler.
- count = 0;
}
PrintImmediateValue(value, sign_extend, count);
return count;
@@ -1223,7 +1221,7 @@
(*data) += 1 + imm_bytes;
Print("mov%s %s,", operand_size_code(),
NameOfCPURegister(base_reg(current & 0x07)));
- PrintImmediateValue(addr, /* signed = */ false, imm_bytes);
+ PrintImmediateValue(addr, /*signed_value=*/false, imm_bytes);
break;
}
diff --git a/runtime/vm/compiler/backend/constant_propagator_test.cc b/runtime/vm/compiler/backend/constant_propagator_test.cc
index e9fd045..b74b296 100644
--- a/runtime/vm/compiler/backend/constant_propagator_test.cc
+++ b/runtime/vm/compiler/backend/constant_propagator_test.cc
@@ -262,25 +262,25 @@
return op;
};
- ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/1, /*lhs=*/2, make_int64_add,
+ ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/1, /*rhs=*/2, make_int64_add,
FoldingResult::FoldsTo(3));
- ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/kMaxInt64, /*lhs=*/1,
+ ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/kMaxInt64, /*rhs=*/1,
make_int64_add,
FoldingResult::FoldsTo(kMinInt64));
- ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/1, /*lhs=*/2, make_int32_add,
+ ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/1, /*rhs=*/2, make_int32_add,
FoldingResult::FoldsTo(3));
- ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/kMaxInt32 - 1, /*lhs=*/1,
+ ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/kMaxInt32 - 1, /*rhs=*/1,
make_int32_add,
FoldingResult::FoldsTo(kMaxInt32));
// Overflow of int32 representation and operation is not marked as
// truncating.
- ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/kMaxInt32, /*lhs=*/1,
+ ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/kMaxInt32, /*rhs=*/1,
make_int32_add, FoldingResult::NoFold());
// Overflow of int32 representation and operation is marked as truncating.
- ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/kMaxInt32, /*lhs=*/1,
+ ConstantPropagatorUnboxedOpTest(thread, /*lhs=*/kMaxInt32, /*rhs=*/1,
make_int32_truncating_add,
FoldingResult::FoldsTo(kMinInt32));
}
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.cc b/runtime/vm/compiler/backend/flow_graph_compiler.cc
index 12d3afc..6f2a5a4 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.cc
@@ -1991,7 +1991,7 @@
if (!LookupMethodFor(cid, selector, args_desc, &fn)) return nullptr;
CallTargets* targets = new (zone) CallTargets(zone);
- targets->Add(new (zone) TargetInfo(cid, cid, &fn, /* count = */ 1,
+ targets->Add(new (zone) TargetInfo(cid, cid, &fn, /*count_arg=*/1,
StaticTypeExactnessState::NotTracking()));
return targets;
diff --git a/runtime/vm/compiler/backend/il.cc b/runtime/vm/compiler/backend/il.cc
index 701dd07..a512412 100644
--- a/runtime/vm/compiler/backend/il.cc
+++ b/runtime/vm/compiler/backend/il.cc
@@ -4893,7 +4893,7 @@
? Location::RequiresRegister()
: Location::RequiresFpuRegister();
}
- return LocationSummary::Make(zone, /*num_inputs=*/0, output,
+ return LocationSummary::Make(zone, /*input_count=*/0, output,
LocationSummary::kNoCall);
}
@@ -7404,8 +7404,8 @@
is_leaf_ ? LocationSummary::kNativeLeafCall : LocationSummary::kCall;
LocationSummary* summary = new (zone) LocationSummary(
- zone, /*num_inputs=*/InputCount(),
- /*num_temps=*/Utils::CountOneBitsWord(temps), contains_call);
+ zone, InputCount(),
+ /*temp_count=*/Utils::CountOneBitsWord(temps), contains_call);
intptr_t reg_i = 0;
for (intptr_t reg = 0; reg < kNumberOfCpuRegisters; reg++) {
@@ -7473,7 +7473,7 @@
// Moves for arguments.
compiler::ffi::FrameRebase rebase(compiler->zone(), /*old_base=*/FPREG,
/*new_base=*/saved_fp,
- /*stack_delta=*/0);
+ /*stack_delta_in_bytes=*/0);
intptr_t def_index = 0;
for (intptr_t arg_index = 0; arg_index < marshaller_.num_args();
arg_index++) {
@@ -8090,8 +8090,8 @@
Zone* zone,
const RegList temps) const {
LocationSummary* summary =
- new (zone) LocationSummary(zone, /*num_inputs=*/InputCount(),
- /*num_temps=*/Utils::CountOneBitsWord(temps),
+ new (zone) LocationSummary(zone, InputCount(),
+ /*temp_count=*/Utils::CountOneBitsWord(temps),
LocationSummary::kNativeLeafCall);
intptr_t reg_i = 0;
@@ -8174,7 +8174,7 @@
ConstantTemporaryAllocator temp_alloc(temp0);
compiler::ffi::FrameRebase rebase(compiler->zone(), /*old_base=*/FPREG,
/*new_base=*/saved_fp,
- /*stack_delta=*/0);
+ /*stack_delta_in_bytes=*/0);
__ Comment("EmitParamMoves");
const auto& argument_locations =
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index 5bed00b..d48ed88 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -2116,7 +2116,7 @@
const bool can_be_constant =
index()->BindsToConstant() &&
compiler::Assembler::AddressCanHoldConstantIndex(
- index()->BoundConstant(), /*load=*/true, IsUntagged(), class_id(),
+ index()->BoundConstant(), /*is_load=*/true, IsUntagged(), class_id(),
index_scale(), &needs_base);
// We don't need to check if [needs_base] is true, since we use TMP as the
// temp register in this case and so don't need to allocate a temp register.
@@ -2289,7 +2289,7 @@
const bool can_be_constant =
index()->BindsToConstant() &&
compiler::Assembler::AddressCanHoldConstantIndex(
- index()->BoundConstant(), /*load=*/false, IsUntagged(), class_id(),
+ index()->BoundConstant(), /*is_load=*/false, IsUntagged(), class_id(),
index_scale(), &needs_base);
if (can_be_constant) {
if (!directly_addressable) {
@@ -6893,8 +6893,8 @@
LocationSummary* BitCastInstr::MakeLocationSummary(Zone* zone, bool opt) const {
LocationSummary* summary =
- new (zone) LocationSummary(zone, /*num_inputs=*/InputCount(),
- /*num_temps=*/0, LocationSummary::kNoCall);
+ new (zone) LocationSummary(zone, InputCount(),
+ /*temp_count=*/0, LocationSummary::kNoCall);
switch (from()) {
case kUnboxedInt32:
summary->set_in(0, Location::RequiresRegister());
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index 6f8088e..e90b911 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -5896,8 +5896,8 @@
LocationSummary* BitCastInstr::MakeLocationSummary(Zone* zone, bool opt) const {
LocationSummary* summary =
- new (zone) LocationSummary(zone, /*num_inputs=*/InputCount(),
- /*num_temps=*/0, LocationSummary::kNoCall);
+ new (zone) LocationSummary(zone, InputCount(),
+ /*temp_count=*/0, LocationSummary::kNoCall);
switch (from()) {
case kUnboxedInt32:
case kUnboxedInt64:
diff --git a/runtime/vm/compiler/backend/il_riscv.cc b/runtime/vm/compiler/backend/il_riscv.cc
index e51b9b1..4e22c0b 100644
--- a/runtime/vm/compiler/backend/il_riscv.cc
+++ b/runtime/vm/compiler/backend/il_riscv.cc
@@ -6643,8 +6643,8 @@
LocationSummary* BitCastInstr::MakeLocationSummary(Zone* zone, bool opt) const {
LocationSummary* summary =
- new (zone) LocationSummary(zone, /*num_inputs=*/InputCount(),
- /*num_temps=*/0, LocationSummary::kNoCall);
+ new (zone) LocationSummary(zone, InputCount(),
+ /*temp_count=*/0, LocationSummary::kNoCall);
switch (from()) {
case kUnboxedInt32:
summary->set_in(0, Location::RequiresRegister());
diff --git a/runtime/vm/compiler/backend/il_test.cc b/runtime/vm/compiler/backend/il_test.cc
index 6da20c7..3083bcd 100644
--- a/runtime/vm/compiler/backend/il_test.cc
+++ b/runtime/vm/compiler/backend/il_test.cc
@@ -1370,7 +1370,7 @@
// length_call <- InstanceCall('get:length', array, ICData[])
length_call = builder.AddDefinition(new InstanceCallInstr(
InstructionSource(), Symbols::GetLength(), Token::kGET,
- /*args=*/{new Value(array)}, 0, Array::empty_array(), 1,
+ /*arguments=*/{new Value(array)}, 0, Array::empty_array(), 1,
/*deopt_id=*/42));
length_call->EnsureICData(H.flow_graph());
// Return(load)
diff --git a/runtime/vm/compiler/backend/il_test_helper.cc b/runtime/vm/compiler/backend/il_test_helper.cc
index acfde5c..b285886 100644
--- a/runtime/vm/compiler/backend/il_test_helper.cc
+++ b/runtime/vm/compiler/backend/il_test_helper.cc
@@ -87,8 +87,7 @@
Dart_Handle result;
{
TransitionVMToNative transition(thread);
- result =
- Dart_Invoke(api_lib, NewString(name), /*argc=*/0, /*argv=*/nullptr);
+ result = Dart_Invoke(api_lib, NewString(name), 0, nullptr);
EXPECT_VALID(result);
}
return Api::UnwrapHandle(result);
diff --git a/runtime/vm/compiler/backend/inliner.cc b/runtime/vm/compiler/backend/inliner.cc
index e3a093a..d8315a8 100644
--- a/runtime/vm/compiler/backend/inliner.cc
+++ b/runtime/vm/compiler/backend/inliner.cc
@@ -1312,7 +1312,7 @@
kernel::FlowGraphBuilder builder(
parsed_function, ic_data_array, /*context_level_array=*/nullptr,
exit_collector,
- /*optimized=*/true, Compiler::kNoOSRDeoptId,
+ /*optimizing=*/true, Compiler::kNoOSRDeoptId,
caller_graph_->max_block_id() + 1,
entry_kind == Code::EntryKind::kUnchecked, &call_data->caller);
{
diff --git a/runtime/vm/compiler/call_specializer.cc b/runtime/vm/compiler/call_specializer.cc
index 67f21af..ff48b84 100644
--- a/runtime/vm/compiler/call_specializer.cc
+++ b/runtime/vm/compiler/call_specializer.cc
@@ -331,7 +331,7 @@
right_val = new (Z) Value(right_instr->char_code()->definition());
to_remove_right = right_instr;
} else {
- AddChecksForArgNr(call, right, /* arg_number = */ 1);
+ AddChecksForArgNr(call, right, /* argument_number = */ 1);
// String-to-char-code instructions returns -1 (illegal charcode) if
// string is not of length one.
StringToCharCodeInstr* char_code_right = new (Z)
@@ -427,8 +427,8 @@
// we can still emit the optimized Smi equality operation but need to add
// checks for null or Smi.
if (binary_feedback.OperandsAreSmiOrNull()) {
- AddChecksForArgNr(call, left, /* arg_number = */ 0);
- AddChecksForArgNr(call, right, /* arg_number = */ 1);
+ AddChecksForArgNr(call, left, /* argument_number = */ 0);
+ AddChecksForArgNr(call, right, /* argument_number = */ 1);
representation = kTagged;
} else {
@@ -442,7 +442,7 @@
StrictCompareInstr* comp = new (Z)
StrictCompareInstr(call->source(), Token::kEQ_STRICT,
new (Z) Value(left), new (Z) Value(right),
- /* number_check = */ false, DeoptId::kNone);
+ /*needs_number_check=*/false, DeoptId::kNone);
ReplaceCall(call, comp);
return true;
}
@@ -969,8 +969,8 @@
Definition* const left = call->ArgumentAt(0);
Definition* const right = call->ArgumentAt(1);
// Type check left and right.
- AddChecksForArgNr(call, left, /* arg_number = */ 0);
- AddChecksForArgNr(call, right, /* arg_number = */ 1);
+ AddChecksForArgNr(call, left, /* argument_number = */ 0);
+ AddChecksForArgNr(call, right, /* argument_number = */ 1);
// Replace call.
SimdOpInstr* op = SimdOpInstr::Create(
SimdOpInstr::KindForOperator(cid, op_kind), new (Z) Value(left),
@@ -1211,7 +1211,7 @@
type.IsNullType() ? Token::kEQ_STRICT : Token::kNE_STRICT,
left_value->CopyWithType(Z),
new (Z) Value(flow_graph()->constant_null()),
- /* number_check = */ false, DeoptId::kNone);
+ /*needs_number_check=*/false, DeoptId::kNone);
if (FLAG_trace_strong_mode_types) {
THR_Print("[Strong mode] replacing %s with %s (%s < %s)\n",
call->ToCString(), replacement->ToCString(),
diff --git a/runtime/vm/compiler/ffi/marshaller.cc b/runtime/vm/compiler/ffi/marshaller.cc
index dc854b7..4598b5d 100644
--- a/runtime/vm/compiler/ffi/marshaller.cc
+++ b/runtime/vm/compiler/ffi/marshaller.cc
@@ -824,7 +824,7 @@
FrameRebase rebase(
zone,
/*old_base=*/SPREG, /*new_base=*/SPREG,
- /*stack_delta=*/(argument_slots_required_ + stack_delta) *
+ /*stack_delta_in_bytes=*/(argument_slots_required_ + stack_delta) *
compiler::target::kWordSize);
return rebase.Rebase(arg);
}
diff --git a/runtime/vm/compiler/ffi/native_calling_convention_test.cc b/runtime/vm/compiler/ffi/native_calling_convention_test.cc
index 5be3304..ac5cd5f 100644
--- a/runtime/vm/compiler/ffi/native_calling_convention_test.cc
+++ b/runtime/vm/compiler/ffi/native_calling_convention_test.cc
@@ -541,7 +541,7 @@
member_types.Add(&int8_type);
member_types.Add(&int8_type);
const auto& struct_type =
- NativeStructType::FromNativeTypes(Z, member_types, /*packing=*/1);
+ NativeStructType::FromNativeTypes(Z, member_types, /*member_packing=*/1);
EXPECT_EQ(8, struct_type.SizeInBytes());
EXPECT(struct_type.ContainsUnalignedMembers());
@@ -580,7 +580,7 @@
member_types.Add(&int8_type);
member_types.Add(&double_type);
const auto& struct_type =
- NativeStructType::FromNativeTypes(Z, member_types, /*packing=*/1);
+ NativeStructType::FromNativeTypes(Z, member_types, /*member_packing=*/1);
EXPECT_EQ(9, struct_type.SizeInBytes());
EXPECT(struct_type.ContainsUnalignedMembers());
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index bfe9492..4f50707 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -352,7 +352,7 @@
ReadCanonicalNameReference();
instructions += BuildFieldInitializer(
Field::ZoneHandle(Z, initializer_fields[i]->ptr()),
- /*only_for_size_effects=*/false);
+ /*only_for_side_effects=*/false);
break;
}
case kAssertInitializer: {
@@ -371,7 +371,7 @@
intptr_t argument_count;
instructions += BuildArguments(
&argument_names, &argument_count,
- /* positional_parameter_count = */ nullptr); // read arguments.
+ /*positional_argument_count=*/nullptr); // read arguments.
argument_count += 1;
Class& parent_klass = GetSuperOrDie();
@@ -397,7 +397,7 @@
intptr_t argument_count;
instructions += BuildArguments(
&argument_names, &argument_count,
- /* positional_parameter_count = */ nullptr); // read arguments.
+ /*positional_argument_count=*/nullptr); // read arguments.
argument_count += 1;
const Function& target = Function::ZoneHandle(
@@ -876,7 +876,7 @@
prologue += type_args_handling;
prologue += explicit_type_checks;
extra_entry = B->BuildSharedUncheckedEntryPoint(
- /*shared_prologue_linked_in=*/prologue,
+ /*prologue_from_normal_entry=*/prologue,
/*skippable_checks=*/implicit_type_checks,
/*redefinitions_if_skipped=*/implicit_redefinitions,
/*body=*/body);
@@ -2385,7 +2385,7 @@
instructions +=
StaticCall(position, direct_call.target_, 2, Array::null_array(),
ICData::kNoRebind, /*result_type=*/nullptr,
- /*type_args_count=*/0,
+ /*type_args_len=*/0,
/*use_unchecked_entry=*/is_unchecked_call);
} else {
const intptr_t kTypeArgsLen = 0;
@@ -2397,7 +2397,7 @@
Function::null_function(),
/*result_type=*/nullptr,
/*use_unchecked_entry=*/is_unchecked_call, &call_site_attributes,
- /*receiver_not_smi=*/false, is_call_on_this);
+ /*receiver_is_not_smi=*/false, is_call_on_this);
}
instructions += Drop(); // Drop result of the setter invocation.
@@ -2452,7 +2452,7 @@
instructions +=
StaticCall(position, *direct_call_target, 2, Array::null_array(),
ICData::kNoRebind, /*result_type=*/nullptr,
- /*type_args_count=*/0,
+ /*type_args_len=*/0,
/*use_unchecked_entry=*/is_unchecked_call);
} else {
const intptr_t kTypeArgsLen = 0;
@@ -3328,7 +3328,7 @@
StaticCall(position, Function::ZoneHandle(Z, function.ptr()),
argument_count, argument_names, ICData::kSuper,
&result_type, type_args_len,
- /*use_unchecked_entry_point=*/true);
+ /*use_unchecked_entry=*/true);
}
}
@@ -6074,8 +6074,8 @@
if (at_index) {
code += BuildExpression(); // Argument 3: index
code += IntConstant(native_type->SizeInBytes());
- code += B->BinaryIntegerOp(Token::kMUL, kTagged, /* truncate= */ true);
- code += B->BinaryIntegerOp(Token::kADD, kTagged, /* truncate= */ true);
+ code += B->BinaryIntegerOp(Token::kMUL, kTagged, /*is_truncating=*/true);
+ code += B->BinaryIntegerOp(Token::kADD, kTagged, /*is_truncating=*/true);
}
if (is_store) {
code += BuildExpression(); // Argument 4: value
diff --git a/runtime/vm/compiler/frontend/kernel_to_il.cc b/runtime/vm/compiler/frontend/kernel_to_il.cc
index e29d16c..811f8e9 100644
--- a/runtime/vm/compiler/frontend/kernel_to_il.cc
+++ b/runtime/vm/compiler/frontend/kernel_to_il.cc
@@ -1986,7 +1986,7 @@
// and thus already checked (e.g., the implementation of the
// UnmodifiableXListView constructors).
- body += AllocateObject(token_pos, view_class, /*arg_count=*/0);
+ body += AllocateObject(token_pos, view_class, /*argument_count=*/0);
LocalVariable* view_object = MakeTemporary();
body += LoadLocal(view_object);
@@ -3808,7 +3808,7 @@
body += IntConstant(function.NumParameters());
}
body += LoadLocal(argument_count_var);
- body += SmiBinaryOp(Token::kADD, /* truncate= */ true);
+ body += SmiBinaryOp(Token::kADD, /*is_truncating=*/true);
LocalVariable* argument_count = MakeTemporary();
// We are generating code like the following:
@@ -3871,7 +3871,7 @@
loop_body += LoadLocal(index);
loop_body += LoadLocal(argument_count);
loop_body += LoadLocal(index);
- loop_body += SmiBinaryOp(Token::kSUB, /*truncate=*/true);
+ loop_body += SmiBinaryOp(Token::kSUB, /*is_truncating=*/true);
loop_body +=
LoadFpRelativeSlot(compiler::target::kWordSize *
compiler::target::frame_layout.param_end_from_fp,
@@ -3881,7 +3881,7 @@
// ++i
loop_body += LoadLocal(index);
loop_body += IntConstant(1);
- loop_body += SmiBinaryOp(Token::kADD, /*truncate=*/true);
+ loop_body += SmiBinaryOp(Token::kADD, /*is_truncating=*/true);
loop_body += StoreLocal(TokenPosition::kNoSource, index);
loop_body += Drop();
@@ -5312,7 +5312,7 @@
CachableIdempotentCall(TokenPosition::kNoSource, kUntagged, ffi_resolver,
/*argument_count=*/3,
/*argument_names=*/Array::null_array(),
- /*type_args_count=*/0);
+ /*type_args_len=*/0);
return body;
#else // !defined(TARGET_ARCH_IA32)
// IA32 only has JIT and no pool. This function will only be compiled if
diff --git a/runtime/vm/compiler/frontend/prologue_builder.cc b/runtime/vm/compiler/frontend/prologue_builder.cc
index 4952356..e8b88be 100644
--- a/runtime/vm/compiler/frontend/prologue_builder.cc
+++ b/runtime/vm/compiler/frontend/prologue_builder.cc
@@ -127,7 +127,7 @@
copy_args_prologue += LoadLocal(count_var);
copy_args_prologue += IntConstant(min_num_pos_args);
- copy_args_prologue += SmiBinaryOp(Token::kSUB, /* truncate= */ true);
+ copy_args_prologue += SmiBinaryOp(Token::kSUB, /*is_truncating=*/true);
optional_count_var = MakeTemporary();
}
@@ -219,7 +219,7 @@
compiler::target::ArgumentsDescriptor::named_entry_size() /
compiler::target::kCompressedWordSize);
copy_args_prologue += LoadLocal(optional_count_vars_processed);
- copy_args_prologue += SmiBinaryOp(Token::kMUL, /* truncate= */ true);
+ copy_args_prologue += SmiBinaryOp(Token::kMUL, /*is_truncating=*/true);
LocalVariable* tuple_diff = MakeTemporary();
// Let's load position from arg descriptor (to see which parameter is the
@@ -239,11 +239,11 @@
compiler::target::ArgumentsDescriptor::position_offset()) /
compiler::target::kCompressedWordSize);
good += LoadLocal(tuple_diff);
- good += SmiBinaryOp(Token::kADD, /* truncate= */ true);
+ good += SmiBinaryOp(Token::kADD, /*is_truncating=*/true);
good += LoadIndexed(
kArrayCid, /*index_scale*/ compiler::target::kCompressedWordSize);
}
- good += SmiBinaryOp(Token::kSUB, /* truncate= */ true);
+ good += SmiBinaryOp(Token::kSUB, /*is_truncating=*/true);
good += LoadFpRelativeSlot(
compiler::target::kWordSize *
compiler::target::frame_layout.param_end_from_fp,
@@ -257,7 +257,7 @@
// Increase processed optional variable count.
good += LoadLocal(optional_count_vars_processed);
good += IntConstant(1);
- good += SmiBinaryOp(Token::kADD, /* truncate= */ true);
+ good += SmiBinaryOp(Token::kADD, /*is_truncating=*/true);
good += StoreLocalRaw(TokenPosition::kNoSource,
optional_count_vars_processed);
good += Drop();
@@ -275,7 +275,7 @@
compiler::target::ArgumentsDescriptor::name_offset()) /
compiler::target::kCompressedWordSize);
copy_args_prologue += LoadLocal(tuple_diff);
- copy_args_prologue += SmiBinaryOp(Token::kADD, /* truncate= */ true);
+ copy_args_prologue += SmiBinaryOp(Token::kADD, /*is_truncating=*/true);
copy_args_prologue += LoadIndexed(
kArrayCid, /*index_scale*/ compiler::target::kCompressedWordSize);
diff --git a/runtime/vm/compiler/frontend/scope_builder.cc b/runtime/vm/compiler/frontend/scope_builder.cc
index 188cbdb..e7ee046 100644
--- a/runtime/vm/compiler/frontend/scope_builder.cc
+++ b/runtime/vm/compiler/frontend/scope_builder.cc
@@ -310,8 +310,8 @@
Symbols::Value(),
AbstractType::ZoneHandle(Z, function.ParameterTypeAt(pos)),
LocalVariable::kNoKernelOffset, /*is_late=*/false,
- /*inferred_type=*/nullptr,
- /*inferred_arg_type=*/field.is_covariant()
+ /*inferred_type_md=*/nullptr,
+ /*inferred_arg_type_md=*/field.is_covariant()
? nullptr
: &inferred_field_type);
} else {
diff --git a/runtime/vm/compiler/relocation_test.cc b/runtime/vm/compiler/relocation_test.cc
index 3515c5e..600202c 100644
--- a/runtime/vm/compiler/relocation_test.cc
+++ b/runtime/vm/compiler/relocation_test.cc
@@ -60,7 +60,7 @@
CodePtr AllocationInstruction(uintptr_t size) {
const auto& instructions = Instructions::Handle(Instructions::New(
- size, /*has_monomorphic=*/false, /*should_be_aligned=*/false));
+ size, /*has_monomorphic_entry=*/false, /*should_be_aligned=*/false));
uword addr = instructions.PayloadStart();
for (uintptr_t i = 0; i < (size / 4); ++i) {
@@ -223,7 +223,7 @@
}
auto& instructions = Instructions::Handle(Instructions::New(
- size, /*has_monomorphic=*/false, /*should_be_aligned=*/false));
+ size, /*has_monomorphic_entry=*/false, /*should_be_aligned=*/false));
{
uword addr = instructions.PayloadStart();
for (intptr_t i = 0; i < commands->length(); ++i) {
diff --git a/runtime/vm/compiler/stub_code_compiler.cc b/runtime/vm/compiler/stub_code_compiler.cc
index dfe9ca4a..5a79702 100644
--- a/runtime/vm/compiler/stub_code_compiler.cc
+++ b/runtime/vm/compiler/stub_code_compiler.cc
@@ -165,7 +165,7 @@
}
void StubCodeCompiler::GenerateInitLateFinalStaticFieldStub() {
- GenerateInitLateStaticFieldStub(/*is_final=*/true, /*shared=*/false);
+ GenerateInitLateStaticFieldStub(/*is_final=*/true, /*is_shared=*/false);
}
void StubCodeCompiler::GenerateInitSharedLateStaticFieldStub() {
@@ -173,7 +173,7 @@
}
void StubCodeCompiler::GenerateInitSharedLateFinalStaticFieldStub() {
- GenerateInitLateStaticFieldStub(/*is_final=*/true, /*shared=*/true);
+ GenerateInitLateStaticFieldStub(/*is_final=*/true, /*is_shared=*/true);
}
void StubCodeCompiler::GenerateInitInstanceFieldStub() {
@@ -1365,7 +1365,7 @@
__ Comment("Inline allocation of GrowableList");
__ TryAllocateObject(kGrowableObjectArrayCid, instance_size, &slow_case,
Assembler::kNearJump, AllocateObjectABI::kResultReg,
- /*temp_reg=*/AllocateObjectABI::kTagsReg);
+ /*temp=*/AllocateObjectABI::kTagsReg);
__ StoreIntoObjectNoBarrier(
AllocateObjectABI::kResultReg,
FieldAddress(AllocateObjectABI::kResultReg,
@@ -2731,7 +2731,7 @@
pc_descriptors_list_->AddDescriptor(
UntaggedPcDescriptors::kBSSRelocation, pc_offset,
/*deopt_id=*/DeoptId::kNone,
- /*root_pos=*/TokenPosition::kNoSource,
+ /*token_pos=*/TokenPosition::kNoSource,
/*try_index=*/-1,
/*yield_index=*/UntaggedPcDescriptors::kInvalidYieldIndex);
}
diff --git a/runtime/vm/compiler/stub_code_compiler_arm.cc b/runtime/vm/compiler/stub_code_compiler_arm.cc
index 1f26324..749be9c 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm.cc
@@ -3361,7 +3361,7 @@
__ b(&miss, EQ);
const intptr_t entry_length =
- target::ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) *
+ target::ICData::TestEntryLengthFor(1, /*exactness_check=*/false) *
target::kWordSize;
__ AddImmediate(R8, entry_length); // Next entry.
__ b(&loop);
diff --git a/runtime/vm/compiler/stub_code_compiler_arm64.cc b/runtime/vm/compiler/stub_code_compiler_arm64.cc
index 4cac18c..1ee528d 100644
--- a/runtime/vm/compiler/stub_code_compiler_arm64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_arm64.cc
@@ -2738,7 +2738,7 @@
if (optimized == kOptimized) {
GenerateOptimizedUsageCounterIncrement();
} else {
- GenerateUsageCounterIncrement(/*scratch=*/R6);
+ GenerateUsageCounterIncrement(/*temp_reg=*/R6);
}
ASSERT(num_args == 1 || num_args == 2);
@@ -3777,7 +3777,7 @@
__ b(&miss, EQ);
const intptr_t entry_length =
- target::ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) *
+ target::ICData::TestEntryLengthFor(1, /*exactness_check=*/false) *
target::kCompressedWordSize;
__ AddImmediate(R8, entry_length); // Next entry.
__ b(&loop);
diff --git a/runtime/vm/compiler/stub_code_compiler_riscv.cc b/runtime/vm/compiler/stub_code_compiler_riscv.cc
index 21ef47f..b8cbed3 100644
--- a/runtime/vm/compiler/stub_code_compiler_riscv.cc
+++ b/runtime/vm/compiler/stub_code_compiler_riscv.cc
@@ -2334,7 +2334,7 @@
if (optimized == kOptimized) {
GenerateOptimizedUsageCounterIncrement();
} else {
- GenerateUsageCounterIncrement(/*scratch=*/T0);
+ GenerateUsageCounterIncrement(/*temp_reg=*/T0);
}
ASSERT(num_args == 1 || num_args == 2);
@@ -3280,7 +3280,7 @@
__ BranchIf(EQ, &miss);
const intptr_t entry_length =
- target::ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) *
+ target::ICData::TestEntryLengthFor(1, /*exactness_check=*/false) *
target::kCompressedWordSize;
__ AddImmediate(T1, entry_length); // Next entry.
__ j(&loop);
diff --git a/runtime/vm/compiler/stub_code_compiler_x64.cc b/runtime/vm/compiler/stub_code_compiler_x64.cc
index 631c5fe..e80ee33 100644
--- a/runtime/vm/compiler/stub_code_compiler_x64.cc
+++ b/runtime/vm/compiler/stub_code_compiler_x64.cc
@@ -87,7 +87,7 @@
// Save & Restore the volatile CPU registers across the setjmp() call.
const RegisterSet volatile_registers(
CallingConventions::kVolatileCpuRegisters & ~(1 << RAX),
- /*fpu_registers=*/0);
+ /*fpu_register_mask=*/0);
const Register kSavedRspReg = R12;
COMPILE_ASSERT(IsCalleeSavedRegister(kSavedRspReg));
@@ -3673,7 +3673,7 @@
__ j(ZERO, &miss, Assembler::kNearJump);
const intptr_t entry_length =
- target::ICData::TestEntryLengthFor(1, /*tracking_exactness=*/false) *
+ target::ICData::TestEntryLengthFor(1, /*exactness_check=*/false) *
target::kCompressedWordSize;
__ addq(R13, Immediate(entry_length)); // Next entry.
__ jmp(&loop);
diff --git a/runtime/vm/compiler/write_barrier_elimination.cc b/runtime/vm/compiler/write_barrier_elimination.cc
index dba363e..e9e790b 100644
--- a/runtime/vm/compiler/write_barrier_elimination.cc
+++ b/runtime/vm/compiler/write_barrier_elimination.cc
@@ -248,8 +248,7 @@
if (auto phi_use = it.Current()->instruction()->AsPhi()) {
const intptr_t index = Index(phi_use);
if (!large_array_allocations.Get(index)) {
- large_array_allocations.Set(index,
- /*can_be_create_large_array=*/true);
+ large_array_allocations.Set(index, true); // Can be large array.
create_array_worklist.Add(phi_use);
}
}
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index da748c1..d01a96c 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -3404,9 +3404,7 @@
saved_exception = &Instance::Handle(raw_exception);
}
Exceptions::Throw(thread, *saved_exception);
- const String& message =
- String::Handle(String::New("Exception was not thrown, internal error"));
- return ApiError::New(message);
+ UNREACHABLE();
}
// TODO(sgjesse): value should always be smaller then 0xff. Add error handling.
diff --git a/runtime/vm/elf.cc b/runtime/vm/elf.cc
index f7493d2..68735cf 100644
--- a/runtime/vm/elf.cc
+++ b/runtime/vm/elf.cc
@@ -91,10 +91,10 @@
bool allocate,
bool executable,
bool writable,
- intptr_t align = compiler::target::kWordSize)
+ intptr_t alignment = compiler::target::kWordSize)
: type(t),
flags(EncodeFlags(allocate, executable, writable)),
- alignment(align),
+ alignment(alignment),
// Non-segments will never have a memory offset, here represented by 0.
memory_offset_(allocate ? kLinearInitValue : 0) {
// Only SHT_NULL sections (namely, the reserved section) are allowed to have
@@ -1290,7 +1290,7 @@
Dwarf::WriteCallFrameInformationRecords(&dwarf_stream, fdes);
auto* const eh_frame = new (zone_)
- BitsContainer(type_, /*writable=*/false, /*executable=*/false);
+ BitsContainer(type_, /*executable=*/false, /*writable=*/false);
eh_frame->AddPortion(dwarf_stream.buffer(), dwarf_stream.bytes_written(),
dwarf_stream.relocations());
section_table_->Add(eh_frame, ".eh_frame");
diff --git a/runtime/vm/ffi_callback_metadata.cc b/runtime/vm/ffi_callback_metadata.cc
index be01060..9fd7ec1 100644
--- a/runtime/vm/ffi_callback_metadata.cc
+++ b/runtime/vm/ffi_callback_metadata.cc
@@ -358,7 +358,7 @@
Dart_Port send_port,
MetadataEntry** list_head) {
ASSERT(send_function.GetFfiCallbackKind() == FfiCallbackKind::kAsyncCallback);
- return CreateMetadataEntry(isolate, /*isolate_group=*/nullptr,
+ return CreateMetadataEntry(isolate, /*target_isolate_group=*/nullptr,
TrampolineType::kAsync,
GetEntryPoint(zone, send_function),
static_cast<uint64_t>(send_port), list_head);
diff --git a/runtime/vm/heap/freelist_test.cc b/runtime/vm/heap/freelist_test.cc
index 4a038f7..9fe8ecd 100644
--- a/runtime/vm/heap/freelist_test.cc
+++ b/runtime/vm/heap/freelist_test.cc
@@ -222,7 +222,7 @@
free_list->Free(blob->start(), alloc_size + remainder_size);
blob->Protect(VirtualMemory::kReadExecute); // not writable
- Allocate(free_list.get(), alloc_size, /*protected=*/true);
+ Allocate(free_list.get(), alloc_size, /*is_protected=*/true);
VirtualMemory::Protect(blob->address(), alloc_size,
VirtualMemory::kReadExecute);
reinterpret_cast<void (*)()>(other_code)();
diff --git a/runtime/vm/heap/safepoint.cc b/runtime/vm/heap/safepoint.cc
index 2b25c7b..97e5628 100644
--- a/runtime/vm/heap/safepoint.cc
+++ b/runtime/vm/heap/safepoint.cc
@@ -126,7 +126,7 @@
for (auto main_port : oob_isolates) {
Isolate::SendInternalLibMessage(main_port, Isolate::kCheckForReload,
- /*ignored=*/-1);
+ /*capability=*/-1);
}
// Now wait for all threads that are not already at a safepoint to check-in.
diff --git a/runtime/vm/isolate_reload.cc b/runtime/vm/isolate_reload.cc
index 193aa80..b639d6d 100644
--- a/runtime/vm/isolate_reload.cc
+++ b/runtime/vm/isolate_reload.cc
@@ -1177,7 +1177,7 @@
retval = KernelIsolate::CompileToKernel(
root_lib_url, nullptr, 0, modified_scripts_count, modified_scripts,
/*incremental_compile=*/true,
- /*snapshot_compile=*/false,
+ /*for_snapshot=*/false,
/*embed_sources=*/true,
/*package_config=*/nullptr,
/*multiroot_filepaths=*/nullptr,
diff --git a/runtime/vm/mach_o.cc b/runtime/vm/mach_o.cc
index 5c1b092..027cdc3 100644
--- a/runtime/vm/mach_o.cc
+++ b/runtime/vm/mach_o.cc
@@ -2556,12 +2556,15 @@
intptr_t offset, intptr_t size, bool is_global) {
switch (type) {
case Type::Function: {
- AddSymbol("", mach_o::N_BNSYM, section_index, /*desc=*/0, offset);
- AddSymbol(name, mach_o::N_FUN, section_index, /*desc=*/0, offset);
+ AddSymbol("", mach_o::N_BNSYM, section_index, /*description=*/0,
+ offset);
+ AddSymbol(name, mach_o::N_FUN, section_index, /*description=*/0,
+ offset);
// The size is output as an unnamed N_FUN symbol with no section
// following the actual N_FUN symbol.
- AddSymbol("", mach_o::N_FUN, mach_o::NO_SECT, /*desc=*/0, size);
- AddSymbol("", mach_o::N_ENSYM, section_index, /*desc=*/0,
+ AddSymbol("", mach_o::N_FUN, mach_o::NO_SECT, /*description=*/0,
+ size);
+ AddSymbol("", mach_o::N_ENSYM, section_index, /*description=*/0,
offset + size);
break;
@@ -2569,11 +2572,12 @@
case Type::Section:
case Type::Object: {
if (is_global) {
- AddSymbol(name, mach_o::N_GSYM, mach_o::NO_SECT, /*desc=*/0,
+ AddSymbol(name, mach_o::N_GSYM, mach_o::NO_SECT,
+ /*description=*/0,
/*value=*/0);
} else {
AddSymbol(name, mach_o::N_STSYM, section_index,
- /*desc=*/0, offset);
+ /*description=*/0, offset);
}
break;
}
diff --git a/runtime/vm/message_handler.cc b/runtime/vm/message_handler.cc
index 9be103c..b42df9b 100644
--- a/runtime/vm/message_handler.cc
+++ b/runtime/vm/message_handler.cc
@@ -459,7 +459,7 @@
PausedOnExitLocked(&ml, true);
// More messages may have come in while we released the monitor.
status = HandleMessages(&ml, /*allow_normal_messages=*/false,
- /*allow_multiple_normal_messagesfalse=*/false);
+ /*allow_multiple_normal_messages=*/false);
if (ShouldPauseOnExit(status)) {
// Still paused.
ASSERT(oob_queue_->IsEmpty());
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index ece07b0..8706b74 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -2655,7 +2655,7 @@
isolate_group);
cls = Class::New<Instance, RTN::Instance>(kByteBufferCid, isolate_group,
- /*register_isolate_group=*/false);
+ /*register_class=*/false);
cls.set_instance_size_in_words(0, 0);
isolate_group->class_table()->Register(cls);
@@ -11890,10 +11890,7 @@
}
bool Function::CheckSourceFingerprint(int32_t fp, const char* kind) const {
-#if !defined(DEBUG)
- return true; // Only check on debug.
-#endif
-
+#if defined(DEBUG)
#if !defined(DART_PRECOMPILED_RUNTIME)
// Check that the function is marked as recognized via the vm:recognized
// pragma. This is so that optimizations that change the signature will know
@@ -11922,6 +11919,7 @@
THR_Print("s/0x%08x/0x%08x/\n", fp, SourceFingerprint());
return false;
}
+#endif // defined(DEBUG)
return true;
}
diff --git a/runtime/vm/object_test.cc b/runtime/vm/object_test.cc
index a01b831..97b5ee6 100644
--- a/runtime/vm/object_test.cc
+++ b/runtime/vm/object_test.cc
@@ -5680,10 +5680,11 @@
Dart_Isolate parent = Dart_CurrentIsolate();
Dart_ExitIsolate();
char* error = nullptr;
- Dart_Isolate child = Dart_CreateIsolateInGroup(parent, "child",
- /*shutdown_callback=*/nullptr,
- /*cleanup_callback=*/nullptr,
- /*peer=*/nullptr, &error);
+ Dart_Isolate child =
+ Dart_CreateIsolateInGroup(parent, "child",
+ /*shutdown_callback=*/nullptr,
+ /*cleanup_callback=*/nullptr,
+ /*child_isolate_data=*/nullptr, &error);
EXPECT_NE(nullptr, child);
EXPECT_EQ(nullptr, error);
Dart_ExitIsolate();
@@ -5796,10 +5797,11 @@
Dart_Isolate parent = Dart_CurrentIsolate();
Dart_ExitIsolate();
char* error = nullptr;
- Dart_Isolate child = Dart_CreateIsolateInGroup(parent, "child",
- /*shutdown_callback=*/nullptr,
- /*cleanup_callback=*/nullptr,
- /*peer=*/nullptr, &error);
+ Dart_Isolate child =
+ Dart_CreateIsolateInGroup(parent, "child",
+ /*shutdown_callback=*/nullptr,
+ /*cleanup_callback=*/nullptr,
+ /*child_isolate_data=*/nullptr, &error);
EXPECT_NE(nullptr, child);
EXPECT_EQ(nullptr, error);
Dart_ExitIsolate();
diff --git a/runtime/vm/regexp/regexp.cc b/runtime/vm/regexp/regexp.cc
index 501924b..fcc9798 100644
--- a/runtime/vm/regexp/regexp.cc
+++ b/runtime/vm/regexp/regexp.cc
@@ -4464,7 +4464,7 @@
RegExpCharacterClass* newline_atom =
new RegExpCharacterClass('n', RegExpFlags());
TextNode* newline_matcher =
- new TextNode(newline_atom, /*read_backwards=*/false,
+ new TextNode(newline_atom, /*read_backward=*/false,
ActionNode::PositiveSubmatchSuccess(
stack_pointer_register, position_register,
0, // No captures inside.
@@ -5350,7 +5350,7 @@
first_step_node->AddAlternative(GuardedAlternative(captured_body));
first_step_node->AddAlternative(GuardedAlternative(new (zone) TextNode(
new (zone) RegExpCharacterClass('*', RegExpFlags()),
- /*read_backwards=*/false, loop_node)));
+ /*read_backward=*/false, loop_node)));
node = first_step_node;
} else {
node = loop_node;
@@ -5460,7 +5460,7 @@
first_step_node->AddAlternative(GuardedAlternative(captured_body));
first_step_node->AddAlternative(GuardedAlternative(new (zone) TextNode(
new (zone) RegExpCharacterClass('*', RegExpFlags()),
- /*read_backwards=*/false, loop_node)));
+ /*read_backward=*/false, loop_node)));
node = first_step_node;
} else {
node = loop_node;
diff --git a/runtime/vm/service.cc b/runtime/vm/service.cc
index 36a1217..85bdaed 100644
--- a/runtime/vm/service.cc
+++ b/runtime/vm/service.cc
@@ -1653,7 +1653,7 @@
IsolateGroup::RunWithIsolateGroup(
isolate_group_id,
[&visitor](IsolateGroup* isolate_group) { visitor(isolate_group); },
- /*if_not_found=*/[&js]() { PrintSentinel(js, kExpiredSentinel); });
+ /*not_found=*/[&js]() { PrintSentinel(js, kExpiredSentinel); });
}
static void GetIsolateGroup(Thread* thread, JSONStream* js) {
diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
index 5258c7d..4201052 100644
--- a/runtime/vm/thread.cc
+++ b/runtime/vm/thread.cc
@@ -1682,7 +1682,8 @@
if (isolate != nullptr &&
Thread::IsSafepointLevelRequested(
state, SafepointLevel::kGCAndDeoptAndReload)) {
- isolate->SendInternalLibMessage(Isolate::kCheckForReload, /*ignored=*/-1);
+ isolate->SendInternalLibMessage(Isolate::kCheckForReload,
+ /*capability=*/-1);
}
}
#endif // !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
diff --git a/runtime/vm/type_testing_stubs.cc b/runtime/vm/type_testing_stubs.cc
index 93d44fa..e5ffc16 100644
--- a/runtime/vm/type_testing_stubs.cc
+++ b/runtime/vm/type_testing_stubs.cc
@@ -487,7 +487,7 @@
return CheckType::kCidCheckOnly;
}
if (to_check.FindInstantiationOf(zone, type_class,
- /*only_super_classes=*/true)) {
+ /*consider_only_super_classes=*/true)) {
// No need to check for type argument consistency, as [to_check] is the same
// as or a subclass of [type_class].
return to_check.is_finalized()
@@ -659,7 +659,7 @@
// c) Then we'll check each value of the type argument.
compiler::Label pop_saved_registers_on_failure;
const RegisterSet saved_registers(
- TTSInternalRegs::kSavedTypeArgumentRegisters, /*fpu_registers=*/0);
+ TTSInternalRegs::kSavedTypeArgumentRegisters, /*fpu_register_mask=*/0);
__ PushRegisters(saved_registers);
AbstractType& type_arg = AbstractType::Handle();