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