Commit f72b919b authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cctest] Add V8_EXPORT_PRIVATE for cctest (src/ part)

Bug: v8:9020

Change-Id: Ie624a02598f5c3a43e40e03d0337c17ca5cc3769
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541052
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60628}
parent c5e4df37
......@@ -114,7 +114,7 @@ class Accessors : public AllStatic {
Local<v8::Name> property, Local<v8::Value> value,
const PropertyCallbackInfo<v8::Boolean>& info);
static Handle<AccessorInfo> MakeAccessor(
V8_EXPORT_PRIVATE static Handle<AccessorInfo> MakeAccessor(
Isolate* isolate, Handle<Name> name, AccessorNameGetterCallback getter,
AccessorNameBooleanSetterCallback setter);
......
......@@ -80,7 +80,7 @@ class FreeStoreAllocationPolicy {
// Call free to release memory allocated with this function.
void* AllocWithRetry(size_t size);
void* AlignedAlloc(size_t size, size_t alignment);
V8_EXPORT_PRIVATE void* AlignedAlloc(size_t size, size_t alignment);
void AlignedFree(void *ptr);
// Returns platfrom page allocator instance. Guaranteed to be a valid pointer.
......
......@@ -375,8 +375,9 @@ class HandleScopeImplementer {
void FreeThreadResources();
// Garbage collection support.
void Iterate(v8::internal::RootVisitor* v);
static char* Iterate(v8::internal::RootVisitor* v, char* data);
V8_EXPORT_PRIVATE void Iterate(v8::internal::RootVisitor* v);
V8_EXPORT_PRIVATE static char* Iterate(v8::internal::RootVisitor* v,
char* data);
inline internal::Address* GetSpareOrNewBlock();
inline void DeleteExtensions(internal::Address* prev_limit);
......
......@@ -376,7 +376,7 @@ class PredictableCodeSizeScope {
// Enable a specified feature within a scope.
class CpuFeatureScope {
class V8_EXPORT_PRIVATE CpuFeatureScope {
public:
enum CheckPolicy {
kCheckSupported,
......
......@@ -76,8 +76,8 @@ class PerThreadAssertScope {
template <PerIsolateAssertType type, bool allow>
class PerIsolateAssertScope {
public:
explicit PerIsolateAssertScope(Isolate* isolate);
~PerIsolateAssertScope();
V8_EXPORT_PRIVATE explicit PerIsolateAssertScope(Isolate* isolate);
V8_EXPORT_PRIVATE ~PerIsolateAssertScope();
static bool IsAllowed(Isolate* isolate);
......
......@@ -38,7 +38,7 @@ class BasicBlockProfiler {
explicit Data(size_t n_blocks);
~Data() = default;
void ResetCounts();
V8_EXPORT_PRIVATE void ResetCounts();
const size_t n_blocks_;
std::vector<int32_t> block_rpo_numbers_;
......@@ -56,7 +56,7 @@ class BasicBlockProfiler {
V8_EXPORT_PRIVATE static BasicBlockProfiler* Get();
Data* NewData(size_t n_blocks);
void ResetCounts();
V8_EXPORT_PRIVATE void ResetCounts();
const DataList* data_list() { return &data_list_; }
......
......@@ -52,8 +52,9 @@ enum BignumDtoaMode {
// Halfway cases are again rounded up.
// 'BignumDtoa' expects the given buffer to be big enough to hold all digits
// and a terminating null-character.
void BignumDtoa(double v, BignumDtoaMode mode, int requested_digits,
Vector<char> buffer, int* length, int* point);
V8_EXPORT_PRIVATE void BignumDtoa(double v, BignumDtoaMode mode,
int requested_digits, Vector<char> buffer,
int* length, int* point);
} // namespace internal
} // namespace v8
......
......@@ -10,7 +10,7 @@
namespace v8 {
namespace internal {
class Bignum {
class V8_EXPORT_PRIVATE Bignum {
public:
// 3584 = 128 * 28. We can represent 2^3584 > 10^1000 accurately.
// This bignum can encode much bigger numbers, since it contains an
......
......@@ -11,7 +11,7 @@
namespace v8 {
namespace internal {
class BitVector : public ZoneObject {
class V8_EXPORT_PRIVATE BitVector : public ZoneObject {
public:
union DataStorage {
uintptr_t* ptr_; // valid if data_length_ > 1
......@@ -34,7 +34,7 @@ class BitVector : public ZoneObject {
~Iterator() = default;
bool Done() const { return current_index_ >= target_->data_length_; }
void Advance();
V8_EXPORT_PRIVATE void Advance();
int Current() const {
DCHECK(!Done());
......
......@@ -15,7 +15,7 @@ namespace internal {
typedef compiler::CodeAssemblerState CodeAssemblerState;
class PromiseBuiltinsAssembler : public CodeStubAssembler {
class V8_EXPORT_PRIVATE PromiseBuiltinsAssembler : public CodeStubAssembler {
public:
explicit PromiseBuiltinsAssembler(compiler::CodeAssemblerState* state)
: CodeStubAssembler(state) {}
......
......@@ -134,8 +134,8 @@ class StringTrimAssembler : public StringBuiltinsAssembler {
explicit StringTrimAssembler(compiler::CodeAssemblerState* state)
: StringBuiltinsAssembler(state) {}
void GotoIfNotWhiteSpaceOrLineTerminator(Node* const char_code,
Label* const if_not_whitespace);
V8_EXPORT_PRIVATE void GotoIfNotWhiteSpaceOrLineTerminator(
Node* const char_code, Label* const if_not_whitespace);
protected:
void Generate(String::TrimMode mode, const char* method, TNode<IntPtrT> argc,
......
......@@ -81,7 +81,7 @@ class Builtins {
// Used by CreateOffHeapTrampolines in isolate.cc.
void set_builtin(int index, Code builtin);
Code builtin(int index);
V8_EXPORT_PRIVATE Code builtin(int index);
V8_EXPORT_PRIVATE Handle<Code> builtin_handle(int index);
V8_EXPORT_PRIVATE static Callable CallableFor(Isolate* isolate, Name name);
......
......@@ -10,6 +10,7 @@
#include <vector>
#include "include/v8-internal.h"
#include "src/base/macros.h"
namespace v8 {
namespace internal {
......@@ -44,7 +45,7 @@ class CodeCommentsWriter {
std::vector<CodeCommentEntry> comments_;
};
class CodeCommentsIterator {
class V8_EXPORT_PRIVATE CodeCommentsIterator {
public:
// Address can be kNullAddress. In this case HasCurrent() will return false.
explicit CodeCommentsIterator(Address code_comments_start);
......
......@@ -3571,10 +3571,10 @@ TNode<CollectionType> CodeStubAssembler::AllocateSmallOrderedHashTable(
return table;
}
template TNode<SmallOrderedHashMap>
template V8_EXPORT_PRIVATE TNode<SmallOrderedHashMap>
CodeStubAssembler::AllocateSmallOrderedHashTable<SmallOrderedHashMap>(
TNode<IntPtrT> capacity);
template TNode<SmallOrderedHashSet>
template V8_EXPORT_PRIVATE TNode<SmallOrderedHashSet>
CodeStubAssembler::AllocateSmallOrderedHashTable<SmallOrderedHashSet>(
TNode<IntPtrT> capacity);
......@@ -8489,12 +8489,15 @@ void CodeStubAssembler::NameDictionaryLookup(
}
// Instantiate template methods to workaround GCC compilation issue.
template void CodeStubAssembler::NameDictionaryLookup<NameDictionary>(
TNode<NameDictionary>, TNode<Name>, Label*, TVariable<IntPtrT>*, Label*,
int, LookupMode);
template void CodeStubAssembler::NameDictionaryLookup<GlobalDictionary>(
TNode<GlobalDictionary>, TNode<Name>, Label*, TVariable<IntPtrT>*, Label*,
int, LookupMode);
template V8_EXPORT_PRIVATE void
CodeStubAssembler::NameDictionaryLookup<NameDictionary>(TNode<NameDictionary>,
TNode<Name>, Label*,
TVariable<IntPtrT>*,
Label*, int,
LookupMode);
template V8_EXPORT_PRIVATE void CodeStubAssembler::NameDictionaryLookup<
GlobalDictionary>(TNode<GlobalDictionary>, TNode<Name>, Label*,
TVariable<IntPtrT>*, Label*, int, LookupMode);
Node* CodeStubAssembler::ComputeUnseededHash(Node* key) {
// See v8::internal::ComputeUnseededHash()
......
......@@ -2538,9 +2538,10 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
// Calculates array index for given dictionary entry and entry field.
// See Dictionary::EntryToIndex().
template <typename Dictionary>
TNode<IntPtrT> EntryToIndex(TNode<IntPtrT> entry, int field_index);
V8_EXPORT_PRIVATE TNode<IntPtrT> EntryToIndex(TNode<IntPtrT> entry,
int field_index);
template <typename Dictionary>
TNode<IntPtrT> EntryToIndex(TNode<IntPtrT> entry) {
V8_EXPORT_PRIVATE TNode<IntPtrT> EntryToIndex(TNode<IntPtrT> entry) {
return EntryToIndex<Dictionary>(entry, Dictionary::kEntryKeyIndex);
}
......@@ -3478,7 +3479,7 @@ class V8_EXPORT_PRIVATE CodeStubAssembler
int additional_offset = 0);
};
class CodeStubArguments {
class V8_EXPORT_PRIVATE CodeStubArguments {
public:
typedef compiler::Node Node;
template <class T>
......
......@@ -150,7 +150,7 @@ class CompilationCacheRegExp: public CompilationSubCache {
// scripts and evals. The shared function infos are looked up using
// the source string as the key. For regular expressions the
// compilation data is cached.
class CompilationCache {
class V8_EXPORT_PRIVATE CompilationCache {
public:
// Finds the script shared function info for a source
// string. Returns an empty handle if the cache doesn't contain a
......@@ -240,7 +240,6 @@ class CompilationCache {
DISALLOW_COPY_AND_ASSIGN(CompilationCache);
};
} // namespace internal
} // namespace v8
......
......@@ -375,8 +375,9 @@ class ScriptContextTable : public FixedArray {
// valid information about its location.
// If it returns false, `result` is untouched.
V8_WARN_UNUSED_RESULT
static bool Lookup(Isolate* isolate, ScriptContextTable table, String name,
LookupResult* result);
V8_EXPORT_PRIVATE static bool Lookup(Isolate* isolate,
ScriptContextTable table, String name,
LookupResult* result);
V8_WARN_UNUSED_RESULT
static Handle<ScriptContextTable> Extend(Handle<ScriptContextTable> table,
......@@ -551,7 +552,7 @@ class Context : public HeapObject {
inline void set_extension(HeapObject object);
JSObject extension_object();
JSReceiver extension_receiver();
ScopeInfo scope_info();
V8_EXPORT_PRIVATE ScopeInfo scope_info();
// Find the module context (assuming there is one) and return the associated
// module object.
......@@ -566,7 +567,7 @@ class Context : public HeapObject {
Context closure_context();
// Returns a JSGlobalProxy object or null.
JSGlobalProxy global_proxy();
V8_EXPORT_PRIVATE JSGlobalProxy global_proxy();
void set_global_proxy(JSGlobalProxy global);
// Get the JSGlobalObject object.
......@@ -595,7 +596,7 @@ class Context : public HeapObject {
// The native context also stores a list of all optimized code and a
// list of all deoptimized code, which are needed by the deoptimizer.
void AddOptimizedCode(Code code);
V8_EXPORT_PRIVATE void AddOptimizedCode(Code code);
void SetOptimizedCodeListHead(Object head);
Object OptimizedCodeListHead();
void SetDeoptimizedCodeListHead(Object head);
......
......@@ -93,7 +93,8 @@ double StringToDouble(Vector<const uint8_t> str, int flags,
double StringToDouble(Vector<const uc16> str, int flags,
double empty_string_val = 0);
// This version expects a zero-terminated character array.
double StringToDouble(const char* str, int flags, double empty_string_val = 0);
double V8_EXPORT_PRIVATE StringToDouble(const char* str, int flags,
double empty_string_val = 0);
double StringToInt(Isolate* isolate, Handle<String> string, int radix);
......@@ -171,7 +172,7 @@ inline bool TryNumberToSize(Object number, size_t* result);
inline size_t NumberToSize(Object number);
// returns DoubleToString(StringToDouble(string)) == string
bool IsSpecialIndex(String string);
V8_EXPORT_PRIVATE bool IsSpecialIndex(String string);
} // namespace internal
} // namespace v8
......
......@@ -204,7 +204,7 @@ class StatsCounter : public StatsCounterBase {
};
// Thread safe version of StatsCounter.
class StatsCounterThreadSafe : public StatsCounterBase {
class V8_EXPORT_PRIVATE StatsCounterThreadSafe : public StatsCounterBase {
public:
void Set(int Value);
void Increment();
......@@ -288,10 +288,10 @@ enum class HistogramTimerResolution { MILLISECOND, MICROSECOND };
class TimedHistogram : public Histogram {
public:
// Start the timer. Log if isolate non-null.
void Start(base::ElapsedTimer* timer, Isolate* isolate);
V8_EXPORT_PRIVATE void Start(base::ElapsedTimer* timer, Isolate* isolate);
// Stop the timer and record the results. Log if isolate non-null.
void Stop(base::ElapsedTimer* timer, Isolate* isolate);
V8_EXPORT_PRIVATE void Stop(base::ElapsedTimer* timer, Isolate* isolate);
// Records a TimeDelta::Max() result. Useful to record percentage of tasks
// that never got to run in a given scenario. Log if isolate non-null.
......
......@@ -68,7 +68,7 @@ enum CpuFeature {
// } else {
// // Generate alternative code.
// }
class CpuFeatures : public AllStatic {
class V8_EXPORT_PRIVATE CpuFeatures : public AllStatic {
public:
static void Probe(bool cross_compile) {
STATIC_ASSERT(NUMBER_OF_CPU_FEATURES <= kBitsPerInt);
......
......@@ -12,7 +12,7 @@
namespace v8 {
namespace internal {
class DateCache {
class V8_EXPORT_PRIVATE DateCache {
public:
static const int kMsPerMin = 60 * 1000;
static const int kSecPerDay = 24 * 60 * 60;
......
......@@ -36,11 +36,11 @@ v8_inspector::V8Inspector* GetInspector(Isolate* isolate);
// Schedule a debugger break to happen when function is called inside given
// isolate.
void SetBreakOnNextFunctionCall(Isolate* isolate);
V8_EXPORT_PRIVATE void SetBreakOnNextFunctionCall(Isolate* isolate);
// Remove scheduled debugger break in given isolate if it has not
// happened yet.
void ClearBreakOnNextFunctionCall(Isolate* isolate);
V8_EXPORT_PRIVATE void ClearBreakOnNextFunctionCall(Isolate* isolate);
/**
* Returns array of internal properties specific to the value type. Result has
......@@ -54,7 +54,8 @@ MaybeLocal<Array> GetInternalProperties(Isolate* isolate, Local<Value> value);
* the following format: [<name>, <value>,...,<name>, <value>]. Result array
* will be allocated in the current context.
*/
MaybeLocal<Array> GetPrivateFields(Local<Context> context, Local<Object> value);
V8_EXPORT_PRIVATE MaybeLocal<Array> GetPrivateFields(Local<Context> context,
Local<Object> value);
enum ExceptionBreakState {
NoBreakOnException = 0,
......@@ -82,7 +83,7 @@ enum StepAction {
void PrepareStep(Isolate* isolate, StepAction action);
void ClearStepping(Isolate* isolate);
void BreakRightNow(Isolate* isolate);
V8_EXPORT_PRIVATE void BreakRightNow(Isolate* isolate);
bool AllFramesOnStackAreBlackboxed(Isolate* isolate);
......@@ -156,7 +157,8 @@ class WasmScript : public Script {
uint32_t GetFunctionHash(int function_index);
};
void GetLoadedScripts(Isolate* isolate, PersistentValueVector<Script>& scripts);
V8_EXPORT_PRIVATE void GetLoadedScripts(Isolate* isolate,
PersistentValueVector<Script>& scripts);
MaybeLocal<UnboundScript> CompileInspectorScript(Isolate* isolate,
Local<String> source);
......@@ -184,7 +186,8 @@ class DebugDelegate {
}
};
void SetDebugDelegate(Isolate* isolate, DebugDelegate* listener);
V8_EXPORT_PRIVATE void SetDebugDelegate(Isolate* isolate,
DebugDelegate* listener);
class AsyncEventDelegate {
public:
......@@ -368,7 +371,7 @@ class V8_EXPORT_PRIVATE TypeProfile {
std::shared_ptr<i::TypeProfile> type_profile_;
};
class ScopeIterator {
class V8_EXPORT_PRIVATE ScopeIterator {
public:
static std::unique_ptr<ScopeIterator> CreateForFunction(
v8::Isolate* isolate, v8::Local<v8::Function> func);
......@@ -407,7 +410,7 @@ class ScopeIterator {
DISALLOW_COPY_AND_ASSIGN(ScopeIterator);
};
class StackTraceIterator {
class V8_EXPORT_PRIVATE StackTraceIterator {
public:
static std::unique_ptr<StackTraceIterator> Create(Isolate* isolate,
int index = 0);
......@@ -457,9 +460,9 @@ enum class NativeAccessorType {
int64_t GetNextRandomInt64(v8::Isolate* isolate);
v8::MaybeLocal<v8::Value> EvaluateGlobal(v8::Isolate* isolate,
v8::Local<v8::String> source,
bool throw_on_side_effect);
V8_EXPORT_PRIVATE v8::MaybeLocal<v8::Value> EvaluateGlobal(
v8::Isolate* isolate, v8::Local<v8::String> source,
bool throw_on_side_effect);
int GetDebuggingId(v8::Local<v8::Function> function);
......
......@@ -121,7 +121,7 @@ class BreakLocation {
friend class BreakIterator;
};
class BreakIterator {
class V8_EXPORT_PRIVATE BreakIterator {
public:
explicit BreakIterator(Handle<DebugInfo> debug_info);
......@@ -207,7 +207,7 @@ class DebugFeatureTracker {
// active breakpoints in them. This debug info is held in the heap root object
// debug_info which is a FixedArray. Each entry in this list is of class
// DebugInfo.
class Debug {
class V8_EXPORT_PRIVATE Debug {
public:
// Debug event triggers.
void OnDebugBreak(Handle<FixedArray> break_points_hit);
......
......@@ -54,7 +54,7 @@ struct SourceChangeRange {
9. swap scripts.
*/
class LiveEdit : AllStatic {
class V8_EXPORT_PRIVATE LiveEdit : AllStatic {
public:
static void InitializeThreadLocal(Debug* debug);
......
......@@ -66,11 +66,11 @@ enum class DeoptimizeReason : uint8_t {
#undef DEOPTIMIZE_REASON
};
std::ostream& operator<<(std::ostream&, DeoptimizeReason);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, DeoptimizeReason);
size_t hash_value(DeoptimizeReason reason);
char const* DeoptimizeReasonToString(DeoptimizeReason reason);
V8_EXPORT_PRIVATE char const* DeoptimizeReasonToString(DeoptimizeReason reason);
} // namespace internal
} // namespace v8
......
......@@ -458,7 +458,7 @@ class Deoptimizer : public Malloced {
static void DeoptimizeFunction(JSFunction function, Code code = Code());
// Deoptimize all code in the given isolate.
static void DeoptimizeAll(Isolate* isolate);
V8_EXPORT_PRIVATE static void DeoptimizeAll(Isolate* isolate);
// Deoptimizes all optimized code that has been previously marked
// (via code->set_marked_for_deoptimization) and unlinks all functions that
......@@ -489,7 +489,7 @@ class Deoptimizer : public Malloced {
return OFFSET_OF(Deoptimizer, caller_frame_top_);
}
static int GetDeoptimizedCodeCount(Isolate* isolate);
V8_EXPORT_PRIVATE static int GetDeoptimizedCodeCount(Isolate* isolate);
static const int kNotDeoptimizationEntry = -1;
......
......@@ -64,9 +64,10 @@ class Disassembler {
// Write disassembly into specified file 'f' using specified NameConverter
// (see constructor).
static void Disassemble(FILE* f, byte* begin, byte* end,
UnimplementedOpcodeAction unimplemented_action =
kAbortOnUnimplementedOpcode);
V8_EXPORT_PRIVATE static void Disassemble(
FILE* f, byte* begin, byte* end,
UnimplementedOpcodeAction unimplemented_action =
kAbortOnUnimplementedOpcode);
private:
const NameConverter& converter_;
......
......@@ -8,6 +8,7 @@
#include <stdint.h>
#include "src/base/logging.h"
#include "src/base/macros.h"
namespace v8 {
namespace internal {
......@@ -45,7 +46,7 @@ class DiyFp {
// this = this * other.
void Multiply(const DiyFp& other);
V8_EXPORT_PRIVATE void Multiply(const DiyFp& other);
// returns a * b;
static DiyFp Times(const DiyFp& a, const DiyFp& b) {
......
......@@ -56,8 +56,9 @@ const int kBase10MaximalLength = 17;
// and a terminating null-character. In SHORTEST-mode it expects a buffer of
// at least kBase10MaximalLength + 1. Otherwise, the size of the output is
// limited to requested_digits digits plus the null terminator.
void DoubleToAscii(double v, DtoaMode mode, int requested_digits,
Vector<char> buffer, int* sign, int* length, int* point);
V8_EXPORT_PRIVATE void DoubleToAscii(double v, DtoaMode mode,
int requested_digits, Vector<char> buffer,
int* sign, int* length, int* point);
} // namespace internal
} // namespace v8
......
......@@ -86,8 +86,8 @@ constexpr int kFastElementsKindCount =
constexpr int kFastElementsKindPackedToHoley =
HOLEY_SMI_ELEMENTS - PACKED_SMI_ELEMENTS;
int ElementsKindToShiftSize(ElementsKind elements_kind);
int ElementsKindToByteSize(ElementsKind elements_kind);
V8_EXPORT_PRIVATE int ElementsKindToShiftSize(ElementsKind elements_kind);
V8_EXPORT_PRIVATE int ElementsKindToByteSize(ElementsKind elements_kind);
int GetDefaultHeaderSizeForElementsKind(ElementsKind elements_kind);
const char* ElementsKindToString(ElementsKind kind);
......
......@@ -48,11 +48,10 @@ class Execution final : public AllStatic {
// If message_handling is MessageHandling::kReport, exceptions (except for
// termination exceptions) will be stored in exception_out (if not a
// nullptr).
static MaybeHandle<Object> TryCall(Isolate* isolate, Handle<Object> callable,
Handle<Object> receiver, int argc,
Handle<Object> argv[],
MessageHandling message_handling,
MaybeHandle<Object>* exception_out);
V8_EXPORT_PRIVATE static MaybeHandle<Object> TryCall(
Isolate* isolate, Handle<Object> callable, Handle<Object> receiver,
int argc, Handle<Object> argv[], MessageHandling message_handling,
MaybeHandle<Object>* exception_out);
// Convenience method for performing RunMicrotasks
static MaybeHandle<Object> TryRunMicrotasks(
Isolate* isolate, MicrotaskQueue* microtask_queue,
......
......@@ -288,9 +288,10 @@ class ExternalReference {
template <typename SubjectChar, typename PatternChar>
static ExternalReference search_string_raw();
static ExternalReference FromRawAddress(Address address);
V8_EXPORT_PRIVATE static ExternalReference FromRawAddress(Address address);
#define DECL_EXTERNAL_REFERENCE(name, desc) static ExternalReference name();
#define DECL_EXTERNAL_REFERENCE(name, desc) \
V8_EXPORT_PRIVATE static ExternalReference name();
EXTERNAL_REFERENCE_LIST(DECL_EXTERNAL_REFERENCE)
#undef DECL_EXTERNAL_REFERENCE
......
......@@ -50,12 +50,9 @@ const int kFastDtoaMaximalLength = 17;
// If there are two values that are equally close, then FastDtoa returns
// false.
// For both modes the buffer must be large enough to hold the result.
bool FastDtoa(double d,
FastDtoaMode mode,
int requested_digits,
Vector<char> buffer,
int* length,
int* decimal_point);
V8_EXPORT_PRIVATE bool FastDtoa(double d, FastDtoaMode mode,
int requested_digits, Vector<char> buffer,
int* length, int* decimal_point);
} // namespace internal
} // namespace v8
......
......@@ -138,7 +138,8 @@ inline LanguageMode GetLanguageModeFromSlotKind(FeedbackSlotKind kind) {
: LanguageMode::kStrict;
}
std::ostream& operator<<(std::ostream& os, FeedbackSlotKind kind);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
FeedbackSlotKind kind);
typedef std::vector<MaybeObjectHandle> MaybeObjectHandles;
......@@ -255,7 +256,7 @@ class FeedbackVector : public HeapObject {
inline MaybeObjectSlot slots_start();
// Returns slot kind for given slot.
FeedbackSlotKind GetKind(FeedbackSlot slot) const;
V8_EXPORT_PRIVATE FeedbackSlotKind GetKind(FeedbackSlot slot) const;
FeedbackSlot GetTypeProfileSlot() const;
......@@ -288,7 +289,7 @@ class FeedbackVector : public HeapObject {
return GetLanguageModeFromSlotKind(GetKind(slot));
}
static void AssertNoLegacyTypes(MaybeObject object);
V8_EXPORT_PRIVATE static void AssertNoLegacyTypes(MaybeObject object);
DECL_PRINTER(FeedbackVector)
DECL_VERIFIER(FeedbackVector)
......@@ -520,7 +521,7 @@ class FeedbackMetadata : public HeapObject {
inline bool is_empty() const;
// Returns slot kind for given slot.
FeedbackSlotKind GetKind(FeedbackSlot slot) const;
V8_EXPORT_PRIVATE FeedbackSlotKind GetKind(FeedbackSlot slot) const;
// If {spec} is null, then it is considered empty.
V8_EXPORT_PRIVATE static Handle<FeedbackMetadata> New(
......@@ -621,7 +622,7 @@ class FeedbackMetadataIterator {
};
// A FeedbackNexus is the combination of a FeedbackVector and a slot.
class FeedbackNexus final {
class V8_EXPORT_PRIVATE FeedbackNexus final {
public:
FeedbackNexus(Handle<FeedbackVector> vector, FeedbackSlot slot)
: vector_handle_(vector), slot_(slot) {
......
......@@ -19,11 +19,12 @@ class FieldType : public Object {
public:
static FieldType None();
static FieldType Any();
static Handle<FieldType> None(Isolate* isolate);
static Handle<FieldType> Any(Isolate* isolate);
static FieldType Class(Map map);
static Handle<FieldType> Class(Handle<Map> map, Isolate* isolate);
static FieldType cast(Object object);
V8_EXPORT_PRIVATE static Handle<FieldType> None(Isolate* isolate);
V8_EXPORT_PRIVATE static Handle<FieldType> Any(Isolate* isolate);
V8_EXPORT_PRIVATE static FieldType Class(Map map);
V8_EXPORT_PRIVATE static Handle<FieldType> Class(Handle<Map> map,
Isolate* isolate);
V8_EXPORT_PRIVATE static FieldType cast(Object object);
static FieldType unchecked_cast(Object object) {
return FieldType(object.ptr());
}
......
......@@ -26,8 +26,9 @@ namespace internal {
//
// This method only works for some parameters. If it can't handle the input it
// returns false. The output is null-terminated when the function succeeds.
bool FastFixedDtoa(double v, int fractional_count,
Vector<char> buffer, int* length, int* decimal_point);
V8_EXPORT_PRIVATE bool FastFixedDtoa(double v, int fractional_count,
Vector<char> buffer, int* length,
int* decimal_point);
} // namespace internal
} // namespace v8
......
......@@ -249,7 +249,7 @@ class StackFrame {
virtual Code unchecked_code() const = 0;
// Search for the code associated with this frame.
Code LookupCode() const;
V8_EXPORT_PRIVATE Code LookupCode() const;
virtual void Iterate(RootVisitor* v) const = 0;
static void IteratePc(RootVisitor* v, Address* pc_address,
......@@ -449,7 +449,7 @@ class BuiltinExitFrame : public ExitFrame {
class StandardFrame;
class FrameSummary {
class V8_EXPORT_PRIVATE FrameSummary {
public:
// Subclasses for the different summary kinds:
#define FRAME_SUMMARY_VARIANTS(F) \
......@@ -1216,15 +1216,15 @@ class StackFrameIteratorBase {
class StackFrameIterator: public StackFrameIteratorBase {
public:
// An iterator that iterates over the isolate's current thread's stack,
explicit StackFrameIterator(Isolate* isolate);
V8_EXPORT_PRIVATE explicit StackFrameIterator(Isolate* isolate);
// An iterator that iterates over a given thread's stack.
StackFrameIterator(Isolate* isolate, ThreadLocalTop* t);
V8_EXPORT_PRIVATE StackFrameIterator(Isolate* isolate, ThreadLocalTop* t);
StackFrame* frame() const {
DCHECK(!done());
return frame_;
}
void Advance();
V8_EXPORT_PRIVATE void Advance();
private:
// Go back to the first frame.
......@@ -1242,7 +1242,7 @@ class JavaScriptFrameIterator {
inline JavaScriptFrame* frame() const;
bool done() const { return iterator_.done(); }
void Advance();
V8_EXPORT_PRIVATE void Advance();
void AdvanceOneFrame() { iterator_.Advance(); }
private:
......@@ -1252,7 +1252,7 @@ class JavaScriptFrameIterator {
// NOTE: The stack trace frame iterator is an iterator that only traverse proper
// JavaScript frames that have proper JavaScript functions and WebAssembly
// frames.
class StackTraceFrameIterator {
class V8_EXPORT_PRIVATE StackTraceFrameIterator {
public:
explicit StackTraceFrameIterator(Isolate* isolate);
// Skip frames until the frame with the given id is reached.
......@@ -1272,7 +1272,6 @@ class StackTraceFrameIterator {
bool IsValidFrame(StackFrame* frame) const;
};
class SafeStackFrameIterator: public StackFrameIteratorBase {
public:
SafeStackFrameIterator(Isolate* isolate,
......
......@@ -39,7 +39,7 @@ enum WeaknessType {
// Global handles hold handles that are independent of stack-state and can have
// callbacks and finalizers attached to them.
class GlobalHandles final {
class V8_EXPORT_PRIVATE GlobalHandles final {
public:
template <class NodeType>
class NodeBlock;
......@@ -269,7 +269,7 @@ class EternalHandles final {
~EternalHandles();
// Create an EternalHandle, overwriting the index.
void Create(Isolate* isolate, Object object, int* index);
V8_EXPORT_PRIVATE void Create(Isolate* isolate, Object object, int* index);
// Grab the handle for an existing EternalHandle.
inline Handle<Object> Get(int index) {
......
......@@ -16,7 +16,7 @@ class CodeAssemblerState;
class ExitPoint;
class AccessorAssembler : public CodeStubAssembler {
class V8_EXPORT_PRIVATE AccessorAssembler : public CodeStubAssembler {
public:
using Node = compiler::Node;
template <class T>
......
......@@ -28,8 +28,7 @@ class SCTableReference {
friend class StubCache;
};
class StubCache {
class V8_EXPORT_PRIVATE StubCache {
public:
struct Entry {
// The values here have plain Address types because they are read
......
......@@ -17,7 +17,7 @@ class Heap;
// Base class of identity maps contains shared code for all template
// instantions.
class IdentityMapBase {
class V8_EXPORT_PRIVATE IdentityMapBase {
public:
bool empty() const { return size_ == 0; }
int size() const { return size_; }
......@@ -49,8 +49,8 @@ class IdentityMapBase {
Address KeyAtIndex(int index) const;
V8_EXPORT_PRIVATE RawEntry EntryAtIndex(int index) const;
V8_EXPORT_PRIVATE int NextIndex(int index) const;
RawEntry EntryAtIndex(int index) const;
int NextIndex(int index) const;
void EnableIteration();
void DisableIteration();
......
......@@ -581,7 +581,7 @@ class Isolate final : private HiddenFactory {
inline void set_pending_exception(Object exception_obj);
inline void clear_pending_exception();
bool AreWasmThreadsEnabled(Handle<Context> context);
V8_EXPORT_PRIVATE bool AreWasmThreadsEnabled(Handle<Context> context);
THREAD_LOCAL_TOP_ADDRESS(Object, pending_exception)
......@@ -678,10 +678,8 @@ class Isolate final : private HiddenFactory {
Handle<Object> pending_exception_;
};
void SetCaptureStackTraceForUncaughtExceptions(
bool capture,
int frame_limit,
StackTrace::StackTraceOptions options);
V8_EXPORT_PRIVATE void SetCaptureStackTraceForUncaughtExceptions(
bool capture, int frame_limit, StackTrace::StackTraceOptions options);
void SetAbortOnUncaughtExceptionCallback(
v8::Isolate::AbortOnUncaughtExceptionCallback callback);
......@@ -791,18 +789,19 @@ class Isolate final : private HiddenFactory {
bool ComputeLocation(MessageLocation* target);
bool ComputeLocationFromException(MessageLocation* target,
Handle<Object> exception);
bool ComputeLocationFromStackTrace(MessageLocation* target,
Handle<Object> exception);
V8_EXPORT_PRIVATE bool ComputeLocationFromStackTrace(
MessageLocation* target, Handle<Object> exception);
Handle<JSMessageObject> CreateMessage(Handle<Object> exception,
MessageLocation* location);
V8_EXPORT_PRIVATE Handle<JSMessageObject> CreateMessage(
Handle<Object> exception, MessageLocation* location);
// Out of resource exception helpers.
Object StackOverflow();
Object TerminateExecution();
void CancelTerminateExecution();
void RequestInterrupt(InterruptCallback callback, void* data);
V8_EXPORT_PRIVATE void RequestInterrupt(InterruptCallback callback,
void* data);
void InvokeApiInterruptCallbacks();
// Administration
......@@ -1043,13 +1042,13 @@ class Isolate final : private HiddenFactory {
bool IsDead() { return has_fatal_error_; }
void SignalFatalError() { has_fatal_error_ = true; }
bool use_optimizer();
V8_EXPORT_PRIVATE bool use_optimizer();
bool initialized_from_snapshot() { return initialized_from_snapshot_; }
bool NeedsSourcePositionsForProfiling() const;
bool NeedsDetailedOptimizedCodeLineInfo() const;
V8_EXPORT_PRIVATE bool NeedsDetailedOptimizedCodeLineInfo() const;
bool is_best_effort_code_coverage() const {
return code_coverage_mode() == debug::CoverageMode::kBestEffort;
......@@ -1096,7 +1095,7 @@ class Isolate final : private HiddenFactory {
return date_cache_;
}
void set_date_cache(DateCache* date_cache);
V8_EXPORT_PRIVATE void set_date_cache(DateCache* date_cache);
#ifdef V8_INTL_SUPPORT
......@@ -1130,7 +1129,7 @@ class Isolate final : private HiddenFactory {
// Isolate::context is not set up, e.g. when calling directly into C++ from
// CSA.
bool IsNoElementsProtectorIntact(Context context);
bool IsNoElementsProtectorIntact();
V8_EXPORT_PRIVATE bool IsNoElementsProtectorIntact();
bool IsArrayOrObjectOrStringPrototype(Object object);
......@@ -1256,7 +1255,7 @@ class Isolate final : private HiddenFactory {
int id() const { return id_; }
CompilationStatistics* GetTurboStatistics();
CodeTracer* GetCodeTracer();
V8_EXPORT_PRIVATE CodeTracer* GetCodeTracer();
void DumpAndResetStats();
......@@ -1279,7 +1278,7 @@ class Isolate final : private HiddenFactory {
int GenerateIdentityHash(uint32_t mask);
// Given an address occupied by a live code object, return that object.
Code FindCodeObject(Address a);
V8_EXPORT_PRIVATE Code FindCodeObject(Address a);
int NextOptimizationId() {
int id = next_optimization_id_++;
......@@ -1309,7 +1308,8 @@ class Isolate final : private HiddenFactory {
Handle<Symbol> SymbolFor(RootIndex dictionary_index, Handle<String> name,
bool private_symbol);
void SetUseCounterCallback(v8::Isolate::UseCounterCallback callback);
V8_EXPORT_PRIVATE void SetUseCounterCallback(
v8::Isolate::UseCounterCallback callback);
void CountUsage(v8::Isolate::UseCounterFeature feature);
static std::string GetTurboCfgFileName(Isolate* isolate);
......@@ -1347,9 +1347,10 @@ class Isolate final : private HiddenFactory {
double timeout_in_ms,
AtomicsWaitWakeHandle* stop_handle);
void SetPromiseHook(PromiseHook hook);
void RunPromiseHook(PromiseHookType type, Handle<JSPromise> promise,
Handle<Object> parent);
V8_EXPORT_PRIVATE void SetPromiseHook(PromiseHook hook);
V8_EXPORT_PRIVATE void RunPromiseHook(PromiseHookType type,
Handle<JSPromise> promise,
Handle<Object> parent);
void PromiseHookStateUpdated();
void AddDetachedContext(Handle<Context> context);
......@@ -1375,8 +1376,8 @@ class Isolate final : private HiddenFactory {
// builtins constants table to remain unchanged from build-time.
size_t HashIsolateForEmbeddedBlob();
static const uint8_t* CurrentEmbeddedBlob();
static uint32_t CurrentEmbeddedBlobSize();
V8_EXPORT_PRIVATE static const uint8_t* CurrentEmbeddedBlob();
V8_EXPORT_PRIVATE static uint32_t CurrentEmbeddedBlobSize();
static bool CurrentEmbeddedBlobIsBinaryEmbedded();
// These always return the same result as static methods above, but don't
......@@ -1422,12 +1423,13 @@ class Isolate final : private HiddenFactory {
void SetHostImportModuleDynamicallyCallback(
HostImportModuleDynamicallyCallback callback);
MaybeHandle<JSPromise> RunHostImportModuleDynamicallyCallback(
Handle<Script> referrer, Handle<Object> specifier);
V8_EXPORT_PRIVATE MaybeHandle<JSPromise>
RunHostImportModuleDynamicallyCallback(Handle<Script> referrer,
Handle<Object> specifier);
void SetHostInitializeImportMetaObjectCallback(
HostInitializeImportMetaObjectCallback callback);
Handle<JSObject> RunHostInitializeImportMetaObjectCallback(
V8_EXPORT_PRIVATE Handle<JSObject> RunHostInitializeImportMetaObjectCallback(
Handle<Module> module);
void RegisterEmbeddedFileWriter(EmbeddedFileWriterInterface* writer) {
......@@ -1479,7 +1481,8 @@ class Isolate final : private HiddenFactory {
bool allow_atomics_wait() { return allow_atomics_wait_; }
// Register a finalizer to be called at isolate teardown.
void RegisterManagedPtrDestructor(ManagedPtrDestructor* finalizer);
V8_EXPORT_PRIVATE void RegisterManagedPtrDestructor(
ManagedPtrDestructor* finalizer);
// Removes a previously-registered shared object finalizer.
void UnregisterManagedPtrDestructor(ManagedPtrDestructor* finalizer);
......@@ -1490,7 +1493,8 @@ class Isolate final : private HiddenFactory {
}
wasm::WasmEngine* wasm_engine() const { return wasm_engine_.get(); }
void SetWasmEngine(std::shared_ptr<wasm::WasmEngine> engine);
V8_EXPORT_PRIVATE void SetWasmEngine(
std::shared_ptr<wasm::WasmEngine> engine);
const v8::Context::BackupIncumbentScope* top_backup_incumbent_scope() const {
return top_backup_incumbent_scope_;
......@@ -1500,14 +1504,14 @@ class Isolate final : private HiddenFactory {
top_backup_incumbent_scope_ = top_backup_incumbent_scope;
}
void SetIdle(bool is_idle);
V8_EXPORT_PRIVATE void SetIdle(bool is_idle);
private:
explicit Isolate(std::unique_ptr<IsolateAllocator> isolate_allocator);
~Isolate();
bool Init(ReadOnlyDeserializer* read_only_deserializer,
StartupDeserializer* startup_deserializer);
V8_EXPORT_PRIVATE bool Init(ReadOnlyDeserializer* read_only_deserializer,
StartupDeserializer* startup_deserializer);
void CheckIsolateLayout();
......@@ -1700,7 +1704,7 @@ class Isolate final : private HiddenFactory {
double time_millis_at_init_ = 0;
#ifdef DEBUG
static std::atomic<size_t> non_disposed_isolates_;
V8_EXPORT_PRIVATE static std::atomic<size_t> non_disposed_isolates_;
JSObject::SpillInformation js_spill_information_;
#endif
......
......@@ -27,7 +27,7 @@ namespace internal {
// to it. GC uses layout descriptors to iterate objects. Avoid heap pointers
// in a layout descriptor because they can lead to data races in GC when
// GC moves objects in parallel.
class LayoutDescriptor : public ByteArray {
class V8_EXPORT_PRIVATE LayoutDescriptor : public ByteArray {
public:
V8_INLINE bool IsTagged(int field_index);
......@@ -145,7 +145,6 @@ class LayoutDescriptor : public ByteArray {
OBJECT_CONSTRUCTORS(LayoutDescriptor, ByteArray);
};
// LayoutDescriptorHelper is a helper class for querying layout descriptor
// about whether the field at given offset is tagged or not.
class LayoutDescriptorHelper {
......@@ -160,8 +159,8 @@ class LayoutDescriptorHelper {
// otherwise and writes the offset of the end of the contiguous region to
// |out_end_of_contiguous_region_offset|. The |end_offset| value is the
// upper bound for |out_end_of_contiguous_region_offset|.
bool IsTagged(int offset_in_bytes, int end_offset,
int* out_end_of_contiguous_region_offset);
V8_EXPORT_PRIVATE bool IsTagged(int offset_in_bytes, int end_offset,
int* out_end_of_contiguous_region_offset);
private:
bool all_fields_tagged_;
......
......@@ -53,7 +53,7 @@ class Log {
// This mode is only used in tests, as temporary files are automatically
// deleted on close and thus can't be accessed afterwards.
static const char* const kLogToTemporaryFile;
V8_EXPORT_PRIVATE static const char* const kLogToTemporaryFile;
static const char* const kLogToConsole;
// Utility class for formatting log messages. It escapes the given messages
......
......@@ -127,15 +127,15 @@ class Logger : public CodeEventListener {
sampler::Sampler* sampler();
void StopProfilerThread();
V8_EXPORT_PRIVATE void StopProfilerThread();
// Frees resources acquired in SetUp.
// When a temporary file is used for the log, returns its stream descriptor,
// leaving the file open.
FILE* TearDown();
V8_EXPORT_PRIVATE FILE* TearDown();
// Emits an event with a string value -> (name, value).
void StringEvent(const char* name, const char* value);
V8_EXPORT_PRIVATE void StringEvent(const char* name, const char* value);
// Emits an event with an int value -> (name, value).
void IntPtrTEvent(const char* name, intptr_t value);
......@@ -180,8 +180,8 @@ class Logger : public CodeEventListener {
void ApiEntryCall(const char* name);
// ==== Events logged by --log-code. ====
void AddCodeEventListener(CodeEventListener* listener);
void RemoveCodeEventListener(CodeEventListener* listener);
V8_EXPORT_PRIVATE void AddCodeEventListener(CodeEventListener* listener);
V8_EXPORT_PRIVATE void RemoveCodeEventListener(CodeEventListener* listener);
// Emits a code event for a callback function.
void CallbackEvent(Name name, Address entry_point) override;
......@@ -261,11 +261,11 @@ class Logger : public CodeEventListener {
void LogExistingFunction(Handle<SharedFunctionInfo> shared,
Handle<AbstractCode> code);
// Logs all compiled functions found in the heap.
void LogCompiledFunctions();
V8_EXPORT_PRIVATE void LogCompiledFunctions();
// Logs all accessor callbacks found in the heap.
void LogAccessorCallbacks();
V8_EXPORT_PRIVATE void LogAccessorCallbacks();
// Used for logging stubs found in the snapshot.
void LogCodeObjects();
V8_EXPORT_PRIVATE void LogCodeObjects();
// Logs all Maps found on the heap.
void LogAllMaps();
......@@ -386,7 +386,7 @@ class TimerEventScope {
Isolate* isolate_;
};
class CodeEventLogger : public CodeEventListener {
class V8_EXPORT_PRIVATE CodeEventLogger : public CodeEventListener {
public:
explicit CodeEventLogger(Isolate* isolate);
~CodeEventLogger() override;
......
......@@ -31,7 +31,7 @@ class SharedFunctionInfo;
class SourceInfo;
class WasmInstanceObject;
class MessageLocation {
class V8_EXPORT_PRIVATE MessageLocation {
public:
MessageLocation(Handle<Script> script, int start_pos, int end_pos);
MessageLocation(Handle<Script> script, int start_pos, int end_pos,
......@@ -279,9 +279,11 @@ class MessageFormatter {
public:
static const char* TemplateString(MessageTemplate index);
static MaybeHandle<String> Format(Isolate* isolate, MessageTemplate index,
Handle<String> arg0, Handle<String> arg1,
Handle<String> arg2);
V8_EXPORT_PRIVATE static MaybeHandle<String> Format(Isolate* isolate,
MessageTemplate index,
Handle<String> arg0,
Handle<String> arg1,
Handle<String> arg2);
static Handle<String> Format(Isolate* isolate, MessageTemplate index,
Handle<Object> arg);
......@@ -293,13 +295,14 @@ class MessageFormatter {
class MessageHandler {
public:
// Returns a message object for the API to use.
static Handle<JSMessageObject> MakeMessageObject(
V8_EXPORT_PRIVATE static Handle<JSMessageObject> MakeMessageObject(
Isolate* isolate, MessageTemplate type, const MessageLocation* location,
Handle<Object> argument, Handle<FixedArray> stack_frames);
// Report a formatted message (needs JS allocation).
static void ReportMessage(Isolate* isolate, const MessageLocation* loc,
Handle<JSMessageObject> message);
V8_EXPORT_PRIVATE static void ReportMessage(Isolate* isolate,
const MessageLocation* loc,
Handle<JSMessageObject> message);
static void DefaultMessageReport(Isolate* isolate, const MessageLocation* loc,
Handle<Object> message_obj);
......
......@@ -57,7 +57,8 @@ class PendingCompilationErrorHandler {
// Handle warnings detected during compilation.
void ReportWarnings(Isolate* isolate, Handle<Script> script);
Handle<String> FormatErrorMessageForTest(Isolate* isolate) const;
V8_EXPORT_PRIVATE Handle<String> FormatErrorMessageForTest(
Isolate* isolate) const;
void set_unidentifiable_error() {
has_pending_error_ = true;
......
......@@ -402,8 +402,8 @@ inline PropertyConstness GeneralizeConstness(PropertyConstness a,
return a == PropertyConstness::kMutable ? PropertyConstness::kMutable : b;
}
std::ostream& operator<<(std::ostream& os,
const PropertyAttributes& attributes);
V8_EXPORT_PRIVATE std::ostream& operator<<(
std::ostream& os, const PropertyAttributes& attributes);
} // namespace internal
} // namespace v8
......
......@@ -22,7 +22,7 @@ namespace internal {
// Each descriptor has a key, property attributes, property type,
// property index (in the actual instance-descriptor array) and
// optionally a piece of data.
class Descriptor final {
class V8_EXPORT_PRIVATE Descriptor final {
public:
Descriptor();
......
......@@ -379,7 +379,7 @@ class RelocInfoWriter {
// }
//
// A mask can be specified to skip unwanted modes.
class RelocIterator : public Malloced {
class V8_EXPORT_PRIVATE RelocIterator : public Malloced {
public:
// Create a new iterator positioned at
// the beginning of the reloc info.
......
......@@ -705,14 +705,14 @@ class Runtime : public AllStatic {
Isolate* isolate, Handle<JSReceiver> receiver, Handle<Object> key,
LanguageMode language_mode);
V8_WARN_UNUSED_RESULT static MaybeHandle<Object> SetObjectProperty(
Isolate* isolate, Handle<Object> object, Handle<Object> key,
Handle<Object> value, StoreOrigin store_origin,
Maybe<ShouldThrow> should_throw = Nothing<ShouldThrow>());
V8_WARN_UNUSED_RESULT static MaybeHandle<Object> GetObjectProperty(
Isolate* isolate, Handle<Object> object, Handle<Object> key,
bool* is_found_out = nullptr);
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static MaybeHandle<Object>
SetObjectProperty(Isolate* isolate, Handle<Object> object, Handle<Object> key,
Handle<Object> value, StoreOrigin store_origin,
Maybe<ShouldThrow> should_throw = Nothing<ShouldThrow>());
V8_EXPORT_PRIVATE V8_WARN_UNUSED_RESULT static MaybeHandle<Object>
GetObjectProperty(Isolate* isolate, Handle<Object> object, Handle<Object> key,
bool* is_found_out = nullptr);
V8_WARN_UNUSED_RESULT static MaybeHandle<Object> HasProperty(
Isolate* isolate, Handle<Object> object, Handle<Object> key);
......
......@@ -214,7 +214,7 @@ class SafepointTableBuilder {
// Emit the safepoint table after the body. The number of bits per
// entry must be enough to hold all the pointer indexes.
void Emit(Assembler* assembler, int bits_per_entry);
V8_EXPORT_PRIVATE void Emit(Assembler* assembler, int bits_per_entry);
// Find the Deoptimization Info with pc offset {pc} and update its
// trampoline field. Calling this function ensures that the safepoint
......
......@@ -5,6 +5,8 @@
#ifndef V8_SETUP_ISOLATE_H_
#define V8_SETUP_ISOLATE_H_
#include "src/base/macros.h"
namespace v8 {
namespace internal {
......@@ -30,7 +32,7 @@ class Interpreter;
// The actual implementations of generation of builtins and handlers is in
// setup-builtins-internal.cc and setup-interpreter-internal.cc, and is
// linked in by the latter two Delegate implementations.
class SetupIsolateDelegate {
class V8_EXPORT_PRIVATE SetupIsolateDelegate {
public:
explicit SetupIsolateDelegate(bool create_heap_objects)
: create_heap_objects_(create_heap_objects) {}
......
......@@ -187,7 +187,7 @@ class StringStream final {
// Mentioned object cache support.
void PrintMentionedObjectCache(Isolate* isolate);
static void ClearMentionedObjectCache(Isolate* isolate);
V8_EXPORT_PRIVATE static void ClearMentionedObjectCache(Isolate* isolate);
#ifdef DEBUG
bool IsMentionedObjectCacheClear(Isolate* isolate);
#endif
......
......@@ -12,7 +12,7 @@ namespace internal {
// The buffer must only contain digits in the range [0-9]. It must not
// contain a dot or a sign. It must not start with '0', and must not be empty.
double Strtod(Vector<const char> buffer, int exponent);
V8_EXPORT_PRIVATE double Strtod(Vector<const char> buffer, int exponent);
} // namespace internal
} // namespace v8
......
......@@ -17,7 +17,7 @@
* Altered to match V8's use case.
*/
#include <stdint.h>
#include "src/third_party/siphash/halfsiphash.h"
#include "src/base/logging.h"
#include "src/base/v8-fallthrough.h"
......
......@@ -13,5 +13,7 @@
*/
#include <cstdint>
#include "src/base/macros.h"
uint32_t halfsiphash(const uint32_t value, const uint64_t seed);
V8_EXPORT_PRIVATE uint32_t halfsiphash(const uint32_t value,
const uint64_t seed);
......@@ -5,6 +5,8 @@
#ifndef V8_THREAD_ID_H_
#define V8_THREAD_ID_H_
#include "src/base/macros.h"
namespace v8 {
namespace internal {
......@@ -41,7 +43,7 @@ class ThreadId {
explicit constexpr ThreadId(int id) noexcept : id_(id) {}
static int GetCurrentThreadId();
V8_EXPORT_PRIVATE static int GetCurrentThreadId();
int id_;
};
......
......@@ -298,7 +298,7 @@ const uint64_t kNoId = 0;
class TraceEventHelper {
public:
static v8::TracingController* GetTracingController();
V8_EXPORT_PRIVATE static v8::TracingController* GetTracingController();
};
// TraceID encapsulates an ID that can either be an integer or pointer. Pointers
......
......@@ -16,7 +16,7 @@
namespace v8 {
namespace tracing {
class TracedValue : public ConvertableToTraceFormat {
class V8_EXPORT_PRIVATE TracedValue : public ConvertableToTraceFormat {
public:
~TracedValue() override;
......
......@@ -36,7 +36,7 @@ namespace internal {
// the target map's descriptor array. Stored transitions are weak in the GC
// sense: both single transitions stored inline and TransitionArray fields are
// cleared when the map they refer to is not otherwise reachable.
class TransitionsAccessor {
class V8_EXPORT_PRIVATE TransitionsAccessor {
public:
TransitionsAccessor(Isolate* isolate, Map map, DisallowHeapAllocation* no_gc)
: isolate_(isolate), map_(map) {
......@@ -238,7 +238,7 @@ class TransitionArray : public WeakFixedArray {
int GetSortedKeyIndex(int transition_number) { return transition_number; }
inline int number_of_entries() const;
#ifdef DEBUG
bool IsSortedNoDuplicates(int valid_entries = -1);
V8_EXPORT_PRIVATE bool IsSortedNoDuplicates(int valid_entries = -1);
#endif
void Sort();
......
......@@ -228,21 +228,21 @@ struct ToUppercase {
uchar* result,
bool* allow_caching_ptr);
};
struct Ecma262Canonicalize {
struct V8_EXPORT_PRIVATE Ecma262Canonicalize {
static const int kMaxWidth = 1;
static int Convert(uchar c,
uchar n,
uchar* result,
bool* allow_caching_ptr);
};
struct Ecma262UnCanonicalize {
struct V8_EXPORT_PRIVATE Ecma262UnCanonicalize {
static const int kMaxWidth = 4;
static int Convert(uchar c,
uchar n,
uchar* result,
bool* allow_caching_ptr);
};
struct CanonicalizationRange {
struct V8_EXPORT_PRIVATE CanonicalizationRange {
static const int kMaxWidth = 1;
static int Convert(uchar c,
uchar n,
......
......@@ -840,7 +840,8 @@ class FeedbackSlot {
bool operator!=(FeedbackSlot that) const { return !(*this == that); }
friend size_t hash_value(FeedbackSlot slot) { return slot.ToInt(); }
friend std::ostream& operator<<(std::ostream& os, FeedbackSlot);
V8_EXPORT_PRIVATE friend std::ostream& operator<<(std::ostream& os,
FeedbackSlot);
private:
static const int kInvalidSlot = -1;
......@@ -848,6 +849,7 @@ class FeedbackSlot {
int id_;
};
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, FeedbackSlot);
class BailoutId {
public:
......@@ -924,7 +926,8 @@ void PRINTF_FORMAT(2, 3) PrintIsolate(void* isolate, const char* format, ...);
// Safe formatting print. Ensures that str is always null-terminated.
// Returns the number of chars written, or -1 if output was truncated.
int PRINTF_FORMAT(2, 3) SNPrintF(Vector<char> str, const char* format, ...);
V8_EXPORT_PRIVATE int PRINTF_FORMAT(2, 3)
SNPrintF(Vector<char> str, const char* format, ...);
V8_EXPORT_PRIVATE int PRINTF_FORMAT(2, 0)
VSNPrintF(Vector<char> str, const char* format, va_list args);
......@@ -979,7 +982,8 @@ int WriteAsCFile(const char* filename, const char* varname,
// On return, *exits tells whether the file existed.
V8_EXPORT_PRIVATE std::string ReadFile(const char* filename, bool* exists,
bool verbose = true);
std::string ReadFile(FILE* file, bool* exists, bool verbose = true);
V8_EXPORT_PRIVATE std::string ReadFile(FILE* file, bool* exists,
bool verbose = true);
class StringBuilder : public SimpleStringBuilder {
public:
......@@ -1009,7 +1013,7 @@ bool StringToArrayIndex(Stream* stream, uint32_t* index);
// GetCurrentStackPosition() should not be inlined, because it works on stack
// frames if it were inlined into a function with a huge stack frame it would
// return an address significantly above the actual current stack position.
V8_NOINLINE uintptr_t GetCurrentStackPosition();
V8_EXPORT_PRIVATE V8_NOINLINE uintptr_t GetCurrentStackPosition();
static inline uint16_t ByteReverse16(uint16_t value) {
#if V8_HAS_BUILTIN_BSWAP16
......
......@@ -34,7 +34,7 @@ class V8 : public AllStatic {
V8_EXPORT_PRIVATE static v8::Platform* GetCurrentPlatform();
// Replaces the current platform with the given platform.
// Should be used only for testing.
static void SetPlatformForTesting(v8::Platform* platform);
V8_EXPORT_PRIVATE static void SetPlatformForTesting(v8::Platform* platform);
static void SetNativesBlob(StartupData* natives_blob);
static void SetSnapshotBlob(StartupData* snapshot_blob);
......
......@@ -15,7 +15,7 @@ namespace internal {
template <typename T>
class Vector;
class Version {
class V8_EXPORT Version {
public:
// Return the various version components.
static int GetMajor() { return major_; }
......
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