#include "src/init/v8.h"
#include "src/api/api.h"
#include "src/codegen/source-position-table.h"
#include "src/execution/isolate.h"
#include "src/heap/factory.h"
#include "src/interpreter/bytecode-array-writer.h"
#include "src/interpreter/bytecode-label.h"
#include "src/interpreter/bytecode-node.h"
#include "src/interpreter/bytecode-register.h"
#include "src/interpreter/bytecode-source-info.h"
#include "src/interpreter/constant-array-builder.h"
#include "src/utils/utils.h"
#include "src/objects/objects-inl.h"
#include "test/unittests/interpreter/bytecode-utils.h"
#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
namespace interpreter {
namespace bytecode_array_writer_unittest {
#define B …
#define R …
class BytecodeArrayWriterUnittest : public TestWithIsolateAndZone { … };
void BytecodeArrayWriterUnittest::Write(Bytecode bytecode,
BytecodeSourceInfo info) { … }
void BytecodeArrayWriterUnittest::Write(Bytecode bytecode, uint32_t operand0,
BytecodeSourceInfo info) { … }
void BytecodeArrayWriterUnittest::Write(Bytecode bytecode, uint32_t operand0,
uint32_t operand1,
BytecodeSourceInfo info) { … }
void BytecodeArrayWriterUnittest::Write(Bytecode bytecode, uint32_t operand0,
uint32_t operand1, uint32_t operand2,
BytecodeSourceInfo info) { … }
void BytecodeArrayWriterUnittest::Write(Bytecode bytecode, uint32_t operand0,
uint32_t operand1, uint32_t operand2,
uint32_t operand3,
BytecodeSourceInfo info) { … }
void BytecodeArrayWriterUnittest::WriteJump(Bytecode bytecode,
BytecodeLabel* label,
BytecodeSourceInfo info) { … }
void BytecodeArrayWriterUnittest::WriteJump(Bytecode bytecode,
BytecodeLabel* label,
uint32_t operand1,
uint32_t operand2,
BytecodeSourceInfo info) { … }
void BytecodeArrayWriterUnittest::WriteJumpLoop(Bytecode bytecode,
BytecodeLoopHeader* loop_header,
int depth, int feedback_index,
BytecodeSourceInfo info) { … }
TEST_F(BytecodeArrayWriterUnittest, SimpleExample) { … }
TEST_F(BytecodeArrayWriterUnittest, ComplexExample) { … }
TEST_F(BytecodeArrayWriterUnittest, ElideNoneffectfulBytecodes) { … }
TEST_F(BytecodeArrayWriterUnittest, DeadcodeElimination) { … }
#undef B
#undef R
}
}
}
}