Commit 1a7d847c authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cctest] Add V8_EXPORT_PRIVATE to arm/arm64 ports

Change-Id: I2855af444db5dad910d99acc8179aef75e56d000
Bug: v8:9020
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1559734Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60703}
parent 18adaee4
...@@ -79,7 +79,7 @@ enum Coprocessor { ...@@ -79,7 +79,7 @@ enum Coprocessor {
// Machine instruction Operands // Machine instruction Operands
// Class Operand represents a shifter operand in data processing instructions // Class Operand represents a shifter operand in data processing instructions
class Operand { class V8_EXPORT_PRIVATE Operand {
public: public:
// immediate // immediate
V8_INLINE explicit Operand(int32_t immediate, V8_INLINE explicit Operand(int32_t immediate,
...@@ -182,9 +182,8 @@ class Operand { ...@@ -182,9 +182,8 @@ class Operand {
friend class Assembler; friend class Assembler;
}; };
// Class MemOperand represents a memory operand in load and store instructions // Class MemOperand represents a memory operand in load and store instructions
class MemOperand { class V8_EXPORT_PRIVATE MemOperand {
public: public:
// [rn +/- offset] Offset/NegOffset // [rn +/- offset] Offset/NegOffset
// [rn +/- offset]! PreIndex/NegPreIndex // [rn +/- offset]! PreIndex/NegPreIndex
...@@ -240,10 +239,9 @@ class MemOperand { ...@@ -240,10 +239,9 @@ class MemOperand {
friend class Assembler; friend class Assembler;
}; };
// Class NeonMemOperand represents a memory operand in load and // Class NeonMemOperand represents a memory operand in load and
// store NEON instructions // store NEON instructions
class NeonMemOperand { class V8_EXPORT_PRIVATE NeonMemOperand {
public: public:
// [rn {:align}] Offset // [rn {:align}] Offset
// [rn {:align}]! PostIndex // [rn {:align}]! PostIndex
...@@ -264,7 +262,6 @@ class NeonMemOperand { ...@@ -264,7 +262,6 @@ class NeonMemOperand {
int align_; int align_;
}; };
// Class NeonListOperand represents a list of NEON registers // Class NeonListOperand represents a list of NEON registers
class NeonListOperand { class NeonListOperand {
public: public:
...@@ -1399,7 +1396,7 @@ class PatchingAssembler : public Assembler { ...@@ -1399,7 +1396,7 @@ class PatchingAssembler : public Assembler {
// state, even if the list is modified by some other means. Note that this scope // state, even if the list is modified by some other means. Note that this scope
// can be nested but the destructors need to run in the opposite order as the // can be nested but the destructors need to run in the opposite order as the
// constructors. We do not have assertions for this. // constructors. We do not have assertions for this.
class UseScratchRegisterScope { class V8_EXPORT_PRIVATE UseScratchRegisterScope {
public: public:
explicit UseScratchRegisterScope(Assembler* assembler); explicit UseScratchRegisterScope(Assembler* assembler);
~UseScratchRegisterScope(); ~UseScratchRegisterScope();
......
...@@ -49,7 +49,7 @@ class Immediate { ...@@ -49,7 +49,7 @@ class Immediate {
RelocInfo::Mode rmode() const { return rmode_; } RelocInfo::Mode rmode() const { return rmode_; }
private: private:
void InitializeHandle(Handle<HeapObject> value); V8_EXPORT_PRIVATE void InitializeHandle(Handle<HeapObject> value);
int64_t value_; int64_t value_;
RelocInfo::Mode rmode_; RelocInfo::Mode rmode_;
......
...@@ -86,7 +86,7 @@ namespace internal { ...@@ -86,7 +86,7 @@ namespace internal {
// The Visitor interface. Disassembler and simulator (and other tools) // The Visitor interface. Disassembler and simulator (and other tools)
// must provide implementations for all of these functions. // must provide implementations for all of these functions.
class DecoderVisitor { class V8_EXPORT_PRIVATE DecoderVisitor {
public: public:
virtual ~DecoderVisitor() {} virtual ~DecoderVisitor() {}
...@@ -95,9 +95,8 @@ class DecoderVisitor { ...@@ -95,9 +95,8 @@ class DecoderVisitor {
#undef DECLARE #undef DECLARE
}; };
// A visitor that dispatches to a list of visitors. // A visitor that dispatches to a list of visitors.
class DispatchingDecoderVisitor : public DecoderVisitor { class V8_EXPORT_PRIVATE DispatchingDecoderVisitor : public DecoderVisitor {
public: public:
DispatchingDecoderVisitor() {} DispatchingDecoderVisitor() {}
virtual ~DispatchingDecoderVisitor() {} virtual ~DispatchingDecoderVisitor() {}
...@@ -121,7 +120,7 @@ class DispatchingDecoderVisitor : public DecoderVisitor { ...@@ -121,7 +120,7 @@ class DispatchingDecoderVisitor : public DecoderVisitor {
// //
// will call in order visitor methods in V3, V2, V1, V4. // will call in order visitor methods in V3, V2, V1, V4.
void AppendVisitor(DecoderVisitor* visitor); void AppendVisitor(DecoderVisitor* visitor);
void PrependVisitor(DecoderVisitor* visitor); V8_EXPORT_PRIVATE void PrependVisitor(DecoderVisitor* visitor);
void InsertVisitorBefore(DecoderVisitor* new_visitor, void InsertVisitorBefore(DecoderVisitor* new_visitor,
DecoderVisitor* registered_visitor); DecoderVisitor* registered_visitor);
void InsertVisitorAfter(DecoderVisitor* new_visitor, void InsertVisitorAfter(DecoderVisitor* new_visitor,
...@@ -142,7 +141,6 @@ class DispatchingDecoderVisitor : public DecoderVisitor { ...@@ -142,7 +141,6 @@ class DispatchingDecoderVisitor : public DecoderVisitor {
std::list<DecoderVisitor*> visitors_; std::list<DecoderVisitor*> visitors_;
}; };
template<typename V> template<typename V>
class Decoder : public V { class Decoder : public V {
public: public:
......
...@@ -14,8 +14,7 @@ ...@@ -14,8 +14,7 @@
namespace v8 { namespace v8 {
namespace internal { namespace internal {
class V8_EXPORT_PRIVATE DisassemblingDecoder : public DecoderVisitor {
class DisassemblingDecoder : public DecoderVisitor {
public: public:
DisassemblingDecoder(); DisassemblingDecoder();
DisassemblingDecoder(char* text_buffer, int buffer_size); DisassemblingDecoder(char* text_buffer, int buffer_size);
...@@ -80,8 +79,7 @@ class DisassemblingDecoder : public DecoderVisitor { ...@@ -80,8 +79,7 @@ class DisassemblingDecoder : public DecoderVisitor {
bool own_buffer_; bool own_buffer_;
}; };
class V8_EXPORT_PRIVATE PrintDisassembler : public DisassemblingDecoder {
class PrintDisassembler : public DisassemblingDecoder {
public: public:
explicit PrintDisassembler(FILE* stream) : stream_(stream) { } explicit PrintDisassembler(FILE* stream) : stream_(stream) { }
~PrintDisassembler() { } ~PrintDisassembler() { }
...@@ -92,7 +90,6 @@ class PrintDisassembler : public DisassemblingDecoder { ...@@ -92,7 +90,6 @@ class PrintDisassembler : public DisassemblingDecoder {
FILE *stream_; FILE *stream_;
}; };
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <cstdint> #include <cstdint>
#include "include/v8config.h" #include "include/v8config.h"
#include "src/base/macros.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -28,23 +29,25 @@ extern "C" { ...@@ -28,23 +29,25 @@ extern "C" {
extern const uint16_t kFP16PositiveInfinity = 0x7C00; extern const uint16_t kFP16PositiveInfinity = 0x7C00;
extern const uint16_t kFP16NegativeInfinity = 0xFC00; extern const uint16_t kFP16NegativeInfinity = 0xFC00;
extern const uint32_t kFP32PositiveInfinity = 0x7F800000; V8_EXPORT_PRIVATE extern const uint32_t kFP32PositiveInfinity = 0x7F800000;
extern const uint32_t kFP32NegativeInfinity = 0xFF800000; V8_EXPORT_PRIVATE extern const uint32_t kFP32NegativeInfinity = 0xFF800000;
extern const uint64_t kFP64PositiveInfinity = 0x7FF0000000000000UL; V8_EXPORT_PRIVATE extern const uint64_t kFP64PositiveInfinity =
extern const uint64_t kFP64NegativeInfinity = 0xFFF0000000000000UL; 0x7FF0000000000000UL;
V8_EXPORT_PRIVATE extern const uint64_t kFP64NegativeInfinity =
0xFFF0000000000000UL;
// This value is a signalling NaN as both a double and as a float (taking the // This value is a signalling NaN as both a double and as a float (taking the
// least-significant word). // least-significant word).
extern const uint64_t kFP64SignallingNaN = 0x7FF000007F800001; V8_EXPORT_PRIVATE extern const uint64_t kFP64SignallingNaN = 0x7FF000007F800001;
extern const uint32_t kFP32SignallingNaN = 0x7F800001; V8_EXPORT_PRIVATE extern const uint32_t kFP32SignallingNaN = 0x7F800001;
// A similar value, but as a quiet NaN. // A similar value, but as a quiet NaN.
extern const uint64_t kFP64QuietNaN = 0x7FF800007FC00001; V8_EXPORT_PRIVATE extern const uint64_t kFP64QuietNaN = 0x7FF800007FC00001;
extern const uint32_t kFP32QuietNaN = 0x7FC00001; V8_EXPORT_PRIVATE extern const uint32_t kFP32QuietNaN = 0x7FC00001;
// The default NaN values (for FPCR.DN=1). // The default NaN values (for FPCR.DN=1).
extern const uint64_t kFP64DefaultNaN = 0x7FF8000000000000UL; V8_EXPORT_PRIVATE extern const uint64_t kFP64DefaultNaN = 0x7FF8000000000000UL;
extern const uint32_t kFP32DefaultNaN = 0x7FC00000; V8_EXPORT_PRIVATE extern const uint32_t kFP32DefaultNaN = 0x7FC00000;
extern const uint16_t kFP16DefaultNaN = 0x7E00; extern const uint16_t kFP16DefaultNaN = 0x7E00;
#if defined(V8_OS_WIN) #if defined(V8_OS_WIN)
......
...@@ -26,23 +26,23 @@ extern "C" { ...@@ -26,23 +26,23 @@ extern "C" {
extern const float16 kFP16PositiveInfinity; extern const float16 kFP16PositiveInfinity;
extern const float16 kFP16NegativeInfinity; extern const float16 kFP16NegativeInfinity;
extern const float kFP32PositiveInfinity; V8_EXPORT_PRIVATE extern const float kFP32PositiveInfinity;
extern const float kFP32NegativeInfinity; V8_EXPORT_PRIVATE extern const float kFP32NegativeInfinity;
extern const double kFP64PositiveInfinity; V8_EXPORT_PRIVATE extern const double kFP64PositiveInfinity;
extern const double kFP64NegativeInfinity; V8_EXPORT_PRIVATE extern const double kFP64NegativeInfinity;
// This value is a signalling NaN as both a double and as a float (taking the // This value is a signalling NaN as both a double and as a float (taking the
// least-significant word). // least-significant word).
extern const double kFP64SignallingNaN; V8_EXPORT_PRIVATE extern const double kFP64SignallingNaN;
extern const float kFP32SignallingNaN; V8_EXPORT_PRIVATE extern const float kFP32SignallingNaN;
// A similar value, but as a quiet NaN. // A similar value, but as a quiet NaN.
extern const double kFP64QuietNaN; V8_EXPORT_PRIVATE extern const double kFP64QuietNaN;
extern const float kFP32QuietNaN; V8_EXPORT_PRIVATE extern const float kFP32QuietNaN;
// The default NaN values (for FPCR.DN=1). // The default NaN values (for FPCR.DN=1).
extern const double kFP64DefaultNaN; V8_EXPORT_PRIVATE extern const double kFP64DefaultNaN;
extern const float kFP32DefaultNaN; V8_EXPORT_PRIVATE extern const float kFP32DefaultNaN;
extern const float16 kFP16DefaultNaN; extern const float16 kFP16DefaultNaN;
#if defined(V8_OS_WIN) #if defined(V8_OS_WIN)
...@@ -401,11 +401,11 @@ class Instruction { ...@@ -401,11 +401,11 @@ class Instruction {
// Find the PC offset encoded in this instruction. 'this' may be a branch or // Find the PC offset encoded in this instruction. 'this' may be a branch or
// a PC-relative addressing instruction. // a PC-relative addressing instruction.
// The offset returned is unscaled. // The offset returned is unscaled.
int64_t ImmPCOffset(); V8_EXPORT_PRIVATE int64_t ImmPCOffset();
// Find the target of this instruction. 'this' may be a branch or a // Find the target of this instruction. 'this' may be a branch or a
// PC-relative addressing instruction. // PC-relative addressing instruction.
Instruction* ImmPCOffsetTarget(); V8_EXPORT_PRIVATE Instruction* ImmPCOffsetTarget();
static bool IsValidImmPCOffset(ImmBranchType branch_type, ptrdiff_t offset); static bool IsValidImmPCOffset(ImmBranchType branch_type, ptrdiff_t offset);
bool IsTargetInImmPCOffsetRange(Instruction* target); bool IsTargetInImmPCOffsetRange(Instruction* target);
......
...@@ -2081,7 +2081,7 @@ class InstructionAccurateScope { ...@@ -2081,7 +2081,7 @@ class InstructionAccurateScope {
// original state, even if the lists were modified by some other means. Note // original state, even if the lists were modified by some other means. Note
// that this scope can be nested but the destructors need to run in the opposite // that this scope can be nested but the destructors need to run in the opposite
// order as the constructors. We do not have assertions for this. // order as the constructors. We do not have assertions for this.
class UseScratchRegisterScope { class V8_EXPORT_PRIVATE UseScratchRegisterScope {
public: public:
explicit UseScratchRegisterScope(TurboAssembler* tasm) explicit UseScratchRegisterScope(TurboAssembler* tasm)
: available_(tasm->TmpList()), : available_(tasm->TmpList()),
...@@ -2092,7 +2092,7 @@ class UseScratchRegisterScope { ...@@ -2092,7 +2092,7 @@ class UseScratchRegisterScope {
DCHECK_EQ(availablefp_->type(), CPURegister::kVRegister); DCHECK_EQ(availablefp_->type(), CPURegister::kVRegister);
} }
~UseScratchRegisterScope(); V8_EXPORT_PRIVATE ~UseScratchRegisterScope();
// Take a register from the appropriate temps list. It will be returned // Take a register from the appropriate temps list. It will be returned
// automatically when the scope ends. // automatically when the scope ends.
...@@ -2109,7 +2109,8 @@ class UseScratchRegisterScope { ...@@ -2109,7 +2109,8 @@ class UseScratchRegisterScope {
VRegister AcquireSameSizeAs(const VRegister& reg); VRegister AcquireSameSizeAs(const VRegister& reg);
private: private:
static CPURegister AcquireNextAvailable(CPURegList* available); V8_EXPORT_PRIVATE static CPURegister AcquireNextAvailable(
CPURegList* available);
// Available scratch registers. // Available scratch registers.
CPURegList* available_; // kRegister CPURegList* available_; // kRegister
......
...@@ -323,14 +323,14 @@ VectorFormat ScalarFormatFromLaneSize(int lanesize); ...@@ -323,14 +323,14 @@ VectorFormat ScalarFormatFromLaneSize(int lanesize);
VectorFormat VectorFormatHalfWidthDoubleLanes(VectorFormat vform); VectorFormat VectorFormatHalfWidthDoubleLanes(VectorFormat vform);
VectorFormat VectorFormatFillQ(VectorFormat vform); VectorFormat VectorFormatFillQ(VectorFormat vform);
VectorFormat ScalarFormatFromFormat(VectorFormat vform); VectorFormat ScalarFormatFromFormat(VectorFormat vform);
unsigned RegisterSizeInBitsFromFormat(VectorFormat vform); V8_EXPORT_PRIVATE unsigned RegisterSizeInBitsFromFormat(VectorFormat vform);
unsigned RegisterSizeInBytesFromFormat(VectorFormat vform); unsigned RegisterSizeInBytesFromFormat(VectorFormat vform);
int LaneSizeInBytesFromFormat(VectorFormat vform); int LaneSizeInBytesFromFormat(VectorFormat vform);
unsigned LaneSizeInBitsFromFormat(VectorFormat vform); unsigned LaneSizeInBitsFromFormat(VectorFormat vform);
int LaneSizeInBytesLog2FromFormat(VectorFormat vform); int LaneSizeInBytesLog2FromFormat(VectorFormat vform);
int LaneCountFromFormat(VectorFormat vform); V8_EXPORT_PRIVATE int LaneCountFromFormat(VectorFormat vform);
int MaxLaneCountFromFormat(VectorFormat vform); int MaxLaneCountFromFormat(VectorFormat vform);
bool IsVectorFormat(VectorFormat vform); V8_EXPORT_PRIVATE bool IsVectorFormat(VectorFormat vform);
int64_t MaxIntFromFormat(VectorFormat vform); int64_t MaxIntFromFormat(VectorFormat vform);
int64_t MinIntFromFormat(VectorFormat vform); int64_t MinIntFromFormat(VectorFormat vform);
uint64_t MaxUintFromFormat(VectorFormat vform); uint64_t MaxUintFromFormat(VectorFormat vform);
...@@ -536,7 +536,7 @@ bool AreAliased(const CPURegister& reg1, const CPURegister& reg2, ...@@ -536,7 +536,7 @@ bool AreAliased(const CPURegister& reg1, const CPURegister& reg2,
// same size, and are of the same type. The system stack pointer may be // same size, and are of the same type. The system stack pointer may be
// specified. Arguments set to NoReg are ignored, as are any subsequent // specified. Arguments set to NoReg are ignored, as are any subsequent
// arguments. At least one argument (reg1) must be valid (not NoCPUReg). // arguments. At least one argument (reg1) must be valid (not NoCPUReg).
bool AreSameSizeAndType( V8_EXPORT_PRIVATE bool AreSameSizeAndType(
const CPURegister& reg1, const CPURegister& reg2 = NoCPUReg, const CPURegister& reg1, const CPURegister& reg2 = NoCPUReg,
const CPURegister& reg3 = NoCPUReg, const CPURegister& reg4 = NoCPUReg, const CPURegister& reg3 = NoCPUReg, const CPURegister& reg4 = NoCPUReg,
const CPURegister& reg5 = NoCPUReg, const CPURegister& reg6 = NoCPUReg, const CPURegister& reg5 = NoCPUReg, const CPURegister& reg6 = NoCPUReg,
...@@ -553,9 +553,10 @@ bool AreSameFormat(const VRegister& reg1, const VRegister& reg2, ...@@ -553,9 +553,10 @@ bool AreSameFormat(const VRegister& reg1, const VRegister& reg2,
// consecutive in the register file. Arguments may be set to NoVReg, and if so, // consecutive in the register file. Arguments may be set to NoVReg, and if so,
// subsequent arguments must also be NoVReg. At least one argument (reg1) must // subsequent arguments must also be NoVReg. At least one argument (reg1) must
// be valid (not NoVReg). // be valid (not NoVReg).
bool AreConsecutive(const VRegister& reg1, const VRegister& reg2, V8_EXPORT_PRIVATE bool AreConsecutive(const VRegister& reg1,
const VRegister& reg3 = NoVReg, const VRegister& reg2,
const VRegister& reg4 = NoVReg); const VRegister& reg3 = NoVReg,
const VRegister& reg4 = NoVReg);
typedef VRegister FloatRegister; typedef VRegister FloatRegister;
typedef VRegister DoubleRegister; typedef VRegister DoubleRegister;
...@@ -563,7 +564,7 @@ typedef VRegister Simd128Register; ...@@ -563,7 +564,7 @@ typedef VRegister Simd128Register;
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Lists of registers. // Lists of registers.
class CPURegList { class V8_EXPORT_PRIVATE CPURegList {
public: public:
template <typename... CPURegisters> template <typename... CPURegisters>
explicit CPURegList(CPURegister reg0, CPURegisters... regs) explicit CPURegList(CPURegister reg0, CPURegisters... regs)
......
...@@ -656,10 +656,11 @@ class Simulator : public DecoderVisitor, public SimulatorBase { ...@@ -656,10 +656,11 @@ class Simulator : public DecoderVisitor, public SimulatorBase {
USE(size); USE(size);
} }
explicit Simulator(Decoder<DispatchingDecoderVisitor>* decoder, V8_EXPORT_PRIVATE explicit Simulator(
Isolate* isolate = nullptr, FILE* stream = stderr); Decoder<DispatchingDecoderVisitor>* decoder, Isolate* isolate = nullptr,
FILE* stream = stderr);
Simulator(); Simulator();
~Simulator(); V8_EXPORT_PRIVATE ~Simulator();
// System functions. // System functions.
...@@ -744,7 +745,7 @@ class Simulator : public DecoderVisitor, public SimulatorBase { ...@@ -744,7 +745,7 @@ class Simulator : public DecoderVisitor, public SimulatorBase {
// Accessor to the internal simulator stack area. // Accessor to the internal simulator stack area.
uintptr_t StackLimit(uintptr_t c_limit) const; uintptr_t StackLimit(uintptr_t c_limit) const;
void ResetState(); V8_EXPORT_PRIVATE void ResetState();
void DoRuntimeCall(Instruction* instr); void DoRuntimeCall(Instruction* instr);
...@@ -752,7 +753,7 @@ class Simulator : public DecoderVisitor, public SimulatorBase { ...@@ -752,7 +753,7 @@ class Simulator : public DecoderVisitor, public SimulatorBase {
static const Instruction* kEndOfSimAddress; static const Instruction* kEndOfSimAddress;
void DecodeInstruction(); void DecodeInstruction();
void Run(); void Run();
void RunFrom(Instruction* start); V8_EXPORT_PRIVATE void RunFrom(Instruction* start);
// Simulation helpers. // Simulation helpers.
template <typename T> template <typename T>
......
...@@ -33,8 +33,8 @@ int float16classify(float16 value); ...@@ -33,8 +33,8 @@ int float16classify(float16 value);
// Bit counting. // Bit counting.
int CountLeadingZeros(uint64_t value, int width); int CountLeadingZeros(uint64_t value, int width);
int CountLeadingSignBits(int64_t value, int width); int CountLeadingSignBits(int64_t value, int width);
int CountTrailingZeros(uint64_t value, int width); V8_EXPORT_PRIVATE int CountTrailingZeros(uint64_t value, int width);
int CountSetBits(uint64_t value, int width); V8_EXPORT_PRIVATE int CountSetBits(uint64_t value, int width);
int LowestSetBitPosition(uint64_t value); int LowestSetBitPosition(uint64_t value);
int HighestSetBitPosition(uint64_t value); int HighestSetBitPosition(uint64_t value);
uint64_t LargestPowerOf2Divisor(uint64_t value); uint64_t LargestPowerOf2Divisor(uint64_t value);
......
...@@ -35,7 +35,7 @@ struct CodeCommentEntry { ...@@ -35,7 +35,7 @@ struct CodeCommentEntry {
class CodeCommentsWriter { class CodeCommentsWriter {
public: public:
void Add(uint32_t pc_offset, std::string comment); V8_EXPORT_PRIVATE void Add(uint32_t pc_offset, std::string comment);
void Emit(Assembler* assm); void Emit(Assembler* assm);
size_t entry_count() const; size_t entry_count() const;
uint32_t section_size() const; uint32_t section_size() const;
......
...@@ -14,7 +14,7 @@ typedef unsigned char byte; ...@@ -14,7 +14,7 @@ typedef unsigned char byte;
// Interface and default implementation for converting addresses and // Interface and default implementation for converting addresses and
// register-numbers to text. The default implementation is machine // register-numbers to text. The default implementation is machine
// specific. // specific.
class NameConverter { class V8_EXPORT_PRIVATE NameConverter {
public: public:
virtual ~NameConverter() = default; virtual ~NameConverter() = default;
virtual const char* NameOfCPURegister(int reg) const; virtual const char* NameOfCPURegister(int reg) const;
...@@ -34,7 +34,6 @@ class NameConverter { ...@@ -34,7 +34,6 @@ class NameConverter {
v8::internal::EmbeddedVector<char, 128> tmp_buffer_; v8::internal::EmbeddedVector<char, 128> tmp_buffer_;
}; };
// A generic Disassembler interface // A generic Disassembler interface
class Disassembler { class Disassembler {
public: public:
...@@ -56,7 +55,8 @@ class Disassembler { ...@@ -56,7 +55,8 @@ class Disassembler {
// Writes one disassembled instruction into 'buffer' (0-terminated). // Writes one disassembled instruction into 'buffer' (0-terminated).
// Returns the length of the disassembled machine instruction in bytes. // Returns the length of the disassembled machine instruction in bytes.
int InstructionDecode(v8::internal::Vector<char> buffer, byte* instruction); V8_EXPORT_PRIVATE int InstructionDecode(v8::internal::Vector<char> buffer,
byte* instruction);
// Returns -1 if instruction does not mark the beginning of a constant pool, // Returns -1 if instruction does not mark the beginning of a constant pool,
// or the number of entries in the constant pool beginning here. // or the number of entries in the constant pool beginning here.
......
...@@ -20,8 +20,10 @@ class Disassembler : public AllStatic { ...@@ -20,8 +20,10 @@ class Disassembler : public AllStatic {
// Instruction'. // Instruction'.
// the code object is used for name resolution and may be null. // the code object is used for name resolution and may be null.
// TODO(titzer): accept a {WasmCodeManager*} if {isolate} is null // TODO(titzer): accept a {WasmCodeManager*} if {isolate} is null
static int Decode(Isolate* isolate, std::ostream* os, byte* begin, byte* end, V8_EXPORT_PRIVATE static int Decode(Isolate* isolate, std::ostream* os,
CodeReference code = {}, Address current_pc = kNullAddress); byte* begin, byte* end,
CodeReference code = {},
Address current_pc = kNullAddress);
}; };
} // namespace internal } // namespace internal
......
...@@ -1232,7 +1232,7 @@ bool Object::ToInt32(int32_t* value) { ...@@ -1232,7 +1232,7 @@ bool Object::ToInt32(int32_t* value) {
// static constexpr object declarations need a definition to make the // static constexpr object declarations need a definition to make the
// compiler happy. // compiler happy.
constexpr Object Smi::kZero; constexpr Object Smi::kZero;
constexpr Object SharedFunctionInfo::kNoSharedNameSentinel; V8_EXPORT_PRIVATE constexpr Object SharedFunctionInfo::kNoSharedNameSentinel;
Handle<SharedFunctionInfo> FunctionTemplateInfo::GetOrCreateSharedFunctionInfo( Handle<SharedFunctionInfo> FunctionTemplateInfo::GetOrCreateSharedFunctionInfo(
Isolate* isolate, Handle<FunctionTemplateInfo> info, Isolate* isolate, Handle<FunctionTemplateInfo> info,
......
...@@ -650,9 +650,10 @@ class DependentCode : public WeakFixedArray { ...@@ -650,9 +650,10 @@ class DependentCode : public WeakFixedArray {
}; };
// Register a code dependency of {cell} on {object}. // Register a code dependency of {cell} on {object}.
static void InstallDependency(Isolate* isolate, const MaybeObjectHandle& code, V8_EXPORT_PRIVATE static void InstallDependency(Isolate* isolate,
Handle<HeapObject> object, const MaybeObjectHandle& code,
DependencyGroup group); Handle<HeapObject> object,
DependencyGroup group);
void DeoptimizeDependentCodeGroup(Isolate* isolate, DependencyGroup group); void DeoptimizeDependentCodeGroup(Isolate* isolate, DependencyGroup group);
......
...@@ -227,7 +227,9 @@ class InterpreterData : public Struct { ...@@ -227,7 +227,9 @@ class InterpreterData : public Struct {
class SharedFunctionInfo : public HeapObject { class SharedFunctionInfo : public HeapObject {
public: public:
NEVER_READ_ONLY_SPACE NEVER_READ_ONLY_SPACE
static constexpr Object const kNoSharedNameSentinel = Smi::kZero;
V8_EXPORT_PRIVATE static constexpr Object const kNoSharedNameSentinel =
Smi::kZero;
// [name]: Returns shared name if it exists or an empty string otherwise. // [name]: Returns shared name if it exists or an empty string otherwise.
inline String Name() const; inline String Name() const;
......
...@@ -1514,5 +1514,8 @@ String ConsStringIterator::NextLeaf(bool* blew_stack) { ...@@ -1514,5 +1514,8 @@ String ConsStringIterator::NextLeaf(bool* blew_stack) {
UNREACHABLE(); UNREACHABLE();
} }
template EXPORT_TEMPLATE_DEFINE(V8_EXPORT_PRIVATE) void String::WriteToFlat(
String source, uint16_t* sink, int from, int to);
} // namespace internal } // namespace internal
} // namespace v8 } // namespace v8
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#define V8_OBJECTS_STRING_H_ #define V8_OBJECTS_STRING_H_
#include "src/base/bits.h" #include "src/base/bits.h"
#include "src/base/export-template.h"
#include "src/objects/instance-type.h" #include "src/objects/instance-type.h"
#include "src/objects/name.h" #include "src/objects/name.h"
#include "src/objects/smi.h" #include "src/objects/smi.h"
...@@ -362,8 +363,8 @@ class String : public Name { ...@@ -362,8 +363,8 @@ class String : public Name {
// Helper function for flattening strings. // Helper function for flattening strings.
template <typename sinkchar> template <typename sinkchar>
V8_EXPORT_PRIVATE static void WriteToFlat(String source, sinkchar* sink, EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE)
int from, int to); static void WriteToFlat(String source, sinkchar* sink, int from, int to);
// The return value may point to the first aligned word containing the first // The return value may point to the first aligned word containing the first
// non-one-byte character, rather than directly to the non-one-byte character. // non-one-byte character, rather than directly to the non-one-byte character.
...@@ -457,6 +458,11 @@ class String : public Name { ...@@ -457,6 +458,11 @@ class String : public Name {
OBJECT_CONSTRUCTORS(String, Name); OBJECT_CONSTRUCTORS(String, Name);
}; };
// clang-format off
extern template EXPORT_TEMPLATE_DECLARE(V8_EXPORT_PRIVATE)
void String::WriteToFlat(String source, uint16_t* sink, int from, int to);
// clang-format on
class SubStringRange { class SubStringRange {
public: public:
inline SubStringRange(String string, const DisallowHeapAllocation& no_gc, inline SubStringRange(String string, const DisallowHeapAllocation& no_gc,
......
...@@ -1513,7 +1513,8 @@ class RegExpEngine: public AllStatic { ...@@ -1513,7 +1513,8 @@ class RegExpEngine: public AllStatic {
static bool TooMuchRegExpCode(Isolate* isolate, Handle<String> pattern); static bool TooMuchRegExpCode(Isolate* isolate, Handle<String> pattern);
static void DotPrint(const char* label, RegExpNode* node, bool ignore_case); V8_EXPORT_PRIVATE static void DotPrint(const char* label, RegExpNode* node,
bool ignore_case);
}; };
......
...@@ -120,7 +120,7 @@ struct WasmElemSegment { ...@@ -120,7 +120,7 @@ struct WasmElemSegment {
// Used in the {entries} vector to represent a `ref.null` entry in a passive // Used in the {entries} vector to represent a `ref.null` entry in a passive
// segment. // segment.
static const uint32_t kNullIndex = ~0u; V8_EXPORT_PRIVATE static const uint32_t kNullIndex = ~0u;
uint32_t table_index; uint32_t table_index;
WasmInitExpr offset; WasmInitExpr offset;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include "src/handles-inl.h" #include "src/handles-inl.h"
#include "src/isolate.h" #include "src/isolate.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/objects/shared-function-info-inl.h"
#include "src/utils.h" #include "src/utils.h"
#include "test/cctest/cctest.h" #include "test/cctest/cctest.h"
......
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