Commit 4415b1d1 authored by Sigurd Schneider's avatar Sigurd Schneider Committed by Commit Bot

[cctest] Add V8_EXPORT_PRIVATE for cctest (parser part)

Bug: v8:9020

Change-Id: I45f85807132fc9278e90b4cfc7f0dc8326870dfe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1541046
Commit-Queue: Sigurd Schneider <sigurds@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#60612}
parent 9d2f267f
...@@ -52,7 +52,7 @@ class AstRawString final : public ZoneObject { ...@@ -52,7 +52,7 @@ class AstRawString final : public ZoneObject {
: literal_bytes_.length() / 2; : literal_bytes_.length() / 2;
} }
bool AsArrayIndex(uint32_t* index) const; bool AsArrayIndex(uint32_t* index) const;
bool IsOneByteEqualTo(const char* data) const; V8_EXPORT_PRIVATE bool IsOneByteEqualTo(const char* data) const;
uint16_t FirstCharacter() const; uint16_t FirstCharacter() const;
void Internalize(Isolate* isolate); void Internalize(Isolate* isolate);
......
...@@ -228,7 +228,7 @@ class Expression : public AstNode { ...@@ -228,7 +228,7 @@ class Expression : public AstNode {
bool IsSmiLiteral() const; bool IsSmiLiteral() const;
// True iff the expression is a literal represented as a number. // True iff the expression is a literal represented as a number.
bool IsNumberLiteral() const; V8_EXPORT_PRIVATE bool IsNumberLiteral() const;
// True iff the expression is a string literal. // True iff the expression is a string literal.
bool IsStringLiteral() const; bool IsStringLiteral() const;
...@@ -2233,7 +2233,7 @@ class FunctionLiteral final : public Expression { ...@@ -2233,7 +2233,7 @@ class FunctionLiteral final : public Expression {
return function_literal_id() == kFunctionLiteralIdTopLevel; return function_literal_id() == kFunctionLiteralIdTopLevel;
} }
bool is_wrapped() const { return function_type() == kWrapped; } bool is_wrapped() const { return function_type() == kWrapped; }
LanguageMode language_mode() const; V8_EXPORT_PRIVATE LanguageMode language_mode() const;
static bool NeedsHomeObject(Expression* expr); static bool NeedsHomeObject(Expression* expr);
...@@ -2300,7 +2300,7 @@ class FunctionLiteral final : public Expression { ...@@ -2300,7 +2300,7 @@ class FunctionLiteral final : public Expression {
// function will be called immediately: // function will be called immediately:
// - (function() { ... })(); // - (function() { ... })();
// - var x = function() { ... }(); // - var x = function() { ... }();
bool ShouldEagerCompile() const; V8_EXPORT_PRIVATE bool ShouldEagerCompile() const;
V8_EXPORT_PRIVATE void SetShouldEagerCompile(); V8_EXPORT_PRIVATE void SetShouldEagerCompile();
FunctionType function_type() const { FunctionType function_type() const {
......
...@@ -121,7 +121,7 @@ class ModuleDescriptor : public ZoneObject { ...@@ -121,7 +121,7 @@ class ModuleDescriptor : public ZoneObject {
// Custom content-based comparer for the below maps, to keep them stable // Custom content-based comparer for the below maps, to keep them stable
// across parses. // across parses.
struct AstRawStringComparer { struct V8_EXPORT_PRIVATE AstRawStringComparer {
bool operator()(const AstRawString* lhs, const AstRawString* rhs) const; bool operator()(const AstRawString* lhs, const AstRawString* rhs) const;
}; };
......
...@@ -31,7 +31,7 @@ class StringSet; ...@@ -31,7 +31,7 @@ class StringSet;
class VariableProxy; class VariableProxy;
// A hash map to support fast variable declaration and lookup. // A hash map to support fast variable declaration and lookup.
class VariableMap: public ZoneHashMap { class VariableMap : public ZoneHashMap {
public: public:
explicit VariableMap(Zone* zone); explicit VariableMap(Zone* zone);
...@@ -40,7 +40,7 @@ class VariableMap: public ZoneHashMap { ...@@ -40,7 +40,7 @@ class VariableMap: public ZoneHashMap {
InitializationFlag initialization_flag, InitializationFlag initialization_flag,
MaybeAssignedFlag maybe_assigned_flag, bool* was_added); MaybeAssignedFlag maybe_assigned_flag, bool* was_added);
Variable* Lookup(const AstRawString* name); V8_EXPORT_PRIVATE Variable* Lookup(const AstRawString* name);
void Remove(Variable* var); void Remove(Variable* var);
void Add(Zone* zone, Variable* var); void Add(Zone* zone, Variable* var);
}; };
......
...@@ -191,7 +191,8 @@ class OnHeapConsumedPreparseData final ...@@ -191,7 +191,8 @@ class OnHeapConsumedPreparseData final
// A serialized PreparseData in zone memory (as apposed to being on-heap). // A serialized PreparseData in zone memory (as apposed to being on-heap).
class ZonePreparseData : public ZoneObject { class ZonePreparseData : public ZoneObject {
public: public:
ZonePreparseData(Zone* zone, Vector<uint8_t>* byte_data, int child_length); V8_EXPORT_PRIVATE ZonePreparseData(Zone* zone, Vector<uint8_t>* byte_data,
int child_length);
Handle<PreparseData> Serialize(Isolate* isolate); Handle<PreparseData> Serialize(Isolate* isolate);
......
...@@ -89,8 +89,8 @@ struct PreparseByteDataConstants { ...@@ -89,8 +89,8 @@ struct PreparseByteDataConstants {
4 * kVarint32MaxSize + 1 * kUint8Size; 4 * kVarint32MaxSize + 1 * kUint8Size;
}; };
class PreparseDataBuilder : public ZoneObject, class V8_EXPORT_PRIVATE PreparseDataBuilder : public ZoneObject,
public PreparseByteDataConstants { public PreparseByteDataConstants {
public: public:
// Create a PreparseDataBuilder object which will collect data as we // Create a PreparseDataBuilder object which will collect data as we
// parse. // parse.
...@@ -125,7 +125,8 @@ class PreparseDataBuilder : public ZoneObject, ...@@ -125,7 +125,8 @@ class PreparseDataBuilder : public ZoneObject,
DISALLOW_COPY_AND_ASSIGN(DataGatheringScope); DISALLOW_COPY_AND_ASSIGN(DataGatheringScope);
}; };
class ByteData : public ZoneObject, public PreparseByteDataConstants { class V8_EXPORT_PRIVATE ByteData : public ZoneObject,
public PreparseByteDataConstants {
public: public:
ByteData() ByteData()
: byte_data_(nullptr), index_(0), free_quarters_in_last_byte_(0) {} : byte_data_(nullptr), index_(0), free_quarters_in_last_byte_(0) {}
...@@ -271,8 +272,8 @@ class ConsumedPreparseData { ...@@ -271,8 +272,8 @@ class ConsumedPreparseData {
public: public:
// Creates a ConsumedPreparseData representing the data of an on-heap // Creates a ConsumedPreparseData representing the data of an on-heap
// PreparseData |data|. // PreparseData |data|.
static std::unique_ptr<ConsumedPreparseData> For(Isolate* isolate, V8_EXPORT_PRIVATE static std::unique_ptr<ConsumedPreparseData> For(
Handle<PreparseData> data); Isolate* isolate, Handle<PreparseData> data);
// Creates a ConsumedPreparseData representing the data of an off-heap // Creates a ConsumedPreparseData representing the data of an off-heap
// ZonePreparseData |data|. // ZonePreparseData |data|.
......
...@@ -956,7 +956,7 @@ class PreParser : public ParserBase<PreParser> { ...@@ -956,7 +956,7 @@ class PreParser : public ParserBase<PreParser> {
// success (even if parsing failed, the pre-parse data successfully // success (even if parsing failed, the pre-parse data successfully
// captured the syntax error), and false if a stack-overflow happened // captured the syntax error), and false if a stack-overflow happened
// during parsing. // during parsing.
PreParseResult PreParseProgram(); V8_EXPORT_PRIVATE PreParseResult PreParseProgram();
// Parses a single function literal, from the opening parentheses before // Parses a single function literal, from the opening parentheses before
// parameters to the closing brace after the body. // parameters to the closing brace after the body.
......
...@@ -5,6 +5,8 @@ ...@@ -5,6 +5,8 @@
#ifndef V8_PARSING_REWRITER_H_ #ifndef V8_PARSING_REWRITER_H_
#define V8_PARSING_REWRITER_H_ #define V8_PARSING_REWRITER_H_
#include "src/base/macros.h"
namespace v8 { namespace v8 {
namespace internal { namespace internal {
...@@ -23,7 +25,7 @@ class Rewriter { ...@@ -23,7 +25,7 @@ class Rewriter {
// //
// Assumes code has been parsed and scopes have been analyzed. Mutates the // Assumes code has been parsed and scopes have been analyzed. Mutates the
// AST, so the AST should not continue to be used in the case of failure. // AST, so the AST should not continue to be used in the case of failure.
static bool Rewrite(ParseInfo* info); V8_EXPORT_PRIVATE static bool Rewrite(ParseInfo* info);
}; };
......
...@@ -204,10 +204,10 @@ class Utf16CharacterStream { ...@@ -204,10 +204,10 @@ class Utf16CharacterStream {
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// JavaScript Scanner. // JavaScript Scanner.
class Scanner { class V8_EXPORT_PRIVATE Scanner {
public: public:
// Scoped helper for a re-settable bookmark. // Scoped helper for a re-settable bookmark.
class BookmarkScope { class V8_EXPORT_PRIVATE BookmarkScope {
public: public:
explicit BookmarkScope(Scanner* scanner) explicit BookmarkScope(Scanner* scanner)
: scanner_(scanner), : scanner_(scanner),
......
...@@ -201,7 +201,7 @@ namespace internal { ...@@ -201,7 +201,7 @@ namespace internal {
T(UNINITIALIZED, nullptr, 0) \ T(UNINITIALIZED, nullptr, 0) \
T(REGEXP_LITERAL, nullptr, 0) T(REGEXP_LITERAL, nullptr, 0)
class Token { class V8_EXPORT_PRIVATE Token {
public: public:
// All token values. // All token values.
#define T(name, string, precedence) name, #define T(name, string, precedence) name,
......
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