diff --git a/src/code-stubs.h b/src/code-stubs.h index 8415227cc5..94d4f69bea 100644 --- a/src/code-stubs.h +++ b/src/code-stubs.h @@ -299,7 +299,9 @@ class CodeStubDescriptor { DCHECK(!stack_parameter_count_.is_valid()); } - void set_call_descriptor(CallInterfaceDescriptor d) { call_descriptor_ = d; } + void set_call_descriptor(CallInterfaceDescriptor d) { + call_descriptor_ = std::move(d); + } CallInterfaceDescriptor call_descriptor() const { return call_descriptor_; } int GetRegisterParameterCount() const { diff --git a/src/snapshot/builtin-deserializer-allocator.h b/src/snapshot/builtin-deserializer-allocator.h index 65c5872d7a..21f87c1ee6 100644 --- a/src/snapshot/builtin-deserializer-allocator.h +++ b/src/snapshot/builtin-deserializer-allocator.h @@ -83,7 +83,7 @@ class BuiltinDeserializerAllocator final { // Builtin deserialization does not bake reservations into the snapshot, hence // this is a nop. - void DecodeReservation(std::vector res) {} + void DecodeReservation(const std::vector& res) {} // These methods are used to pre-allocate builtin objects prior to // deserialization. diff --git a/src/wasm/module-compiler.cc b/src/wasm/module-compiler.cc index e15346b592..39c6c86cfa 100644 --- a/src/wasm/module-compiler.cc +++ b/src/wasm/module-compiler.cc @@ -2472,7 +2472,7 @@ class AsyncCompileJob::PrepareAndStartCompile : public CompileStep { public: PrepareAndStartCompile(std::shared_ptr module, bool start_compilation) - : module_(module), start_compilation_(start_compilation) {} + : module_(std::move(module)), start_compilation_(start_compilation) {} private: std::shared_ptr module_;