Commit 2bcbc4b6 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cctest] Add V8_EXPORT_PRIVATE for cctest (compiler part)

Bug: v8:9020

Change-Id: If32de05a48bddf5f746b2a3ea810ee350f6a7dda
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541051
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarGeorg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60540}
parent db94d2aa
......@@ -86,7 +86,7 @@ class DeoptimizationLiteral {
};
// Generates native code for a sequence of instructions.
class CodeGenerator final : public GapResolver::Assembler {
class V8_EXPORT_PRIVATE CodeGenerator final : public GapResolver::Assembler {
public:
explicit CodeGenerator(Zone* codegen_zone, Frame* frame, Linkage* linkage,
InstructionSequence* instructions,
......
......@@ -30,7 +30,7 @@ class GapResolver final {
: assembler_(assembler), split_rep_(MachineRepresentation::kSimd128) {}
// Resolve a set of parallel moves, emitting assembler instructions.
void Resolve(ParallelMove* parallel_move);
V8_EXPORT_PRIVATE void Resolve(ParallelMove* parallel_move);
private:
// Performs the given move, possibly performing other moves to unblock the
......
......@@ -28,13 +28,14 @@ enum ArchOpcodeFlags {
class InstructionScheduler final : public ZoneObject {
public:
InstructionScheduler(Zone* zone, InstructionSequence* sequence);
V8_EXPORT_PRIVATE InstructionScheduler(Zone* zone,
InstructionSequence* sequence);
void StartBlock(RpoNumber rpo);
void EndBlock(RpoNumber rpo);
V8_EXPORT_PRIVATE void StartBlock(RpoNumber rpo);
V8_EXPORT_PRIVATE void EndBlock(RpoNumber rpo);
void AddInstruction(Instruction* instr);
void AddTerminator(Instruction* instr);
V8_EXPORT_PRIVATE void AddInstruction(Instruction* instr);
V8_EXPORT_PRIVATE void AddTerminator(Instruction* instr);
static bool SchedulerSupported();
......@@ -143,7 +144,7 @@ class InstructionScheduler final : public ZoneObject {
void ScheduleBlock();
// Return the scheduling properties of the given instruction.
int GetInstructionFlags(const Instruction* instr) const;
V8_EXPORT_PRIVATE int GetInstructionFlags(const Instruction* instr) const;
int GetTargetInstructionFlags(const Instruction* instr) const;
// Check whether the given instruction has side effects (e.g. function call,
......
......@@ -705,7 +705,7 @@ class V8_EXPORT_PRIVATE MoveOperands final
DISALLOW_COPY_AND_ASSIGN(MoveOperands);
};
std::ostream& operator<<(std::ostream&, const MoveOperands&);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&, const MoveOperands&);
class V8_EXPORT_PRIVATE ParallelMove final
: public NON_EXPORTED_BASE(ZoneVector<MoveOperands*>),
......
......@@ -13,7 +13,7 @@ namespace compiler {
// Forwards jumps to empty basic blocks that end with a second jump to the
// destination of the second jump, transitively.
class JumpThreading {
class V8_EXPORT_PRIVATE JumpThreading {
public:
// Compute the forwarding map of basic blocks to their ultimate destination.
// Returns {true} if there is at least one block that is forwarded.
......
......@@ -1464,7 +1464,7 @@ class V8_EXPORT_PRIVATE CodeAssembler {
DISALLOW_COPY_AND_ASSIGN(CodeAssembler);
};
class CodeAssemblerVariable {
class V8_EXPORT_PRIVATE CodeAssemblerVariable {
public:
explicit CodeAssemblerVariable(CodeAssembler* assembler,
MachineRepresentation rep);
......@@ -1534,7 +1534,7 @@ class TypedCodeAssemblerVariable : public CodeAssemblerVariable {
using CodeAssemblerVariable::Bind;
};
class CodeAssemblerLabel {
class V8_EXPORT_PRIVATE CodeAssemblerLabel {
public:
enum Type { kDeferred, kNonDeferred };
......@@ -1714,7 +1714,7 @@ class V8_EXPORT_PRIVATE CodeAssemblerState {
DISALLOW_COPY_AND_ASSIGN(CodeAssemblerState);
};
class CodeAssemblerScopedExceptionHandler {
class V8_EXPORT_PRIVATE CodeAssemblerScopedExceptionHandler {
public:
CodeAssemblerScopedExceptionHandler(
CodeAssembler* assembler, CodeAssemblerExceptionHandlerLabel* label);
......
......@@ -438,7 +438,8 @@ V8_EXPORT_PRIVATE IfValueParameters const& IfValueParametersOf(
const FrameStateInfo& FrameStateInfoOf(const Operator* op)
V8_WARN_UNUSED_RESULT;
Handle<HeapObject> HeapConstantOf(const Operator* op) V8_WARN_UNUSED_RESULT;
V8_EXPORT_PRIVATE Handle<HeapObject> HeapConstantOf(const Operator* op)
V8_WARN_UNUSED_RESULT;
const StringConstantBase* StringConstantBaseOf(const Operator* op)
V8_WARN_UNUSED_RESULT;
......
......@@ -86,7 +86,7 @@ class CallDescriptor;
// | return q-1 | v v
// -----+-----------------+----- <-- stack ptr -------------
//
class Frame : public ZoneObject {
class V8_EXPORT_PRIVATE Frame : public ZoneObject {
public:
explicit Frame(int fixed_frame_size_in_slots);
......@@ -177,7 +177,6 @@ class Frame : public ZoneObject {
DISALLOW_COPY_AND_ASSIGN(Frame);
};
// Represents an offset from either the stack pointer or frame pointer.
class FrameOffset {
public:
......@@ -215,7 +214,7 @@ class FrameAccessState : public ZoneObject {
has_frame_(false) {}
const Frame* frame() const { return frame_; }
void MarkHasFrame(bool state);
V8_EXPORT_PRIVATE void MarkHasFrame(bool state);
int sp_delta() const { return sp_delta_; }
void ClearSPDelta() { sp_delta_ = 0; }
......
......@@ -64,7 +64,7 @@ V8_INLINE V8_EXPORT_PRIVATE NodeOriginAsJSON AsJSON(const NodeOrigin& no) {
std::ostream& operator<<(std::ostream& out, const SourcePositionAsJSON& pos);
// Small helper that deduplicates SharedFunctionInfos.
class SourceIdAssigner {
class V8_EXPORT_PRIVATE SourceIdAssigner {
public:
explicit SourceIdAssigner(size_t size) {
printed_.reserve(size);
......
......@@ -32,7 +32,7 @@ struct OuterContext {
//
// The context can be the incoming function context or any outer context
// thereof, as indicated by {outer}'s {distance}.
class JSContextSpecialization final : public AdvancedReducer {
class V8_EXPORT_PRIVATE JSContextSpecialization final : public AdvancedReducer {
public:
JSContextSpecialization(Editor* editor, JSGraph* jsgraph,
JSHeapBroker* broker, Maybe<OuterContext> outer,
......
......@@ -96,7 +96,7 @@ class PerIsolateCompilerCache;
HEAP_BROKER_OBJECT_LIST(FORWARD_DECL)
#undef FORWARD_DECL
class ObjectRef {
class V8_EXPORT_PRIVATE ObjectRef {
public:
ObjectRef(JSHeapBroker* broker, Handle<Object> object);
ObjectRef(JSHeapBroker* broker, ObjectData* data)
......@@ -232,7 +232,7 @@ class JSBoundFunctionRef : public JSObjectRef {
FixedArrayRef bound_arguments() const;
};
class JSFunctionRef : public JSObjectRef {
class V8_EXPORT_PRIVATE JSFunctionRef : public JSObjectRef {
public:
using JSObjectRef::JSObjectRef;
Handle<JSFunction> object() const;
......@@ -416,7 +416,7 @@ class AllocationSiteRef : public HeapObjectRef {
bool CanInlineCall() const;
};
class MapRef : public HeapObjectRef {
class V8_EXPORT_PRIVATE MapRef : public HeapObjectRef {
public:
using HeapObjectRef::HeapObjectRef;
Handle<Map> object() const;
......@@ -543,7 +543,7 @@ class ScopeInfoRef : public HeapObjectRef {
V(bool, is_safe_to_skip_arguments_adaptor) \
V(bool, IsInlineable)
class SharedFunctionInfoRef : public HeapObjectRef {
class V8_EXPORT_PRIVATE SharedFunctionInfoRef : public HeapObjectRef {
public:
using HeapObjectRef::HeapObjectRef;
Handle<SharedFunctionInfo> object() const;
......
......@@ -446,7 +446,8 @@ bool operator!=(PropertyAccess const&, PropertyAccess const&);
size_t hash_value(PropertyAccess const&);
std::ostream& operator<<(std::ostream&, PropertyAccess const&);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream&,
PropertyAccess const&);
PropertyAccess const& PropertyAccessOf(const Operator* op);
......
......@@ -148,8 +148,8 @@ class V8_EXPORT_PRIVATE Operator : public NON_EXPORTED_BASE(ZoneObject) {
DEFINE_OPERATORS_FOR_FLAGS(Operator::Properties)
std::ostream& operator<<(std::ostream& os, const Operator& op);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
const Operator& op);
// Default equality function for below Operator1<*> class.
template <typename T>
......
......@@ -82,7 +82,7 @@ class Pipeline : public AllStatic {
// Run the pipeline on JavaScript bytecode and generate code.
// If requested, hands out the heap broker, which is allocated
// in {info}'s zone.
static MaybeHandle<Code> GenerateCodeForTesting(
V8_EXPORT_PRIVATE static MaybeHandle<Code> GenerateCodeForTesting(
OptimizedCompilationInfo* info, Isolate* isolate,
JSHeapBroker** out_broker = nullptr);
......
......@@ -273,7 +273,7 @@ class UseInfo {
// Contains logic related to changing the representation of values for constants
// and other nodes, as well as lowering Simplified->Machine operators.
// Eagerly folds any representation changes for constants.
class RepresentationChanger final {
class V8_EXPORT_PRIVATE RepresentationChanger final {
public:
RepresentationChanger(JSGraph* jsgraph, Isolate* isolate);
......
......@@ -306,10 +306,11 @@ class CheckMinusZeroParameters {
VectorSlotPair feedback_;
};
const CheckMinusZeroParameters& CheckMinusZeroParametersOf(const Operator* op)
V8_WARN_UNUSED_RESULT;
V8_EXPORT_PRIVATE const CheckMinusZeroParameters& CheckMinusZeroParametersOf(
const Operator* op) V8_WARN_UNUSED_RESULT;
std::ostream& operator<<(std::ostream&, const CheckMinusZeroParameters& params);
V8_EXPORT_PRIVATE std::ostream& operator<<(
std::ostream&, const CheckMinusZeroParameters& params);
size_t hash_value(const CheckMinusZeroParameters& params);
......
......@@ -15,7 +15,7 @@ namespace v8 {
namespace internal {
namespace compiler {
class TypeCache final {
class V8_EXPORT_PRIVATE TypeCache final {
private:
// This has to be first for the initialization magic to work.
AccountingAllocator allocator;
......
......@@ -125,16 +125,14 @@ enum class WasmImportCallKind : uint8_t {
kUseCallBuiltin
};
WasmImportCallKind GetWasmImportCallKind(Handle<JSReceiver> callable,
wasm::FunctionSig* sig,
bool has_bigint_feature);
V8_EXPORT_PRIVATE WasmImportCallKind
GetWasmImportCallKind(Handle<JSReceiver> callable, wasm::FunctionSig* sig,
bool has_bigint_feature);
// Compiles an import call wrapper, which allows WASM to call imports.
wasm::WasmCode* CompileWasmImportCallWrapper(wasm::WasmEngine*,
wasm::NativeModule*,
WasmImportCallKind,
wasm::FunctionSig*,
bool source_positions);
V8_EXPORT_PRIVATE wasm::WasmCode* CompileWasmImportCallWrapper(
wasm::WasmEngine*, wasm::NativeModule*, WasmImportCallKind,
wasm::FunctionSig*, bool source_positions);
// Creates a code object calling a wasm function with the given signature,
// callable from JS.
......@@ -144,7 +142,7 @@ V8_EXPORT_PRIVATE MaybeHandle<Code> CompileJSToWasmWrapper(Isolate*,
// Compiles a stub that redirects a call to a wasm function to the wasm
// interpreter. It's ABI compatible with the compiled wasm function.
wasm::WasmCompilationResult CompileWasmInterpreterEntry(
V8_EXPORT_PRIVATE wasm::WasmCompilationResult CompileWasmInterpreterEntry(
wasm::WasmEngine*, const wasm::WasmFeatures& enabled_features,
uint32_t func_index, wasm::FunctionSig*);
......@@ -188,9 +186,9 @@ class WasmGraphBuilder {
kNoExtraCallableParam = false
};
WasmGraphBuilder(wasm::CompilationEnv* env, Zone* zone, MachineGraph* mcgraph,
wasm::FunctionSig* sig,
compiler::SourcePositionTable* spt = nullptr);
V8_EXPORT_PRIVATE WasmGraphBuilder(
wasm::CompilationEnv* env, Zone* zone, MachineGraph* mcgraph,
wasm::FunctionSig* sig, compiler::SourcePositionTable* spt = nullptr);
Node** Buffer(size_t count) {
if (count > cur_bufsize_) {
......@@ -367,9 +365,9 @@ class WasmGraphBuilder {
wasm::FunctionSig* GetFunctionSignature() { return sig_; }
void LowerInt64();
V8_EXPORT_PRIVATE void LowerInt64();
void SimdScalarLoweringForTesting();
V8_EXPORT_PRIVATE void SimdScalarLoweringForTesting();
void SetSourcePosition(Node* node, wasm::WasmCodePosition position);
......
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