From 3887c468d731420e929e6ad3acf190d5431e94fc Mon Sep 17 00:00:00 2001 From: Roland Levillain Date: Wed, 12 Aug 2015 18:15:42 +0100 Subject: [PATCH] Remove unnecessary `explicit` qualifiers on constructors. Change-Id: Id12e392ad50f66a6e2251a68662b7959315dc567 --- cmdline/cmdline_parse_result.h | 2 +- cmdline/cmdline_parser.h | 9 ++-- cmdline/detail/cmdline_parse_argument_detail.h | 6 +-- cmdline/token_range.h | 2 +- compiler/compiler.h | 2 +- compiler/dex/compiler_ir.h | 2 +- compiler/dex/mir_field_info.h | 4 +- compiler/dex/mir_graph.h | 4 +- compiler/dex/pass_driver_me.h | 3 +- compiler/dex/pass_driver_me_opts.h | 6 +-- compiler/dex/pass_driver_me_post_opt.h | 2 +- .../dex/quick/lazy_debug_frame_opcode_writer.h | 11 ++-- compiler/driver/compiler_driver.h | 26 +++++----- compiler/jni/quick/arm/calling_convention_arm.h | 2 +- .../jni/quick/arm64/calling_convention_arm64.h | 2 +- compiler/jni/quick/calling_convention.h | 4 +- compiler/jni/quick/mips/calling_convention_mips.h | 2 +- .../jni/quick/mips64/calling_convention_mips64.h | 2 +- compiler/jni/quick/x86/calling_convention_x86.h | 5 +- .../jni/quick/x86_64/calling_convention_x86_64.h | 5 +- compiler/oat_writer.h | 10 ++-- compiler/optimizing/code_generator_arm64.cc | 3 +- compiler/optimizing/code_generator_arm64.h | 2 +- compiler/optimizing/code_generator_mips64.cc | 3 +- compiler/optimizing/code_generator_x86.cc | 2 +- compiler/optimizing/code_generator_x86_64.cc | 4 +- compiler/optimizing/intrinsics_arm.h | 3 +- compiler/optimizing/nodes.h | 6 +-- compiler/utils/arm/assembler_arm.h | 2 +- compiler/utils/arm64/assembler_arm64.h | 2 +- compiler/utils/dedupe_set.h | 2 +- compiler/utils/dex_cache_arrays_layout.h | 2 +- compiler/utils/managed_register.h | 2 +- compiler/utils/mips/assembler_mips.h | 2 +- compiler/utils/mips64/assembler_mips64.h | 2 +- compiler/utils/x86/assembler_x86.h | 2 +- disassembler/disassembler_arm.cc | 5 +- disassembler/disassembler_mips.h | 9 ++-- oatdump/oatdump.cc | 10 ++-- .../arch/arm64/instruction_set_features_arm64.h | 4 +- runtime/base/arena_allocator.h | 2 +- runtime/base/arena_containers.h | 2 +- runtime/base/mutex.h | 8 +-- runtime/base/timing_logger.h | 4 +- runtime/base/unix_file/fd_file.h | 4 +- runtime/check_jni.cc | 2 +- runtime/debugger.cc | 8 +-- runtime/gc/accounting/mod_union_table.cc | 29 +++++------ runtime/gc/collector/concurrent_copying.cc | 6 +-- runtime/gc/collector/mark_sweep.cc | 8 +-- runtime/gc/collector/mark_sweep.h | 2 +- runtime/gc/collector/partial_mark_sweep.h | 2 +- runtime/gc/collector/sticky_mark_sweep.h | 2 +- runtime/gc/heap.cc | 10 ++-- runtime/gc/heap.h | 60 +++++++++++----------- runtime/gc/space/memory_tool_malloc_space.h | 2 +- runtime/gc/task_processor_test.cc | 2 +- runtime/handle_scope.h | 2 +- runtime/indirect_reference_table.h | 3 +- runtime/jit/jit_instrumentation.cc | 2 +- runtime/lock_word.h | 2 +- runtime/mirror/class.cc | 6 +-- runtime/mirror/object.cc | 2 +- runtime/monitor.h | 8 +-- runtime/monitor_test.cc | 3 +- runtime/reflection.cc | 2 +- runtime/thread.cc | 2 +- runtime/thread_pool.h | 2 +- 68 files changed, 176 insertions(+), 189 deletions(-) diff --git a/cmdline/cmdline_parse_result.h b/cmdline/cmdline_parse_result.h index 717642f18..982f17866 100644 --- a/cmdline/cmdline_parse_result.h +++ b/cmdline/cmdline_parse_result.h @@ -126,7 +126,7 @@ struct CmdlineParseResult : CmdlineResult { : CmdlineResult(kSuccess), value_(value), has_value_(true) {} explicit CmdlineParseResult(T&& value) : CmdlineResult(kSuccess), value_(std::forward(value)), has_value_(true) {} - explicit CmdlineParseResult() + CmdlineParseResult() : CmdlineResult(kSuccess), value_(), has_value_(false) {} T value_; diff --git a/cmdline/cmdline_parser.h b/cmdline/cmdline_parser.h index cebba65ac..cfc096728 100644 --- a/cmdline/cmdline_parser.h +++ b/cmdline/cmdline_parser.h @@ -497,11 +497,10 @@ struct CmdlineParser { friend struct Builder; // Construct a new parser from the builder. Move all the arguments. - explicit CmdlineParser(bool ignore_unrecognized, - std::vector&& ignore_list, - std::shared_ptr save_destination, - std::vector>&& - completed_arguments) + CmdlineParser(bool ignore_unrecognized, + std::vector&& ignore_list, + std::shared_ptr save_destination, + std::vector>&& completed_arguments) : ignore_unrecognized_(ignore_unrecognized), ignore_list_(std::move(ignore_list)), save_destination_(save_destination), diff --git a/cmdline/detail/cmdline_parse_argument_detail.h b/cmdline/detail/cmdline_parse_argument_detail.h index 81ef36b08..3009b3216 100644 --- a/cmdline/detail/cmdline_parse_argument_detail.h +++ b/cmdline/detail/cmdline_parse_argument_detail.h @@ -300,9 +300,9 @@ namespace art { // be able to parse arguments. template struct CmdlineParseArgument : CmdlineParseArgumentAny { - explicit CmdlineParseArgument(CmdlineParserArgumentInfo&& argument_info, - std::function&& save_argument, - std::function&& load_argument) + CmdlineParseArgument(CmdlineParserArgumentInfo&& argument_info, + std::function&& save_argument, + std::function&& load_argument) : argument_info_(std::forward(argument_info)), save_argument_(std::forward(save_argument)), load_argument_(std::forward(load_argument)) { diff --git a/cmdline/token_range.h b/cmdline/token_range.h index 5b54384e4..335806795 100644 --- a/cmdline/token_range.h +++ b/cmdline/token_range.h @@ -45,7 +45,7 @@ struct TokenRange { // Copying-from-iterator constructor template - explicit TokenRange(ForwardIterator it_begin, ForwardIterator it_end) + TokenRange(ForwardIterator it_begin, ForwardIterator it_end) : token_list_(new TokenList(it_begin, it_end)), begin_(token_list_->begin()), end_(token_list_->end()) diff --git a/compiler/compiler.h b/compiler/compiler.h index fcd3434e6..01ca46efd 100644 --- a/compiler/compiler.h +++ b/compiler/compiler.h @@ -89,7 +89,7 @@ class Compiler { const DexFile& dex_file); protected: - explicit Compiler(CompilerDriver* driver, uint64_t warning) : + Compiler(CompilerDriver* driver, uint64_t warning) : driver_(driver), maximum_compilation_time_before_warning_(warning) { } diff --git a/compiler/dex/compiler_ir.h b/compiler/dex/compiler_ir.h index d28df1dcc..5203355d0 100644 --- a/compiler/dex/compiler_ir.h +++ b/compiler/dex/compiler_ir.h @@ -129,7 +129,7 @@ struct OptionContent { * Union containing the option value of either type. */ union OptionContainer { - explicit OptionContainer(const OptionContainer& c, OptionType t) { + OptionContainer(const OptionContainer& c, OptionType t) { if (t == kString) { DCHECK(c.s != nullptr); s = strndup(c.s, kOptionStringMaxLength); diff --git a/compiler/dex/mir_field_info.h b/compiler/dex/mir_field_info.h index 04c58aca6..053029d83 100644 --- a/compiler/dex/mir_field_info.h +++ b/compiler/dex/mir_field_info.h @@ -138,7 +138,7 @@ class MirIFieldLoweringInfo : public MirFieldInfo { REQUIRES(!Locks::mutator_lock_); // Construct an unresolved instance field lowering info. - explicit MirIFieldLoweringInfo(uint16_t field_idx, DexMemAccessType type, bool is_quickened) + MirIFieldLoweringInfo(uint16_t field_idx, DexMemAccessType type, bool is_quickened) : MirFieldInfo(field_idx, kFlagIsVolatile | (is_quickened ? kFlagIsQuickened : 0u), type), // Without kFlagIsStatic. @@ -195,7 +195,7 @@ class MirSFieldLoweringInfo : public MirFieldInfo { REQUIRES(!Locks::mutator_lock_); // Construct an unresolved static field lowering info. - explicit MirSFieldLoweringInfo(uint16_t field_idx, DexMemAccessType type) + MirSFieldLoweringInfo(uint16_t field_idx, DexMemAccessType type) : MirFieldInfo(field_idx, kFlagIsVolatile | kFlagIsStatic, type), field_offset_(0u), storage_index_(DexFile::kDexNoIndex) { diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h index 23b7c4292..8bf709ab8 100644 --- a/compiler/dex/mir_graph.h +++ b/compiler/dex/mir_graph.h @@ -261,7 +261,7 @@ class MIR : public ArenaObject { uint32_t arg[5]; /* vC/D/E/F/G in invoke or filled-new-array */ Instruction::Code opcode; - explicit DecodedInstruction():vA(0), vB(0), vB_wide(0), vC(0), opcode(Instruction::NOP) { + DecodedInstruction() : vA(0), vB(0), vB_wide(0), vC(0), opcode(Instruction::NOP) { } /* @@ -353,7 +353,7 @@ class MIR : public ArenaObject { uint32_t method_lowering_info; } meta; - explicit MIR() : offset(0), optimization_flags(0), m_unit_index(0), bb(NullBasicBlockId), + MIR() : offset(0), optimization_flags(0), m_unit_index(0), bb(NullBasicBlockId), next(nullptr), ssa_rep(nullptr) { memset(&meta, 0, sizeof(meta)); } diff --git a/compiler/dex/pass_driver_me.h b/compiler/dex/pass_driver_me.h index cbe4a02ed..d0af71c06 100644 --- a/compiler/dex/pass_driver_me.h +++ b/compiler/dex/pass_driver_me.h @@ -36,7 +36,7 @@ class PassManagerOptions; class PassDriverME: public PassDriver { public: - explicit PassDriverME(const PassManager* const pass_manager, CompilationUnit* cu) + PassDriverME(const PassManager* const pass_manager, CompilationUnit* cu) : PassDriver(pass_manager), pass_me_data_holder_(), dump_cfg_folder_("/sdcard/") { pass_me_data_holder_.bb = nullptr; pass_me_data_holder_.c_unit = cu; @@ -314,4 +314,3 @@ class PassDriverME: public PassDriver { }; } // namespace art #endif // ART_COMPILER_DEX_PASS_DRIVER_ME_H_ - diff --git a/compiler/dex/pass_driver_me_opts.h b/compiler/dex/pass_driver_me_opts.h index e94c1894c..c8093d0a0 100644 --- a/compiler/dex/pass_driver_me_opts.h +++ b/compiler/dex/pass_driver_me_opts.h @@ -29,9 +29,9 @@ class PassManager; class PassDriverMEOpts : public PassDriverME { public: - explicit PassDriverMEOpts(const PassManager* const manager, - const PassManager* const post_opt_pass_manager, - CompilationUnit* cu) + PassDriverMEOpts(const PassManager* const manager, + const PassManager* const post_opt_pass_manager, + CompilationUnit* cu) : PassDriverME(manager, cu), post_opt_pass_manager_(post_opt_pass_manager) { } diff --git a/compiler/dex/pass_driver_me_post_opt.h b/compiler/dex/pass_driver_me_post_opt.h index 9e03c4e73..94176dbf0 100644 --- a/compiler/dex/pass_driver_me_post_opt.h +++ b/compiler/dex/pass_driver_me_post_opt.h @@ -28,7 +28,7 @@ class PassDataHolder; class PassDriverMEPostOpt : public PassDriverME { public: - explicit PassDriverMEPostOpt(const PassManager* const manager, CompilationUnit* cu) + PassDriverMEPostOpt(const PassManager* const manager, CompilationUnit* cu) : PassDriverME(manager, cu) { } diff --git a/compiler/dex/quick/lazy_debug_frame_opcode_writer.h b/compiler/dex/quick/lazy_debug_frame_opcode_writer.h index 94ffd7f95..3e9fb96bf 100644 --- a/compiler/dex/quick/lazy_debug_frame_opcode_writer.h +++ b/compiler/dex/quick/lazy_debug_frame_opcode_writer.h @@ -40,12 +40,11 @@ class LazyDebugFrameOpCodeWriter FINAL const ArenaVector* Patch(size_t code_size); - explicit LazyDebugFrameOpCodeWriter(LIR** last_lir_insn, bool enable_writes, - ArenaAllocator* allocator) - : Base(enable_writes, allocator->Adapter()), - last_lir_insn_(last_lir_insn), - advances_(allocator->Adapter()), - patched_(false) { + LazyDebugFrameOpCodeWriter(LIR** last_lir_insn, bool enable_writes, ArenaAllocator* allocator) + : Base(enable_writes, allocator->Adapter()), + last_lir_insn_(last_lir_insn), + advances_(allocator->Adapter()), + patched_(false) { } private: diff --git a/compiler/driver/compiler_driver.h b/compiler/driver/compiler_driver.h index 4de9c734b..5718be9e8 100644 --- a/compiler/driver/compiler_driver.h +++ b/compiler/driver/compiler_driver.h @@ -89,19 +89,19 @@ class CompilerDriver { // enabled. "image_classes" lets the compiler know what classes it // can assume will be in the image, with null implying all available // classes. - explicit CompilerDriver(const CompilerOptions* compiler_options, - VerificationResults* verification_results, - DexFileToMethodInlinerMap* method_inliner_map, - Compiler::Kind compiler_kind, - InstructionSet instruction_set, - const InstructionSetFeatures* instruction_set_features, - bool image, std::unordered_set* image_classes, - std::unordered_set* compiled_classes, - std::unordered_set* compiled_methods, - size_t thread_count, bool dump_stats, bool dump_passes, - const std::string& dump_cfg_file_name, - CumulativeLogger* timer, int swap_fd, - const std::string& profile_file); + CompilerDriver(const CompilerOptions* compiler_options, + VerificationResults* verification_results, + DexFileToMethodInlinerMap* method_inliner_map, + Compiler::Kind compiler_kind, + InstructionSet instruction_set, + const InstructionSetFeatures* instruction_set_features, + bool image, std::unordered_set* image_classes, + std::unordered_set* compiled_classes, + std::unordered_set* compiled_methods, + size_t thread_count, bool dump_stats, bool dump_passes, + const std::string& dump_cfg_file_name, + CumulativeLogger* timer, int swap_fd, + const std::string& profile_file); ~CompilerDriver(); diff --git a/compiler/jni/quick/arm/calling_convention_arm.h b/compiler/jni/quick/arm/calling_convention_arm.h index dbecb8eb9..35b50937e 100644 --- a/compiler/jni/quick/arm/calling_convention_arm.h +++ b/compiler/jni/quick/arm/calling_convention_arm.h @@ -48,7 +48,7 @@ class ArmManagedRuntimeCallingConvention FINAL : public ManagedRuntimeCallingCon class ArmJniCallingConvention FINAL : public JniCallingConvention { public: - explicit ArmJniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); + ArmJniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); ~ArmJniCallingConvention() OVERRIDE {} // Calling convention ManagedRegister ReturnRegister() OVERRIDE; diff --git a/compiler/jni/quick/arm64/calling_convention_arm64.h b/compiler/jni/quick/arm64/calling_convention_arm64.h index 9fd3265c8..37c92b203 100644 --- a/compiler/jni/quick/arm64/calling_convention_arm64.h +++ b/compiler/jni/quick/arm64/calling_convention_arm64.h @@ -48,7 +48,7 @@ class Arm64ManagedRuntimeCallingConvention FINAL : public ManagedRuntimeCallingC class Arm64JniCallingConvention FINAL : public JniCallingConvention { public: - explicit Arm64JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); + Arm64JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); ~Arm64JniCallingConvention() OVERRIDE {} // Calling convention ManagedRegister ReturnRegister() OVERRIDE; diff --git a/compiler/jni/quick/calling_convention.h b/compiler/jni/quick/calling_convention.h index c9b595aee..243d12445 100644 --- a/compiler/jni/quick/calling_convention.h +++ b/compiler/jni/quick/calling_convention.h @@ -348,8 +348,8 @@ class JniCallingConvention : public CallingConvention { kObjectOrClass = 1 }; - explicit JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty, - size_t frame_pointer_size) + JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty, + size_t frame_pointer_size) : CallingConvention(is_static, is_synchronized, shorty, frame_pointer_size) {} // Number of stack slots for outgoing arguments, above which the handle scope is diff --git a/compiler/jni/quick/mips/calling_convention_mips.h b/compiler/jni/quick/mips/calling_convention_mips.h index 8d82dceef..dc4543241 100644 --- a/compiler/jni/quick/mips/calling_convention_mips.h +++ b/compiler/jni/quick/mips/calling_convention_mips.h @@ -48,7 +48,7 @@ class MipsManagedRuntimeCallingConvention FINAL : public ManagedRuntimeCallingCo class MipsJniCallingConvention FINAL : public JniCallingConvention { public: - explicit MipsJniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); + MipsJniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); ~MipsJniCallingConvention() OVERRIDE {} // Calling convention ManagedRegister ReturnRegister() OVERRIDE; diff --git a/compiler/jni/quick/mips64/calling_convention_mips64.h b/compiler/jni/quick/mips64/calling_convention_mips64.h index dc9273b92..3d6aab739 100644 --- a/compiler/jni/quick/mips64/calling_convention_mips64.h +++ b/compiler/jni/quick/mips64/calling_convention_mips64.h @@ -48,7 +48,7 @@ class Mips64ManagedRuntimeCallingConvention FINAL : public ManagedRuntimeCalling class Mips64JniCallingConvention FINAL : public JniCallingConvention { public: - explicit Mips64JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); + Mips64JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); ~Mips64JniCallingConvention() OVERRIDE {} // Calling convention ManagedRegister ReturnRegister() OVERRIDE; diff --git a/compiler/jni/quick/x86/calling_convention_x86.h b/compiler/jni/quick/x86/calling_convention_x86.h index b1b3598a8..cdf0956c9 100644 --- a/compiler/jni/quick/x86/calling_convention_x86.h +++ b/compiler/jni/quick/x86/calling_convention_x86.h @@ -26,8 +26,7 @@ constexpr size_t kFramePointerSize = 4; class X86ManagedRuntimeCallingConvention FINAL : public ManagedRuntimeCallingConvention { public: - explicit X86ManagedRuntimeCallingConvention(bool is_static, bool is_synchronized, - const char* shorty) + X86ManagedRuntimeCallingConvention(bool is_static, bool is_synchronized, const char* shorty) : ManagedRuntimeCallingConvention(is_static, is_synchronized, shorty, kFramePointerSize), gpr_arg_count_(0) {} ~X86ManagedRuntimeCallingConvention() OVERRIDE {} @@ -51,7 +50,7 @@ class X86ManagedRuntimeCallingConvention FINAL : public ManagedRuntimeCallingCon class X86JniCallingConvention FINAL : public JniCallingConvention { public: - explicit X86JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); + X86JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); ~X86JniCallingConvention() OVERRIDE {} // Calling convention ManagedRegister ReturnRegister() OVERRIDE; diff --git a/compiler/jni/quick/x86_64/calling_convention_x86_64.h b/compiler/jni/quick/x86_64/calling_convention_x86_64.h index 7a90c6e94..6e47c9fae 100644 --- a/compiler/jni/quick/x86_64/calling_convention_x86_64.h +++ b/compiler/jni/quick/x86_64/calling_convention_x86_64.h @@ -26,8 +26,7 @@ constexpr size_t kFramePointerSize = 8; class X86_64ManagedRuntimeCallingConvention FINAL : public ManagedRuntimeCallingConvention { public: - explicit X86_64ManagedRuntimeCallingConvention(bool is_static, bool is_synchronized, - const char* shorty) + X86_64ManagedRuntimeCallingConvention(bool is_static, bool is_synchronized, const char* shorty) : ManagedRuntimeCallingConvention(is_static, is_synchronized, shorty, kFramePointerSize) {} ~X86_64ManagedRuntimeCallingConvention() OVERRIDE {} // Calling convention @@ -47,7 +46,7 @@ class X86_64ManagedRuntimeCallingConvention FINAL : public ManagedRuntimeCalling class X86_64JniCallingConvention FINAL : public JniCallingConvention { public: - explicit X86_64JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); + X86_64JniCallingConvention(bool is_static, bool is_synchronized, const char* shorty); ~X86_64JniCallingConvention() OVERRIDE {} // Calling convention ManagedRegister ReturnRegister() OVERRIDE; diff --git a/compiler/oat_writer.h b/compiler/oat_writer.h index 3baf43872..760fb7c12 100644 --- a/compiler/oat_writer.h +++ b/compiler/oat_writer.h @@ -178,7 +178,7 @@ class OatWriter { class OatDexFile { public: - explicit OatDexFile(size_t offset, const DexFile& dex_file); + OatDexFile(size_t offset, const DexFile& dex_file); size_t SizeOf() const; void UpdateChecksum(OatHeader* oat_header) const; bool Write(OatWriter* oat_writer, OutputStream* out, const size_t file_offset) const; @@ -200,10 +200,10 @@ class OatWriter { class OatClass { public: - explicit OatClass(size_t offset, - const std::vector& compiled_methods, - uint32_t num_non_null_compiled_methods, - mirror::Class::Status status); + OatClass(size_t offset, + const std::vector& compiled_methods, + uint32_t num_non_null_compiled_methods, + mirror::Class::Status status); ~OatClass(); size_t GetOatMethodOffsetsOffsetFromOatHeader(size_t class_def_method_index_) const; size_t GetOatMethodOffsetsOffsetFromOatClass(size_t class_def_method_index_) const; diff --git a/compiler/optimizing/code_generator_arm64.cc b/compiler/optimizing/code_generator_arm64.cc index b44c5ba9f..d93ef1b76 100644 --- a/compiler/optimizing/code_generator_arm64.cc +++ b/compiler/optimizing/code_generator_arm64.cc @@ -360,8 +360,7 @@ class NullCheckSlowPathARM64 : public SlowPathCodeARM64 { class SuspendCheckSlowPathARM64 : public SlowPathCodeARM64 { public: - explicit SuspendCheckSlowPathARM64(HSuspendCheck* instruction, - HBasicBlock* successor) + SuspendCheckSlowPathARM64(HSuspendCheck* instruction, HBasicBlock* successor) : instruction_(instruction), successor_(successor) {} void EmitNativeCode(CodeGenerator* codegen) OVERRIDE { diff --git a/compiler/optimizing/code_generator_arm64.h b/compiler/optimizing/code_generator_arm64.h index 2c610380e..ac7ee10a5 100644 --- a/compiler/optimizing/code_generator_arm64.h +++ b/compiler/optimizing/code_generator_arm64.h @@ -191,7 +191,7 @@ class InstructionCodeGeneratorARM64 : public HGraphVisitor { class LocationsBuilderARM64 : public HGraphVisitor { public: - explicit LocationsBuilderARM64(HGraph* graph, CodeGeneratorARM64* codegen) + LocationsBuilderARM64(HGraph* graph, CodeGeneratorARM64* codegen) : HGraphVisitor(graph), codegen_(codegen) {} #define DECLARE_VISIT_INSTRUCTION(name, super) \ diff --git a/compiler/optimizing/code_generator_mips64.cc b/compiler/optimizing/code_generator_mips64.cc index b6ebeb497..4cee4a37b 100644 --- a/compiler/optimizing/code_generator_mips64.cc +++ b/compiler/optimizing/code_generator_mips64.cc @@ -294,8 +294,7 @@ class NullCheckSlowPathMIPS64 : public SlowPathCodeMIPS64 { class SuspendCheckSlowPathMIPS64 : public SlowPathCodeMIPS64 { public: - explicit SuspendCheckSlowPathMIPS64(HSuspendCheck* instruction, - HBasicBlock* successor) + SuspendCheckSlowPathMIPS64(HSuspendCheck* instruction, HBasicBlock* successor) : instruction_(instruction), successor_(successor) {} void EmitNativeCode(CodeGenerator* codegen) OVERRIDE { diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc index 4efdbb922..38a7c53d0 100644 --- a/compiler/optimizing/code_generator_x86.cc +++ b/compiler/optimizing/code_generator_x86.cc @@ -93,7 +93,7 @@ class DivZeroCheckSlowPathX86 : public SlowPathCodeX86 { class DivRemMinusOneSlowPathX86 : public SlowPathCodeX86 { public: - explicit DivRemMinusOneSlowPathX86(Register reg, bool is_div) : reg_(reg), is_div_(is_div) {} + DivRemMinusOneSlowPathX86(Register reg, bool is_div) : reg_(reg), is_div_(is_div) {} void EmitNativeCode(CodeGenerator* codegen) OVERRIDE { __ Bind(GetEntryLabel()); diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc index 158510478..18ab5958e 100644 --- a/compiler/optimizing/code_generator_x86_64.cc +++ b/compiler/optimizing/code_generator_x86_64.cc @@ -95,7 +95,7 @@ class DivZeroCheckSlowPathX86_64 : public SlowPathCodeX86_64 { class DivRemMinusOneSlowPathX86_64 : public SlowPathCodeX86_64 { public: - explicit DivRemMinusOneSlowPathX86_64(Register reg, Primitive::Type type, bool is_div) + DivRemMinusOneSlowPathX86_64(Register reg, Primitive::Type type, bool is_div) : cpu_reg_(CpuRegister(reg)), type_(type), is_div_(is_div) {} void EmitNativeCode(CodeGenerator* codegen) OVERRIDE { @@ -129,7 +129,7 @@ class DivRemMinusOneSlowPathX86_64 : public SlowPathCodeX86_64 { class SuspendCheckSlowPathX86_64 : public SlowPathCodeX86_64 { public: - explicit SuspendCheckSlowPathX86_64(HSuspendCheck* instruction, HBasicBlock* successor) + SuspendCheckSlowPathX86_64(HSuspendCheck* instruction, HBasicBlock* successor) : instruction_(instruction), successor_(successor) {} void EmitNativeCode(CodeGenerator* codegen) OVERRIDE { diff --git a/compiler/optimizing/intrinsics_arm.h b/compiler/optimizing/intrinsics_arm.h index 8bfb7d468..38c2ef4bb 100644 --- a/compiler/optimizing/intrinsics_arm.h +++ b/compiler/optimizing/intrinsics_arm.h @@ -33,8 +33,7 @@ class CodeGeneratorARM; class IntrinsicLocationsBuilderARM FINAL : public IntrinsicVisitor { public: - explicit IntrinsicLocationsBuilderARM(ArenaAllocator* arena, - const ArmInstructionSetFeatures& features) + IntrinsicLocationsBuilderARM(ArenaAllocator* arena, const ArmInstructionSetFeatures& features) : arena_(arena), features_(features) {} // Define visitor methods. diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index ca2c9989b..718469f55 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -3105,7 +3105,7 @@ class HNewInstance : public HExpression<1> { class HNeg : public HUnaryOperation { public: - explicit HNeg(Primitive::Type result_type, HInstruction* input) + HNeg(Primitive::Type result_type, HInstruction* input) : HUnaryOperation(result_type, input) {} template T Compute(T x) const { return -x; } @@ -3535,7 +3535,7 @@ class HParameterValue : public HExpression<0> { class HNot : public HUnaryOperation { public: - explicit HNot(Primitive::Type result_type, HInstruction* input) + HNot(Primitive::Type result_type, HInstruction* input) : HUnaryOperation(result_type, input) {} bool CanBeMoved() const OVERRIDE { return true; } @@ -4173,7 +4173,7 @@ class HLoadString : public HExpression<1> { */ class HClinitCheck : public HExpression<1> { public: - explicit HClinitCheck(HLoadClass* constant, uint32_t dex_pc) + HClinitCheck(HLoadClass* constant, uint32_t dex_pc) : HExpression( Primitive::kPrimNot, SideEffects::AllWrites()), // assume write on all fields/arrays diff --git a/compiler/utils/arm/assembler_arm.h b/compiler/utils/arm/assembler_arm.h index 5d85d1105..ef60fefe4 100644 --- a/compiler/utils/arm/assembler_arm.h +++ b/compiler/utils/arm/assembler_arm.h @@ -888,7 +888,7 @@ class ArmAssembler : public Assembler { // Slowpath entered when Thread::Current()->_exception is non-null class ArmExceptionSlowPath FINAL : public SlowPath { public: - explicit ArmExceptionSlowPath(ArmManagedRegister scratch, size_t stack_adjust) + ArmExceptionSlowPath(ArmManagedRegister scratch, size_t stack_adjust) : scratch_(scratch), stack_adjust_(stack_adjust) { } void Emit(Assembler *sp_asm) OVERRIDE; diff --git a/compiler/utils/arm64/assembler_arm64.h b/compiler/utils/arm64/assembler_arm64.h index 05882a30b..8e85fe96a 100644 --- a/compiler/utils/arm64/assembler_arm64.h +++ b/compiler/utils/arm64/assembler_arm64.h @@ -254,7 +254,7 @@ class Arm64Assembler FINAL : public Assembler { class Arm64Exception { private: - explicit Arm64Exception(Arm64ManagedRegister scratch, size_t stack_adjust) + Arm64Exception(Arm64ManagedRegister scratch, size_t stack_adjust) : scratch_(scratch), stack_adjust_(stack_adjust) { } diff --git a/compiler/utils/dedupe_set.h b/compiler/utils/dedupe_set.h index 8cdb18074..2c4a68909 100644 --- a/compiler/utils/dedupe_set.h +++ b/compiler/utils/dedupe_set.h @@ -99,7 +99,7 @@ class DedupeSet { return hashed_key.store_ptr; } - explicit DedupeSet(const char* set_name, SwapAllocator& alloc) + DedupeSet(const char* set_name, SwapAllocator& alloc) : allocator_(alloc), hash_time_(0) { for (HashType i = 0; i < kShard; ++i) { std::ostringstream oss; diff --git a/compiler/utils/dex_cache_arrays_layout.h b/compiler/utils/dex_cache_arrays_layout.h index 8f98ea11b..2a109bd11 100644 --- a/compiler/utils/dex_cache_arrays_layout.h +++ b/compiler/utils/dex_cache_arrays_layout.h @@ -37,7 +37,7 @@ class DexCacheArraysLayout { } // Construct a layout for a particular dex file. - explicit DexCacheArraysLayout(size_t pointer_size, const DexFile* dex_file); + DexCacheArraysLayout(size_t pointer_size, const DexFile* dex_file); bool Valid() const { return Size() != 0u; diff --git a/compiler/utils/managed_register.h b/compiler/utils/managed_register.h index bb62bca3b..893daff71 100644 --- a/compiler/utils/managed_register.h +++ b/compiler/utils/managed_register.h @@ -95,7 +95,7 @@ class ManagedRegisterSpill : public ManagedRegister { explicit ManagedRegisterSpill(const ManagedRegister& other) : ManagedRegister(other), size_(-1), spill_offset_(-1) { } - explicit ManagedRegisterSpill(const ManagedRegister& other, int32_t size) + ManagedRegisterSpill(const ManagedRegister& other, int32_t size) : ManagedRegister(other), size_(size), spill_offset_(-1) { } int32_t getSpillOffset() { diff --git a/compiler/utils/mips/assembler_mips.h b/compiler/utils/mips/assembler_mips.h index 0d1b82ce7..df95daddc 100644 --- a/compiler/utils/mips/assembler_mips.h +++ b/compiler/utils/mips/assembler_mips.h @@ -283,7 +283,7 @@ class MipsAssembler FINAL : public Assembler { // Slowpath entered when Thread::Current()->_exception is non-null class MipsExceptionSlowPath FINAL : public SlowPath { public: - explicit MipsExceptionSlowPath(MipsManagedRegister scratch, size_t stack_adjust) + MipsExceptionSlowPath(MipsManagedRegister scratch, size_t stack_adjust) : scratch_(scratch), stack_adjust_(stack_adjust) {} virtual void Emit(Assembler *sp_asm) OVERRIDE; private: diff --git a/compiler/utils/mips64/assembler_mips64.h b/compiler/utils/mips64/assembler_mips64.h index 47b146a28..31130ea43 100644 --- a/compiler/utils/mips64/assembler_mips64.h +++ b/compiler/utils/mips64/assembler_mips64.h @@ -354,7 +354,7 @@ class Mips64Assembler FINAL : public Assembler { // Slowpath entered when Thread::Current()->_exception is non-null class Mips64ExceptionSlowPath FINAL : public SlowPath { public: - explicit Mips64ExceptionSlowPath(Mips64ManagedRegister scratch, size_t stack_adjust) + Mips64ExceptionSlowPath(Mips64ManagedRegister scratch, size_t stack_adjust) : scratch_(scratch), stack_adjust_(stack_adjust) {} virtual void Emit(Assembler *sp_asm) OVERRIDE; private: diff --git a/compiler/utils/x86/assembler_x86.h b/compiler/utils/x86/assembler_x86.h index d9c1b404c..37c69fee9 100644 --- a/compiler/utils/x86/assembler_x86.h +++ b/compiler/utils/x86/assembler_x86.h @@ -205,7 +205,7 @@ class Address : public Operand { class X86Assembler FINAL : public Assembler { public: - explicit X86Assembler() {} + X86Assembler() {} virtual ~X86Assembler() {} /* diff --git a/disassembler/disassembler_arm.cc b/disassembler/disassembler_arm.cc index d1d3481b9..03fac1885 100644 --- a/disassembler/disassembler_arm.cc +++ b/disassembler/disassembler_arm.cc @@ -201,14 +201,13 @@ std::ostream& operator<<(std::ostream& os, const RegisterList& rhs) { } struct FpRegister { - explicit FpRegister(uint32_t instr, uint16_t at_bit, uint16_t extra_at_bit) { + FpRegister(uint32_t instr, uint16_t at_bit, uint16_t extra_at_bit) { size = (instr >> 8) & 1; uint32_t Vn = (instr >> at_bit) & 0xF; uint32_t N = (instr >> extra_at_bit) & 1; r = (size != 0 ? ((N << 4) | Vn) : ((Vn << 1) | N)); } - explicit FpRegister(uint32_t instr, uint16_t at_bit, uint16_t extra_at_bit, - uint32_t forced_size) { + FpRegister(uint32_t instr, uint16_t at_bit, uint16_t extra_at_bit, uint32_t forced_size) { size = forced_size; uint32_t Vn = (instr >> at_bit) & 0xF; uint32_t N = (instr >> extra_at_bit) & 1; diff --git a/disassembler/disassembler_mips.h b/disassembler/disassembler_mips.h index 4f70a9b52..b0e49b397 100644 --- a/disassembler/disassembler_mips.h +++ b/disassembler/disassembler_mips.h @@ -26,10 +26,11 @@ namespace mips { class DisassemblerMips FINAL : public Disassembler { public: - explicit DisassemblerMips(DisassemblerOptions* options, bool is64bit) : Disassembler(options), - is64bit_(is64bit), - last_ptr_(nullptr), - last_instr_(0) {} + DisassemblerMips(DisassemblerOptions* options, bool is64bit) + : Disassembler(options), + is64bit_(is64bit), + last_ptr_(nullptr), + last_instr_(0) {} size_t Dump(std::ostream& os, const uint8_t* begin) OVERRIDE; void Dump(std::ostream& os, const uint8_t* begin, const uint8_t* end) OVERRIDE; diff --git a/oatdump/oatdump.cc b/oatdump/oatdump.cc index b61cfc944..5e29ca75f 100644 --- a/oatdump/oatdump.cc +++ b/oatdump/oatdump.cc @@ -107,7 +107,7 @@ class OatSymbolizer FINAL { const OatFile* oat_file_; }; - explicit OatSymbolizer(const OatFile* oat_file, const std::string& output_name) : + OatSymbolizer(const OatFile* oat_file, const std::string& output_name) : oat_file_(oat_file), builder_(nullptr), output_name_(output_name.empty() ? "symbolized.oat" : output_name) { } @@ -346,7 +346,7 @@ class OatDumperOptions { class OatDumper { public: - explicit OatDumper(const OatFile& oat_file, const OatDumperOptions& options) + OatDumper(const OatFile& oat_file, const OatDumperOptions& options) : oat_file_(oat_file), oat_dex_files_(oat_file.GetOatDexFiles()), options_(options), @@ -1453,8 +1453,8 @@ class OatDumper { class ImageDumper { public: - explicit ImageDumper(std::ostream* os, gc::space::ImageSpace& image_space, - const ImageHeader& image_header, OatDumperOptions* oat_dumper_options) + ImageDumper(std::ostream* os, gc::space::ImageSpace& image_space, + const ImageHeader& image_header, OatDumperOptions* oat_dumper_options) : os_(os), vios_(os), indent1_(&vios_), @@ -2019,7 +2019,7 @@ class ImageDumper { std::vector method_outlier_expansion; std::vector> oat_dex_file_sizes; - explicit Stats() + Stats() : oat_file_bytes(0), file_bytes(0), header_bytes(0), diff --git a/runtime/arch/arm64/instruction_set_features_arm64.h b/runtime/arch/arm64/instruction_set_features_arm64.h index e59ff5895..805131f1f 100644 --- a/runtime/arch/arm64/instruction_set_features_arm64.h +++ b/runtime/arch/arm64/instruction_set_features_arm64.h @@ -83,9 +83,7 @@ class Arm64InstructionSetFeatures FINAL : public InstructionSetFeatures { std::string* error_msg) const OVERRIDE; private: - explicit Arm64InstructionSetFeatures(bool smp, - bool needs_a53_835769_fix, - bool needs_a53_843419_fix) + Arm64InstructionSetFeatures(bool smp, bool needs_a53_835769_fix, bool needs_a53_843419_fix) : InstructionSetFeatures(smp), fix_cortex_a53_835769_(needs_a53_835769_fix), fix_cortex_a53_843419_(needs_a53_843419_fix) { diff --git a/runtime/base/arena_allocator.h b/runtime/base/arena_allocator.h index c4b36ee76..05c66f06e 100644 --- a/runtime/base/arena_allocator.h +++ b/runtime/base/arena_allocator.h @@ -170,7 +170,7 @@ class MallocArena FINAL : public Arena { class MemMapArena FINAL : public Arena { public: - explicit MemMapArena(size_t size, bool low_4gb); + MemMapArena(size_t size, bool low_4gb); virtual ~MemMapArena(); void Release() OVERRIDE; diff --git a/runtime/base/arena_containers.h b/runtime/base/arena_containers.h index d6c4a54b5..a7aafdf29 100644 --- a/runtime/base/arena_containers.h +++ b/runtime/base/arena_containers.h @@ -134,7 +134,7 @@ class ArenaAllocatorAdapter : private ArenaAllocatorAdapterKind { typedef ArenaAllocatorAdapter other; }; - explicit ArenaAllocatorAdapter(ArenaAllocator* arena_allocator, ArenaAllocKind kind) + ArenaAllocatorAdapter(ArenaAllocator* arena_allocator, ArenaAllocKind kind) : ArenaAllocatorAdapterKind(kind), arena_allocator_(arena_allocator) { } diff --git a/runtime/base/mutex.h b/runtime/base/mutex.h index 2801fb7a7..848c904fe 100644 --- a/runtime/base/mutex.h +++ b/runtime/base/mutex.h @@ -437,7 +437,7 @@ class SHARED_LOCKABLE MutatorMutex : public ReaderWriterMutex { // (Signal) or all at once (Broadcast). class ConditionVariable { public: - explicit ConditionVariable(const char* name, Mutex& mutex); + ConditionVariable(const char* name, Mutex& mutex); ~ConditionVariable(); void Broadcast(Thread* self); @@ -475,7 +475,7 @@ class ConditionVariable { // upon destruction. class SCOPED_CAPABILITY MutexLock { public: - explicit MutexLock(Thread* self, Mutex& mu) ACQUIRE(mu) : self_(self), mu_(mu) { + MutexLock(Thread* self, Mutex& mu) ACQUIRE(mu) : self_(self), mu_(mu) { mu_.ExclusiveLock(self_); } @@ -495,7 +495,7 @@ class SCOPED_CAPABILITY MutexLock { // construction and releases it upon destruction. class SCOPED_CAPABILITY ReaderMutexLock { public: - explicit ReaderMutexLock(Thread* self, ReaderWriterMutex& mu) ACQUIRE(mu) : + ReaderMutexLock(Thread* self, ReaderWriterMutex& mu) ACQUIRE(mu) : self_(self), mu_(mu) { mu_.SharedLock(self_); } @@ -517,7 +517,7 @@ class SCOPED_CAPABILITY ReaderMutexLock { // construction and releases it upon destruction. class SCOPED_CAPABILITY WriterMutexLock { public: - explicit WriterMutexLock(Thread* self, ReaderWriterMutex& mu) EXCLUSIVE_LOCK_FUNCTION(mu) : + WriterMutexLock(Thread* self, ReaderWriterMutex& mu) EXCLUSIVE_LOCK_FUNCTION(mu) : self_(self), mu_(mu) { mu_.ExclusiveLock(self_); } diff --git a/runtime/base/timing_logger.h b/runtime/base/timing_logger.h index e10cd2452..a5344dbd3 100644 --- a/runtime/base/timing_logger.h +++ b/runtime/base/timing_logger.h @@ -131,7 +131,7 @@ class TimingLogger { friend class TimingLogger; }; - explicit TimingLogger(const char* name, bool precise, bool verbose); + TimingLogger(const char* name, bool precise, bool verbose); ~TimingLogger(); // Verify that all open timings have related closed timings. void Verify(); @@ -156,7 +156,7 @@ class TimingLogger { // starts and ends. class ScopedTiming { public: - explicit ScopedTiming(const char* label, TimingLogger* logger) : logger_(logger) { + ScopedTiming(const char* label, TimingLogger* logger) : logger_(logger) { logger_->StartTiming(label); } ~ScopedTiming() { diff --git a/runtime/base/unix_file/fd_file.h b/runtime/base/unix_file/fd_file.h index d51fbd68a..f47368b18 100644 --- a/runtime/base/unix_file/fd_file.h +++ b/runtime/base/unix_file/fd_file.h @@ -35,8 +35,8 @@ class FdFile : public RandomAccessFile { FdFile(); // Creates an FdFile using the given file descriptor. Takes ownership of the // file descriptor. (Use DisableAutoClose to retain ownership.) - explicit FdFile(int fd, bool checkUsage); - explicit FdFile(int fd, const std::string& path, bool checkUsage); + FdFile(int fd, bool checkUsage); + FdFile(int fd, const std::string& path, bool checkUsage); // Destroys an FdFile, closing the file descriptor if Close hasn't already // been called. (If you care about the return value of Close, call it diff --git a/runtime/check_jni.cc b/runtime/check_jni.cc index 38bc8186d..4172b8924 100644 --- a/runtime/check_jni.cc +++ b/runtime/check_jni.cc @@ -130,7 +130,7 @@ union JniValueType { class ScopedCheck { public: - explicit ScopedCheck(int flags, const char* functionName, bool has_method = true) + ScopedCheck(int flags, const char* functionName, bool has_method = true) : function_name_(functionName), flags_(flags), indent_(0), has_method_(has_method) { } diff --git a/runtime/debugger.cc b/runtime/debugger.cc index 8e608148b..dfb7f6327 100644 --- a/runtime/debugger.cc +++ b/runtime/debugger.cc @@ -3588,10 +3588,10 @@ JDWP::JdwpError Dbg::ConfigureStep(JDWP::ObjectId thread_id, JDWP::JdwpStepSize // Find the dex_pc values that correspond to the current line, for line-based single-stepping. struct DebugCallbackContext { - explicit DebugCallbackContext(SingleStepControl* single_step_control_cb, - int32_t line_number_cb, const DexFile::CodeItem* code_item) - : single_step_control_(single_step_control_cb), line_number_(line_number_cb), - code_item_(code_item), last_pc_valid(false), last_pc(0) { + DebugCallbackContext(SingleStepControl* single_step_control_cb, + int32_t line_number_cb, const DexFile::CodeItem* code_item) + : single_step_control_(single_step_control_cb), line_number_(line_number_cb), + code_item_(code_item), last_pc_valid(false), last_pc(0) { } static bool Callback(void* raw_context, uint32_t address, uint32_t line_number_cb) { diff --git a/runtime/gc/accounting/mod_union_table.cc b/runtime/gc/accounting/mod_union_table.cc index b9e89253f..b5ab3d94b 100644 --- a/runtime/gc/accounting/mod_union_table.cc +++ b/runtime/gc/accounting/mod_union_table.cc @@ -54,8 +54,7 @@ class ModUnionAddToCardSetVisitor { class ModUnionAddToCardBitmapVisitor { public: - explicit ModUnionAddToCardBitmapVisitor(ModUnionTable::CardBitmap* bitmap, - CardTable* card_table) + ModUnionAddToCardBitmapVisitor(ModUnionTable::CardBitmap* bitmap, CardTable* card_table) : bitmap_(bitmap), card_table_(card_table) { } @@ -175,9 +174,9 @@ void ModUnionTableReferenceCache::ClearCards() { class AddToReferenceArrayVisitor { public: - explicit AddToReferenceArrayVisitor(ModUnionTableReferenceCache* mod_union_table, - std::vector*>* references) - : mod_union_table_(mod_union_table), references_(references) { + AddToReferenceArrayVisitor(ModUnionTableReferenceCache* mod_union_table, + std::vector*>* references) + : mod_union_table_(mod_union_table), references_(references) { } // Extra parameters are required since we use this same visitor signature for checking objects. @@ -211,10 +210,10 @@ class AddToReferenceArrayVisitor { class ModUnionReferenceVisitor { public: - explicit ModUnionReferenceVisitor(ModUnionTableReferenceCache* const mod_union_table, - std::vector*>* references) - : mod_union_table_(mod_union_table), - references_(references) { + ModUnionReferenceVisitor(ModUnionTableReferenceCache* const mod_union_table, + std::vector*>* references) + : mod_union_table_(mod_union_table), + references_(references) { } void operator()(Object* obj) const @@ -231,10 +230,10 @@ class ModUnionReferenceVisitor { class CheckReferenceVisitor { public: - explicit CheckReferenceVisitor(ModUnionTableReferenceCache* mod_union_table, - const std::set& references) - : mod_union_table_(mod_union_table), - references_(references) { + CheckReferenceVisitor(ModUnionTableReferenceCache* mod_union_table, + const std::set& references) + : mod_union_table_(mod_union_table), + references_(references) { } // Extra parameters are required since we use this same visitor signature for checking objects. @@ -277,8 +276,8 @@ class CheckReferenceVisitor { class ModUnionCheckReferences { public: - explicit ModUnionCheckReferences(ModUnionTableReferenceCache* mod_union_table, - const std::set& references) + ModUnionCheckReferences(ModUnionTableReferenceCache* mod_union_table, + const std::set& references) REQUIRES(Locks::heap_bitmap_lock_) : mod_union_table_(mod_union_table), references_(references) { } diff --git a/runtime/gc/collector/concurrent_copying.cc b/runtime/gc/collector/concurrent_copying.cc index 8e329d616..220c06ee5 100644 --- a/runtime/gc/collector/concurrent_copying.cc +++ b/runtime/gc/collector/concurrent_copying.cc @@ -181,7 +181,7 @@ void ConcurrentCopying::InitializePhase() { // Used to switch the thread roots of a thread from from-space refs to to-space refs. class ThreadFlipVisitor : public Closure { public: - explicit ThreadFlipVisitor(ConcurrentCopying* concurrent_copying, bool use_tlab) + ThreadFlipVisitor(ConcurrentCopying* concurrent_copying, bool use_tlab) : concurrent_copying_(concurrent_copying), use_tlab_(use_tlab) { } @@ -817,8 +817,8 @@ class ConcurrentCopyingAssertToSpaceInvariantObjectVisitor { class RevokeThreadLocalMarkStackCheckpoint : public Closure { public: - explicit RevokeThreadLocalMarkStackCheckpoint(ConcurrentCopying* concurrent_copying, - bool disable_weak_ref_access) + RevokeThreadLocalMarkStackCheckpoint(ConcurrentCopying* concurrent_copying, + bool disable_weak_ref_access) : concurrent_copying_(concurrent_copying), disable_weak_ref_access_(disable_weak_ref_access) { } diff --git a/runtime/gc/collector/mark_sweep.cc b/runtime/gc/collector/mark_sweep.cc index e2bcca23f..3b6d2aab9 100644 --- a/runtime/gc/collector/mark_sweep.cc +++ b/runtime/gc/collector/mark_sweep.cc @@ -648,8 +648,8 @@ class MarkStackTask : public Task { protected: class MarkObjectParallelVisitor { public: - ALWAYS_INLINE explicit MarkObjectParallelVisitor(MarkStackTask* chunk_task, - MarkSweep* mark_sweep) + ALWAYS_INLINE MarkObjectParallelVisitor(MarkStackTask* chunk_task, + MarkSweep* mark_sweep) : chunk_task_(chunk_task), mark_sweep_(mark_sweep) {} void operator()(mirror::Object* obj, MemberOffset offset, bool /* static */) const @@ -1058,8 +1058,8 @@ void MarkSweep::VerifySystemWeaks() { class CheckpointMarkThreadRoots : public Closure, public RootVisitor { public: - explicit CheckpointMarkThreadRoots(MarkSweep* mark_sweep, - bool revoke_ros_alloc_thread_local_buffers_at_checkpoint) + CheckpointMarkThreadRoots(MarkSweep* mark_sweep, + bool revoke_ros_alloc_thread_local_buffers_at_checkpoint) : mark_sweep_(mark_sweep), revoke_ros_alloc_thread_local_buffers_at_checkpoint_( revoke_ros_alloc_thread_local_buffers_at_checkpoint) { diff --git a/runtime/gc/collector/mark_sweep.h b/runtime/gc/collector/mark_sweep.h index 606be63d9..8bd1dc7cd 100644 --- a/runtime/gc/collector/mark_sweep.h +++ b/runtime/gc/collector/mark_sweep.h @@ -54,7 +54,7 @@ namespace collector { class MarkSweep : public GarbageCollector { public: - explicit MarkSweep(Heap* heap, bool is_concurrent, const std::string& name_prefix = ""); + MarkSweep(Heap* heap, bool is_concurrent, const std::string& name_prefix = ""); ~MarkSweep() {} diff --git a/runtime/gc/collector/partial_mark_sweep.h b/runtime/gc/collector/partial_mark_sweep.h index 7b69bce0e..e9b4f6fba 100644 --- a/runtime/gc/collector/partial_mark_sweep.h +++ b/runtime/gc/collector/partial_mark_sweep.h @@ -30,7 +30,7 @@ class PartialMarkSweep : public MarkSweep { return kGcTypePartial; } - explicit PartialMarkSweep(Heap* heap, bool is_concurrent, const std::string& name_prefix = ""); + PartialMarkSweep(Heap* heap, bool is_concurrent, const std::string& name_prefix = ""); ~PartialMarkSweep() {} protected: diff --git a/runtime/gc/collector/sticky_mark_sweep.h b/runtime/gc/collector/sticky_mark_sweep.h index e8e70de22..e8f067242 100644 --- a/runtime/gc/collector/sticky_mark_sweep.h +++ b/runtime/gc/collector/sticky_mark_sweep.h @@ -30,7 +30,7 @@ class StickyMarkSweep FINAL : public PartialMarkSweep { return kGcTypeSticky; } - explicit StickyMarkSweep(Heap* heap, bool is_concurrent, const std::string& name_prefix = ""); + StickyMarkSweep(Heap* heap, bool is_concurrent, const std::string& name_prefix = ""); ~StickyMarkSweep() {} protected: diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 141fed283..89773ce46 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -2108,7 +2108,7 @@ void Heap::ChangeCollector(CollectorType collector_type) { // Special compacting collector which uses sub-optimal bin packing to reduce zygote space size. class ZygoteCompactingCollector FINAL : public collector::SemiSpace { public: - explicit ZygoteCompactingCollector(gc::Heap* heap, bool is_running_on_memory_tool) + ZygoteCompactingCollector(gc::Heap* heap, bool is_running_on_memory_tool) : SemiSpace(heap, false, "zygote collector"), bin_live_bitmap_(nullptr), bin_mark_bitmap_(nullptr), @@ -2634,7 +2634,7 @@ class ScanVisitor { // Verify a reference from an object. class VerifyReferenceVisitor : public SingleRootVisitor { public: - explicit VerifyReferenceVisitor(Heap* heap, Atomic* fail_count, bool verify_referent) + VerifyReferenceVisitor(Heap* heap, Atomic* fail_count, bool verify_referent) SHARED_REQUIRES(Locks::mutator_lock_, Locks::heap_bitmap_lock_) : heap_(heap), fail_count_(fail_count), verify_referent_(verify_referent) {} @@ -2784,7 +2784,7 @@ class VerifyReferenceVisitor : public SingleRootVisitor { // Verify all references within an object, for use with HeapBitmap::Visit. class VerifyObjectVisitor { public: - explicit VerifyObjectVisitor(Heap* heap, Atomic* fail_count, bool verify_referent) + VerifyObjectVisitor(Heap* heap, Atomic* fail_count, bool verify_referent) : heap_(heap), fail_count_(fail_count), verify_referent_(verify_referent) {} void operator()(mirror::Object* obj) @@ -3453,8 +3453,8 @@ void Heap::RequestConcurrentGCAndSaveObject(Thread* self, bool force_full, mirro class Heap::ConcurrentGCTask : public HeapTask { public: - explicit ConcurrentGCTask(uint64_t target_time, bool force_full) - : HeapTask(target_time), force_full_(force_full) { } + ConcurrentGCTask(uint64_t target_time, bool force_full) + : HeapTask(target_time), force_full_(force_full) { } virtual void Run(Thread* self) OVERRIDE { gc::Heap* heap = Runtime::Current()->GetHeap(); heap->ConcurrentGC(self, force_full_); diff --git a/runtime/gc/heap.h b/runtime/gc/heap.h index 66760493e..055095d12 100644 --- a/runtime/gc/heap.h +++ b/runtime/gc/heap.h @@ -161,36 +161,36 @@ class Heap { // Create a heap with the requested sizes. The possible empty // image_file_names names specify Spaces to load based on // ImageWriter output. - explicit Heap(size_t initial_size, - size_t growth_limit, - size_t min_free, - size_t max_free, - double target_utilization, - double foreground_heap_growth_multiplier, - size_t capacity, - size_t non_moving_space_capacity, - const std::string& original_image_file_name, - InstructionSet image_instruction_set, - CollectorType foreground_collector_type, - CollectorType background_collector_type, - space::LargeObjectSpaceType large_object_space_type, - size_t large_object_threshold, - size_t parallel_gc_threads, - size_t conc_gc_threads, - bool low_memory_mode, - size_t long_pause_threshold, - size_t long_gc_threshold, - bool ignore_max_footprint, - bool use_tlab, - bool verify_pre_gc_heap, - bool verify_pre_sweeping_heap, - bool verify_post_gc_heap, - bool verify_pre_gc_rosalloc, - bool verify_pre_sweeping_rosalloc, - bool verify_post_gc_rosalloc, - bool gc_stress_mode, - bool use_homogeneous_space_compaction, - uint64_t min_interval_homogeneous_space_compaction_by_oom); + Heap(size_t initial_size, + size_t growth_limit, + size_t min_free, + size_t max_free, + double target_utilization, + double foreground_heap_growth_multiplier, + size_t capacity, + size_t non_moving_space_capacity, + const std::string& original_image_file_name, + InstructionSet image_instruction_set, + CollectorType foreground_collector_type, + CollectorType background_collector_type, + space::LargeObjectSpaceType large_object_space_type, + size_t large_object_threshold, + size_t parallel_gc_threads, + size_t conc_gc_threads, + bool low_memory_mode, + size_t long_pause_threshold, + size_t long_gc_threshold, + bool ignore_max_footprint, + bool use_tlab, + bool verify_pre_gc_heap, + bool verify_pre_sweeping_heap, + bool verify_post_gc_heap, + bool verify_pre_gc_rosalloc, + bool verify_pre_sweeping_rosalloc, + bool verify_post_gc_rosalloc, + bool gc_stress_mode, + bool use_homogeneous_space_compaction, + uint64_t min_interval_homogeneous_space_compaction_by_oom); ~Heap(); diff --git a/runtime/gc/space/memory_tool_malloc_space.h b/runtime/gc/space/memory_tool_malloc_space.h index fe39e05a1..a5dbad9af 100644 --- a/runtime/gc/space/memory_tool_malloc_space.h +++ b/runtime/gc/space/memory_tool_malloc_space.h @@ -55,7 +55,7 @@ class MemoryToolMallocSpace FINAL : public BaseMallocSpaceType { size_t MaxBytesBulkAllocatedFor(size_t num_bytes) OVERRIDE; template - explicit MemoryToolMallocSpace(MemMap* mem_map, size_t initial_size, Params... params); + MemoryToolMallocSpace(MemMap* mem_map, size_t initial_size, Params... params); virtual ~MemoryToolMallocSpace() {} private: diff --git a/runtime/gc/task_processor_test.cc b/runtime/gc/task_processor_test.cc index f06f68d3c..2c44da231 100644 --- a/runtime/gc/task_processor_test.cc +++ b/runtime/gc/task_processor_test.cc @@ -102,7 +102,7 @@ TEST_F(TaskProcessorTest, Interrupt) { class TestOrderTask : public HeapTask { public: - explicit TestOrderTask(uint64_t expected_time, size_t expected_counter, size_t* counter) + TestOrderTask(uint64_t expected_time, size_t expected_counter, size_t* counter) : HeapTask(expected_time), expected_counter_(expected_counter), counter_(counter) { } virtual void Run(Thread* thread) OVERRIDE { diff --git a/runtime/handle_scope.h b/runtime/handle_scope.h index 5ed8ef0ed..e617348ce 100644 --- a/runtime/handle_scope.h +++ b/runtime/handle_scope.h @@ -106,7 +106,7 @@ class PACKED(4) HandleScope { } // Semi-hidden constructor. Construction expected by generated code and StackHandleScope. - explicit HandleScope(HandleScope* link, uint32_t num_references) : + HandleScope(HandleScope* link, uint32_t num_references) : link_(link), number_of_references_(num_references) { } diff --git a/runtime/indirect_reference_table.h b/runtime/indirect_reference_table.h index 798b48cc4..c398555ca 100644 --- a/runtime/indirect_reference_table.h +++ b/runtime/indirect_reference_table.h @@ -227,8 +227,7 @@ static_assert(sizeof(IrtEntry) == (1 + kIRTPrevCount) * sizeof(uint32_t), class IrtIterator { public: - explicit IrtIterator(IrtEntry* table, size_t i, size_t capacity) - SHARED_REQUIRES(Locks::mutator_lock_) + IrtIterator(IrtEntry* table, size_t i, size_t capacity) SHARED_REQUIRES(Locks::mutator_lock_) : table_(table), i_(i), capacity_(capacity) { } diff --git a/runtime/jit/jit_instrumentation.cc b/runtime/jit/jit_instrumentation.cc index 1e56cdca3..258c29dd2 100644 --- a/runtime/jit/jit_instrumentation.cc +++ b/runtime/jit/jit_instrumentation.cc @@ -26,7 +26,7 @@ namespace jit { class JitCompileTask : public Task { public: - explicit JitCompileTask(ArtMethod* method, JitInstrumentationCache* cache) + JitCompileTask(ArtMethod* method, JitInstrumentationCache* cache) : method_(method), cache_(cache) { } diff --git a/runtime/lock_word.h b/runtime/lock_word.h index 245f8b8e4..5d0d20463 100644 --- a/runtime/lock_word.h +++ b/runtime/lock_word.h @@ -197,7 +197,7 @@ class LockWord { size_t ForwardingAddress() const; // Constructor a lock word for inflation to use a Monitor. - explicit LockWord(Monitor* mon, uint32_t rb_state); + LockWord(Monitor* mon, uint32_t rb_state); // Return the hash code stored in the lock word, must be kHashCode state. int32_t GetHashCode() const; diff --git a/runtime/mirror/class.cc b/runtime/mirror/class.cc index 6af90bbc6..f20cc6ea5 100644 --- a/runtime/mirror/class.cc +++ b/runtime/mirror/class.cc @@ -855,9 +855,9 @@ class ReadBarrierOnNativeRootsVisitor { // The pre-fence visitor for Class::CopyOf(). class CopyClassVisitor { public: - explicit CopyClassVisitor(Thread* self, Handle* orig, size_t new_length, - size_t copy_bytes, ArtMethod* const (&imt)[mirror::Class::kImtSize], - size_t pointer_size) + CopyClassVisitor(Thread* self, Handle* orig, size_t new_length, + size_t copy_bytes, ArtMethod* const (&imt)[mirror::Class::kImtSize], + size_t pointer_size) : self_(self), orig_(orig), new_length_(new_length), copy_bytes_(copy_bytes), imt_(imt), pointer_size_(pointer_size) { } diff --git a/runtime/mirror/object.cc b/runtime/mirror/object.cc index 87fb5ba32..df680b5ba 100644 --- a/runtime/mirror/object.cc +++ b/runtime/mirror/object.cc @@ -107,7 +107,7 @@ Object* Object::CopyObject(Thread* self, mirror::Object* dest, mirror::Object* s // An allocation pre-fence visitor that copies the object. class CopyObjectVisitor { public: - explicit CopyObjectVisitor(Thread* self, Handle* orig, size_t num_bytes) + CopyObjectVisitor(Thread* self, Handle* orig, size_t num_bytes) : self_(self), orig_(orig), num_bytes_(num_bytes) { } diff --git a/runtime/monitor.h b/runtime/monitor.h index 3ca895430..346e8662b 100644 --- a/runtime/monitor.h +++ b/runtime/monitor.h @@ -151,10 +151,10 @@ class Monitor { #endif private: - explicit Monitor(Thread* self, Thread* owner, mirror::Object* obj, int32_t hash_code) - SHARED_REQUIRES(Locks::mutator_lock_); - explicit Monitor(Thread* self, Thread* owner, mirror::Object* obj, int32_t hash_code, - MonitorId id) SHARED_REQUIRES(Locks::mutator_lock_); + Monitor(Thread* self, Thread* owner, mirror::Object* obj, int32_t hash_code) + SHARED_REQUIRES(Locks::mutator_lock_); + Monitor(Thread* self, Thread* owner, mirror::Object* obj, int32_t hash_code, MonitorId id) + SHARED_REQUIRES(Locks::mutator_lock_); // Install the monitor into its object, may fail if another thread installs a different monitor // first. diff --git a/runtime/monitor_test.cc b/runtime/monitor_test.cc index 1be637c8a..e1173bb02 100644 --- a/runtime/monitor_test.cc +++ b/runtime/monitor_test.cc @@ -106,8 +106,7 @@ static void FillHeap(Thread* self, ClassLinker* class_linker, class CreateTask : public Task { public: - explicit CreateTask(MonitorTest* monitor_test, uint64_t initial_sleep, int64_t millis, - bool expected) : + CreateTask(MonitorTest* monitor_test, uint64_t initial_sleep, int64_t millis, bool expected) : monitor_test_(monitor_test), initial_sleep_(initial_sleep), millis_(millis), expected_(expected) {} diff --git a/runtime/reflection.cc b/runtime/reflection.cc index 100d1996e..2fe1e64fe 100644 --- a/runtime/reflection.cc +++ b/runtime/reflection.cc @@ -36,7 +36,7 @@ namespace art { class ArgArray { public: - explicit ArgArray(const char* shorty, uint32_t shorty_len) + ArgArray(const char* shorty, uint32_t shorty_len) : shorty_(shorty), shorty_len_(shorty_len), num_bytes_(0) { size_t num_slots = shorty_len + 1; // +1 in case of receiver. if (LIKELY((num_slots * 2) < kSmallArgArraySize)) { diff --git a/runtime/thread.cc b/runtime/thread.cc index 74e3f1120..d54a7a6aa 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc @@ -1808,7 +1808,7 @@ class CountStackDepthVisitor : public StackVisitor { template class BuildInternalStackTraceVisitor : public StackVisitor { public: - explicit BuildInternalStackTraceVisitor(Thread* self, Thread* thread, int skip_depth) + BuildInternalStackTraceVisitor(Thread* self, Thread* thread, int skip_depth) : StackVisitor(thread, nullptr, StackVisitor::StackWalkKind::kIncludeInlinedFrames), self_(self), skip_depth_(skip_depth), diff --git a/runtime/thread_pool.h b/runtime/thread_pool.h index 1ca0a210c..a2338d6fc 100644 --- a/runtime/thread_pool.h +++ b/runtime/thread_pool.h @@ -91,7 +91,7 @@ class ThreadPool { // after running it, it is the caller's responsibility. void AddTask(Thread* self, Task* task) REQUIRES(!task_queue_lock_); - explicit ThreadPool(const char* name, size_t num_threads); + ThreadPool(const char* name, size_t num_threads); virtual ~ThreadPool(); // Wait for all tasks currently on queue to get completed. -- 2.11.0