Commit 8810a118 authored by Milad Fa's avatar Milad Fa Committed by V8 LUCI CQ

PPC/s390: [base] Create base/strings.h

Port 9010201c

Original Commit Message:

    Moves VSNPrintf, SNPrintf and StrNCpy out of utils/utils.h into
    base/strings.h.

R=delphick@chromium.org, joransiu@ca.ibm.com, junyan@redhat.com, midawson@redhat.com
BUG=
LOG=N

Change-Id: Ia06003c1daea94e3767083b910bee1498bec37cd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2979474Reviewed-by: 's avatarDan Elphick <delphick@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75312}
parent ecea71d0
...@@ -421,7 +421,7 @@ void Decoder::Unknown(Instruction* instr) { Format(instr, "unknown"); } ...@@ -421,7 +421,7 @@ void Decoder::Unknown(Instruction* instr) { Format(instr, "unknown"); }
// instruction bits. // instruction bits.
void Decoder::UnknownFormat(Instruction* instr, const char* name) { void Decoder::UnknownFormat(Instruction* instr, const char* name) {
char buffer[100]; char buffer[100];
base::snprintf(buffer, sizeof(buffer), "%s (unknown-format)", name); snprintf(buffer, sizeof(buffer), "%s (unknown-format)", name);
Format(instr, buffer); Format(instr, buffer);
} }
...@@ -1709,7 +1709,7 @@ int Decoder::InstructionDecode(byte* instr_ptr) { ...@@ -1709,7 +1709,7 @@ int Decoder::InstructionDecode(byte* instr_ptr) {
namespace disasm { namespace disasm {
const char* NameConverter::NameOfAddress(byte* addr) const { const char* NameConverter::NameOfAddress(byte* addr) const {
v8::internal::base::SNPrintF(tmp_buffer_, "%p", static_cast<void*>(addr)); v8::base::SNPrintF(tmp_buffer_, "%p", static_cast<void*>(addr));
return tmp_buffer_.begin(); return tmp_buffer_.begin();
} }
......
...@@ -1042,7 +1042,7 @@ int Decoder::InstructionDecode(byte* instr_ptr) { ...@@ -1042,7 +1042,7 @@ int Decoder::InstructionDecode(byte* instr_ptr) {
namespace disasm { namespace disasm {
const char* NameConverter::NameOfAddress(byte* addr) const { const char* NameConverter::NameOfAddress(byte* addr) const {
v8::internal::base::SNPrintF(tmp_buffer_, "%p", static_cast<void*>(addr)); v8::base::SNPrintF(tmp_buffer_, "%p", static_cast<void*>(addr));
return tmp_buffer_.begin(); return tmp_buffer_.begin();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment