Fix generate-bytecode-expectations to work in component builds

R=machenbach@chromium.org,jgruber@chromium.org,mythria@chromium.org
CQ_INCLUDE_TRYBOTS=master.tryserver.v8:v8_win_dbg,v8_mac_dbg;master.tryserver.chromium.android:android_arm64_dbg_recipe

Review-Url: https://codereview.chromium.org/2410353005
Cr-Commit-Position: refs/heads/master@{#40300}
This commit is contained in:
jochen 2016-10-14 01:55:40 -07:00 committed by Commit bot
parent 64378066b7
commit c592e45400
10 changed files with 25 additions and 33 deletions

View File

@ -5,6 +5,7 @@
#ifndef V8_INTERPRETER_BYTECODE_ARRAY_ITERATOR_H_
#define V8_INTERPRETER_BYTECODE_ARRAY_ITERATOR_H_
#include "src/globals.h"
#include "src/handles.h"
#include "src/interpreter/bytecode-register.h"
#include "src/interpreter/bytecodes.h"
@ -15,7 +16,7 @@ namespace v8 {
namespace internal {
namespace interpreter {
class BytecodeArrayIterator {
class V8_EXPORT_PRIVATE BytecodeArrayIterator {
public:
explicit BytecodeArrayIterator(Handle<BytecodeArray> bytecode_array);

View File

@ -115,7 +115,8 @@ inline AccumulatorUse operator|(AccumulatorUse lhs, AccumulatorUse rhs) {
}
std::ostream& operator<<(std::ostream& os, const AccumulatorUse& use);
std::ostream& operator<<(std::ostream& os, const OperandScale& operand_scale);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
const OperandScale& operand_scale);
std::ostream& operator<<(std::ostream& os, const OperandSize& operand_size);
std::ostream& operator<<(std::ostream& os, const OperandType& operand_type);

View File

@ -8,6 +8,7 @@
#include "src/interpreter/bytecodes.h"
#include "src/frames.h"
#include "src/globals.h"
namespace v8 {
namespace internal {
@ -15,7 +16,7 @@ namespace interpreter {
// An interpreter Register which is located in the function's Register file
// in its stack-frame. Register hold parameters, this, and expression values.
class Register final {
class V8_EXPORT_PRIVATE Register final {
public:
explicit Register(int index = kInvalidIndex) : index_(index) {}

View File

@ -314,7 +314,7 @@ enum class Bytecode : uint8_t {
#define CONSTEXPR constexpr
#endif
class Bytecodes final {
class V8_EXPORT_PRIVATE Bytecodes final {
public:
// The maximum number of operands a bytecode may have.
static const int kMaxOperands = 4;
@ -733,7 +733,8 @@ class Bytecodes final {
// See crbug.com/603131.
#undef CONSTEXPR
std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
const Bytecode& bytecode);
} // namespace interpreter
} // namespace internal

View File

@ -791,8 +791,8 @@ STATIC_ASSERT(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType);
STATIC_ASSERT(ODDBALL_TYPE == Internals::kOddballType);
STATIC_ASSERT(FOREIGN_TYPE == Internals::kForeignType);
std::ostream& operator<<(std::ostream& os, InstanceType instance_type);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
InstanceType instance_type);
#define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V) \
V(BYTECODE_ARRAY_CONSTANT_POOL_SUB_TYPE) \
@ -1526,7 +1526,7 @@ class Smi: public Object {
DECLARE_CAST(Smi)
// Dispatched behavior.
void SmiPrint(std::ostream& os) const; // NOLINT
V8_EXPORT_PRIVATE void SmiPrint(std::ostream& os) const; // NOLINT
DECLARE_VERIFIER(Smi)
V8_EXPORT_PRIVATE static Smi* const kZero;
@ -1755,7 +1755,7 @@ class HeapNumber: public HeapObject {
// Dispatched behavior.
bool HeapNumberBooleanValue();
void HeapNumberPrint(std::ostream& os); // NOLINT
V8_EXPORT_PRIVATE void HeapNumberPrint(std::ostream& os); // NOLINT
DECLARE_VERIFIER(HeapNumber)
inline int get_exponent();
@ -9835,7 +9835,7 @@ class ConsString: public String {
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
// Dispatched behavior.
uint16_t ConsStringGet(int index);
V8_EXPORT_PRIVATE uint16_t ConsStringGet(int index);
DECLARE_CAST(ConsString)
@ -9878,7 +9878,7 @@ class SlicedString: public String {
inline void set_offset(int offset);
// Dispatched behavior.
uint16_t SlicedStringGet(int index);
V8_EXPORT_PRIVATE uint16_t SlicedStringGet(int index);
DECLARE_CAST(SlicedString)

View File

@ -80,7 +80,8 @@ struct AsHex {
std::ostream& operator<<(std::ostream& os, const AsReversiblyEscapedUC16& c);
// Same as AsReversiblyEscapedUC16 with additional escaping of \n, \r, " and '.
std::ostream& operator<<(std::ostream& os, const AsEscapedUC16ForJSON& c);
V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
const AsEscapedUC16ForJSON& c);
// Writes the given character to the output escaping everything outside
// of printable ASCII range.

View File

@ -9,6 +9,7 @@
#include "src/allocation.h"
#include "src/base/platform/time.h"
#include "src/globals.h"
#include "src/objects.h"
#include "src/unicode.h"
#include "src/zone/zone.h"
@ -1044,7 +1045,7 @@ class Runtime : public AllStatic {
static const Function* FunctionForName(const unsigned char* name, int length);
// Get the intrinsic function with the given FunctionId.
static const Function* FunctionForId(FunctionId id);
V8_EXPORT_PRIVATE static const Function* FunctionForId(FunctionId id);
// Get the intrinsic function with the given function entry address.
static const Function* FunctionForEntry(Address ref);

View File

@ -7,6 +7,7 @@
#include "src/assert-scope.h"
#include "src/checks.h"
#include "src/globals.h"
#include "src/handles.h"
#include "src/zone/zone-containers.h"
@ -55,7 +56,7 @@ class SourcePositionTableBuilder {
PositionTableEntry previous_; // Previously written entry, to compute delta.
};
class SourcePositionTableIterator {
class V8_EXPORT_PRIVATE SourcePositionTableIterator {
public:
explicit SourcePositionTableIterator(ByteArray* byte_array);

View File

@ -412,18 +412,10 @@ v8_executable("generate-bytecode-expectations") {
]
deps = [
"../..:v8",
"../..:v8_libbase",
"../..:v8_libplatform",
"//build/config/sanitizers:deps",
"//build/win:default_exe_manifest",
]
defines = []
if (is_component_build) {
# Same as cctest, we need to depend on the underlying static target.
deps += [ "../..:v8_maybe_snapshot" ]
defines += [ "BUILDING_V8_SHARED" ]
} else {
deps += [ "../..:v8" ]
}
}

View File

@ -474,17 +474,10 @@
'target_name': 'generate-bytecode-expectations',
'type': 'executable',
'dependencies': [
'../../src/v8.gyp:v8',
'../../src/v8.gyp:v8_libbase',
'../../src/v8.gyp:v8_libplatform',
],
'conditions': [
['component=="shared_library"', {
# Same as cctest, we need to depend on the underlying static target.
'dependencies': ['../../src/v8.gyp:v8_maybe_snapshot'],
'defines': [ 'BUILDING_V8_SHARED', ]
}, {
'dependencies': ['../../src/v8.gyp:v8'],
}],
],
'include_dirs+': [
'../..',
],