Commit 0d8bea8f authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cctest] Add V8_EXPORT_PRIVATE for cctest (regexp part)

Bug: v8:9020
Change-Id: I405d27541f76d1347ae91e5ab426ede72edb1f32
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541045
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60573}
parent d746be9c
......@@ -12,7 +12,8 @@
namespace v8 {
namespace internal {
class RegExpMacroAssemblerARM: public NativeRegExpMacroAssembler {
class V8_EXPORT_PRIVATE RegExpMacroAssemblerARM
: public NativeRegExpMacroAssembler {
public:
RegExpMacroAssemblerARM(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save);
......
......@@ -12,7 +12,8 @@
namespace v8 {
namespace internal {
class RegExpMacroAssemblerARM64: public NativeRegExpMacroAssembler {
class V8_EXPORT_PRIVATE RegExpMacroAssemblerARM64
: public NativeRegExpMacroAssembler {
public:
RegExpMacroAssemblerARM64(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save);
......
......@@ -12,7 +12,8 @@
namespace v8 {
namespace internal {
class RegExpMacroAssemblerIA32: public NativeRegExpMacroAssembler {
class V8_EXPORT_PRIVATE RegExpMacroAssemblerIA32
: public NativeRegExpMacroAssembler {
public:
RegExpMacroAssemblerIA32(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save);
......
......@@ -12,7 +12,7 @@
namespace v8 {
namespace internal {
class IrregexpInterpreter {
class V8_EXPORT_PRIVATE IrregexpInterpreter {
public:
enum Result { RETRY = -2, EXCEPTION = -1, FAILURE = 0, SUCCESS = 1 };
STATIC_ASSERT(EXCEPTION == static_cast<int>(RegExpImpl::RE_EXCEPTION));
......@@ -25,7 +25,6 @@ class IrregexpInterpreter {
int start_position);
};
} // namespace internal
} // namespace v8
......
......@@ -207,7 +207,7 @@ class OutSet: public ZoneObject {
public:
OutSet() : first_(0), remaining_(nullptr), successors_(nullptr) {}
OutSet* Extend(unsigned value, Zone* zone);
bool Get(unsigned value) const;
V8_EXPORT_PRIVATE bool Get(unsigned value) const;
static const unsigned kFirstLimit = 32;
private:
......@@ -272,8 +272,8 @@ class DispatchTable : public ZoneObject {
}
};
void AddRange(CharacterRange range, int value, Zone* zone);
OutSet* Get(uc32 value);
V8_EXPORT_PRIVATE void AddRange(CharacterRange range, int value, Zone* zone);
V8_EXPORT_PRIVATE OutSet* Get(uc32 value);
void Dump();
template <typename Callback>
......@@ -294,7 +294,8 @@ class DispatchTable : public ZoneObject {
// Categorizes character ranges into BMP, non-BMP, lead, and trail surrogates.
class UnicodeRangeSplitter {
public:
UnicodeRangeSplitter(Zone* zone, ZoneList<CharacterRange>* base);
V8_EXPORT_PRIVATE UnicodeRangeSplitter(Zone* zone,
ZoneList<CharacterRange>* base);
void Call(uc32 from, DispatchTable::Entry entry);
ZoneList<CharacterRange>* bmp() { return bmp_; }
......@@ -318,7 +319,6 @@ class UnicodeRangeSplitter {
ZoneList<CharacterRange>* non_bmp_;
};
#define FOR_EACH_NODE_TYPE(VISIT) \
VISIT(End) \
VISIT(Action) \
......@@ -1403,7 +1403,7 @@ FOR_EACH_NODE_TYPE(DECLARE_VISIT)
// Node visitor used to add the start set of the alternatives to the
// dispatch table of a choice node.
class DispatchTableConstructor: public NodeVisitor {
class V8_EXPORT_PRIVATE DispatchTableConstructor : public NodeVisitor {
public:
DispatchTableConstructor(DispatchTable* table, bool ignore_case,
Zone* zone)
......@@ -1435,7 +1435,6 @@ FOR_EACH_NODE_TYPE(DECLARE_VISIT)
Zone* zone_;
};
// Assertion propagation moves information about assertions such as
// \b to the affected nodes. For instance, in /.\b./ information must
// be propagated to the first '.' that whatever follows needs to know
......@@ -1507,12 +1506,10 @@ class RegExpEngine: public AllStatic {
int const num_registers = 0;
};
static CompilationResult Compile(Isolate* isolate, Zone* zone,
RegExpCompileData* input,
JSRegExp::Flags flags,
Handle<String> pattern,
Handle<String> sample_subject,
bool is_one_byte);
V8_EXPORT_PRIVATE static CompilationResult Compile(
Isolate* isolate, Zone* zone, RegExpCompileData* input,
JSRegExp::Flags flags, Handle<String> pattern,
Handle<String> sample_subject, bool is_one_byte);
static bool TooMuchRegExpCode(Isolate* isolate, Handle<String> pattern);
......
......@@ -12,7 +12,8 @@
namespace v8 {
namespace internal {
class RegExpMacroAssemblerMIPS: public NativeRegExpMacroAssembler {
class V8_EXPORT_PRIVATE RegExpMacroAssemblerMIPS
: public NativeRegExpMacroAssembler {
public:
RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save);
......
......@@ -12,7 +12,8 @@
namespace v8 {
namespace internal {
class RegExpMacroAssemblerMIPS: public NativeRegExpMacroAssembler {
class V8_EXPORT_PRIVATE RegExpMacroAssemblerMIPS
: public NativeRegExpMacroAssembler {
public:
RegExpMacroAssemblerMIPS(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save);
......
......@@ -12,7 +12,8 @@
namespace v8 {
namespace internal {
class RegExpMacroAssemblerPPC : public NativeRegExpMacroAssembler {
class V8_EXPORT_PRIVATE RegExpMacroAssemblerPPC
: public NativeRegExpMacroAssembler {
public:
RegExpMacroAssemblerPPC(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save);
......
......@@ -80,11 +80,13 @@ class CharacterRange {
CharacterRange() : from_(0), to_(0) {}
// For compatibility with the CHECK_OK macro
CharacterRange(void* null) { DCHECK_NULL(null); } // NOLINT
static void AddClassEscape(char type, ZoneList<CharacterRange>* ranges,
Zone* zone);
V8_EXPORT_PRIVATE static void AddClassEscape(char type,
ZoneList<CharacterRange>* ranges,
Zone* zone);
// Add class escapes. Add case equivalent closure for \w and \W if necessary.
static void AddClassEscape(char type, ZoneList<CharacterRange>* ranges,
bool add_unicode_case_equivalents, Zone* zone);
V8_EXPORT_PRIVATE static void AddClassEscape(
char type, ZoneList<CharacterRange>* ranges,
bool add_unicode_case_equivalents, Zone* zone);
static Vector<const int> GetWordBounds();
static inline CharacterRange Singleton(uc32 value) {
return CharacterRange(value, value);
......@@ -112,12 +114,12 @@ class CharacterRange {
bool is_valid() { return from_ <= to_; }
bool IsEverything(uc32 max) { return from_ == 0 && to_ >= max; }
bool IsSingleton() { return (from_ == to_); }
static void AddCaseEquivalents(Isolate* isolate, Zone* zone,
ZoneList<CharacterRange>* ranges,
bool is_one_byte);
V8_EXPORT_PRIVATE static void AddCaseEquivalents(
Isolate* isolate, Zone* zone, ZoneList<CharacterRange>* ranges,
bool is_one_byte);
// Whether a range list is in canonical form: Ranges ordered by from value,
// and ranges non-overlapping and non-adjacent.
static bool IsCanonical(ZoneList<CharacterRange>* ranges);
V8_EXPORT_PRIVATE static bool IsCanonical(ZoneList<CharacterRange>* ranges);
// Convert range list to canonical form. The characters covered by the ranges
// will still be the same, but no character is in more than one range, and
// adjacent ranges are merged. The resulting list may be shorter than the
......@@ -148,7 +150,7 @@ class CharacterSet final {
standard_set_type_ = special_set_type;
}
bool is_standard() { return standard_set_type_ != 0; }
void Canonicalize();
V8_EXPORT_PRIVATE void Canonicalize();
private:
ZoneList<CharacterRange>* ranges_;
......@@ -208,7 +210,8 @@ class RegExpTree : public ZoneObject {
// expression.
virtual Interval CaptureRegisters() { return Interval::Empty(); }
virtual void AppendToText(RegExpText* text, Zone* zone);
std::ostream& Print(std::ostream& os, Zone* zone); // NOLINT
V8_EXPORT_PRIVATE std::ostream& Print(std::ostream& os,
Zone* zone); // NOLINT
#define MAKE_ASTYPE(Name) \
virtual RegExp##Name* As##Name(); \
virtual bool Is##Name();
......
......@@ -11,7 +11,8 @@ namespace v8 {
namespace internal {
// A light-weight assembler for the Irregexp byte code.
class RegExpMacroAssemblerIrregexp: public RegExpMacroAssembler {
class V8_EXPORT_PRIVATE RegExpMacroAssemblerIrregexp
: public RegExpMacroAssembler {
public:
// Create an assembler. Instructions and relocation information are emitted
// into a buffer, with the instructions starting from the beginning and the
......
......@@ -244,9 +244,11 @@ class NativeRegExpMacroAssembler: public RegExpMacroAssembler {
}
// Returns a {Result} sentinel, or the number of successful matches.
static int Execute(Code code, String input, int start_offset,
const byte* input_start, const byte* input_end,
int* output, int output_size, Isolate* isolate);
V8_EXPORT_PRIVATE static int Execute(Code code, String input,
int start_offset,
const byte* input_start,
const byte* input_end, int* output,
int output_size, Isolate* isolate);
};
} // namespace internal
......
......@@ -151,7 +151,7 @@ class RegExpBuilder : public ZoneObject {
#endif
};
class RegExpParser {
class V8_EXPORT_PRIVATE RegExpParser {
public:
RegExpParser(FlatStringReader* in, Handle<String>* error,
JSRegExp::Flags flags, Isolate* isolate, Zone* zone);
......
......@@ -12,7 +12,8 @@
namespace v8 {
namespace internal {
class RegExpMacroAssemblerS390 : public NativeRegExpMacroAssembler {
class V8_EXPORT_PRIVATE RegExpMacroAssemblerS390
: public NativeRegExpMacroAssembler {
public:
RegExpMacroAssemblerS390(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save);
......
......@@ -13,7 +13,8 @@
namespace v8 {
namespace internal {
class RegExpMacroAssemblerX64: public NativeRegExpMacroAssembler {
class V8_EXPORT_PRIVATE RegExpMacroAssemblerX64
: public NativeRegExpMacroAssembler {
public:
RegExpMacroAssemblerX64(Isolate* isolate, Zone* zone, Mode mode,
int registers_to_save);
......
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