From 561aaa30669da9119aadfc5dd3aa6377d02afd85 Mon Sep 17 00:00:00 2001 From: Igor Sheludko Date: Tue, 26 Feb 2019 13:29:54 +0100 Subject: [PATCH] [cleanup] Fix signature of RawMachineAssembler::Comment() Bug: v8:8834 Change-Id: I4d57b15f2d5058511a2c474897a52cac236a6a00 Reviewed-on: https://chromium-review.googlesource.com/c/1488767 Reviewed-by: Sigurd Schneider Commit-Queue: Igor Sheludko Cr-Commit-Position: refs/heads/master@{#59867} --- src/compiler/raw-machine-assembler.cc | 2 +- src/compiler/raw-machine-assembler.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/raw-machine-assembler.cc b/src/compiler/raw-machine-assembler.cc index 73a7701926..190b42ba24 100644 --- a/src/compiler/raw-machine-assembler.cc +++ b/src/compiler/raw-machine-assembler.cc @@ -564,7 +564,7 @@ void RawMachineAssembler::Unreachable() { current_block_ = nullptr; } -void RawMachineAssembler::Comment(std::string msg) { +void RawMachineAssembler::Comment(const std::string& msg) { size_t length = msg.length() + 1; char* zone_buffer = zone()->NewArray(length); MemCopy(zone_buffer, msg.c_str(), length); diff --git a/src/compiler/raw-machine-assembler.h b/src/compiler/raw-machine-assembler.h index 5654a454ec..1c7ba465ee 100644 --- a/src/compiler/raw-machine-assembler.h +++ b/src/compiler/raw-machine-assembler.h @@ -941,7 +941,7 @@ class V8_EXPORT_PRIVATE RawMachineAssembler { void DebugAbort(Node* message); void DebugBreak(); void Unreachable(); - void Comment(std::string msg); + void Comment(const std::string& msg); #if DEBUG void Bind(RawMachineLabel* label, AssemblerDebugInfo info);