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