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 {
: literal_bytes_.length() / 2;
}
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;
void Internalize(Isolate* isolate);
......
......@@ -228,7 +228,7 @@ class Expression : public AstNode {
bool IsSmiLiteral() const;
// 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.
bool IsStringLiteral() const;
......@@ -2233,7 +2233,7 @@ class FunctionLiteral final : public Expression {
return function_literal_id() == kFunctionLiteralIdTopLevel;
}
bool is_wrapped() const { return function_type() == kWrapped; }
LanguageMode language_mode() const;
V8_EXPORT_PRIVATE LanguageMode language_mode() const;
static bool NeedsHomeObject(Expression* expr);
......@@ -2300,7 +2300,7 @@ class FunctionLiteral final : public Expression {
// function will be called immediately:
// - (function() { ... })();
// - var x = function() { ... }();
bool ShouldEagerCompile() const;
V8_EXPORT_PRIVATE bool ShouldEagerCompile() const;
V8_EXPORT_PRIVATE void SetShouldEagerCompile();
FunctionType function_type() const {
......
......@@ -121,7 +121,7 @@ class ModuleDescriptor : public ZoneObject {
// Custom content-based comparer for the below maps, to keep them stable
// across parses.
struct AstRawStringComparer {
struct V8_EXPORT_PRIVATE AstRawStringComparer {
bool operator()(const AstRawString* lhs, const AstRawString* rhs) const;
};
......
......@@ -31,7 +31,7 @@ class StringSet;
class VariableProxy;
// A hash map to support fast variable declaration and lookup.
class VariableMap: public ZoneHashMap {
class VariableMap : public ZoneHashMap {
public:
explicit VariableMap(Zone* zone);
......@@ -40,7 +40,7 @@ class VariableMap: public ZoneHashMap {
InitializationFlag initialization_flag,
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 Add(Zone* zone, Variable* var);
};
......
......@@ -191,7 +191,8 @@ class OnHeapConsumedPreparseData final
// A serialized PreparseData in zone memory (as apposed to being on-heap).
class ZonePreparseData : public ZoneObject {
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);
......
......@@ -89,7 +89,7 @@ struct PreparseByteDataConstants {
4 * kVarint32MaxSize + 1 * kUint8Size;
};
class PreparseDataBuilder : public ZoneObject,
class V8_EXPORT_PRIVATE PreparseDataBuilder : public ZoneObject,
public PreparseByteDataConstants {
public:
// Create a PreparseDataBuilder object which will collect data as we
......@@ -125,7 +125,8 @@ class PreparseDataBuilder : public ZoneObject,
DISALLOW_COPY_AND_ASSIGN(DataGatheringScope);
};
class ByteData : public ZoneObject, public PreparseByteDataConstants {
class V8_EXPORT_PRIVATE ByteData : public ZoneObject,
public PreparseByteDataConstants {
public:
ByteData()
: byte_data_(nullptr), index_(0), free_quarters_in_last_byte_(0) {}
......@@ -271,8 +272,8 @@ class ConsumedPreparseData {
public:
// Creates a ConsumedPreparseData representing the data of an on-heap
// PreparseData |data|.
static std::unique_ptr<ConsumedPreparseData> For(Isolate* isolate,
Handle<PreparseData> data);
V8_EXPORT_PRIVATE static std::unique_ptr<ConsumedPreparseData> For(
Isolate* isolate, Handle<PreparseData> data);
// Creates a ConsumedPreparseData representing the data of an off-heap
// ZonePreparseData |data|.
......
......@@ -956,7 +956,7 @@ class PreParser : public ParserBase<PreParser> {
// success (even if parsing failed, the pre-parse data successfully
// captured the syntax error), and false if a stack-overflow happened
// during parsing.
PreParseResult PreParseProgram();
V8_EXPORT_PRIVATE PreParseResult PreParseProgram();
// Parses a single function literal, from the opening parentheses before
// parameters to the closing brace after the body.
......
......@@ -5,6 +5,8 @@
#ifndef V8_PARSING_REWRITER_H_
#define V8_PARSING_REWRITER_H_
#include "src/base/macros.h"
namespace v8 {
namespace internal {
......@@ -23,7 +25,7 @@ class Rewriter {
//
// 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.
static bool Rewrite(ParseInfo* info);
V8_EXPORT_PRIVATE static bool Rewrite(ParseInfo* info);
};
......
......@@ -204,10 +204,10 @@ class Utf16CharacterStream {
// ----------------------------------------------------------------------------
// JavaScript Scanner.
class Scanner {
class V8_EXPORT_PRIVATE Scanner {
public:
// Scoped helper for a re-settable bookmark.
class BookmarkScope {
class V8_EXPORT_PRIVATE BookmarkScope {
public:
explicit BookmarkScope(Scanner* scanner)
: scanner_(scanner),
......
......@@ -201,7 +201,7 @@ namespace internal {
T(UNINITIALIZED, nullptr, 0) \
T(REGEXP_LITERAL, nullptr, 0)
class Token {
class V8_EXPORT_PRIVATE Token {
public:
// All token values.
#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