chromium/v8/src/interpreter/bytecode-array-writer.cc

// Copyright 2015 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "src/interpreter/bytecode-array-writer.h"

#include "src/api/api-inl.h"
#include "src/heap/local-factory-inl.h"
#include "src/interpreter/bytecode-jump-table.h"
#include "src/interpreter/bytecode-label.h"
#include "src/interpreter/bytecode-node.h"
#include "src/interpreter/bytecode-source-info.h"
#include "src/interpreter/constant-array-builder.h"
#include "src/interpreter/handler-table-builder.h"
#include "src/objects/objects-inl.h"

namespace v8 {
namespace internal {
namespace interpreter {

STATIC_CONST_MEMBER_DEFINITION const size_t
    BytecodeArrayWriter::kMaxSizeOfPackedBytecode;

BytecodeArrayWriter::BytecodeArrayWriter(
    Zone* zone, ConstantArrayBuilder* constant_array_builder,
    SourcePositionTableBuilder::RecordingMode source_position_mode)
    :{}

template <typename IsolateT>
Handle<BytecodeArray> BytecodeArrayWriter::ToBytecodeArray(
    IsolateT* isolate, int register_count, uint16_t parameter_count,
    uint16_t max_arguments, Handle<TrustedByteArray> handler_table) {}

template EXPORT_TEMPLATE_DEFINE()
    Handle<BytecodeArray> BytecodeArrayWriter::ToBytecodeArray(
        Isolate* isolate, int register_count, uint16_t parameter_count,
        uint16_t max_arguments, Handle<TrustedByteArray> handler_table);
template EXPORT_TEMPLATE_DEFINE()
    Handle<BytecodeArray> BytecodeArrayWriter::ToBytecodeArray(
        LocalIsolate* isolate, int register_count, uint16_t parameter_count,
        uint16_t max_arguments, Handle<TrustedByteArray> handler_table);

template <typename IsolateT>
Handle<TrustedByteArray> BytecodeArrayWriter::ToSourcePositionTable(
    IsolateT* isolate) {}

template EXPORT_TEMPLATE_DEFINE()
    Handle<TrustedByteArray> BytecodeArrayWriter::ToSourcePositionTable(
        Isolate* isolate);
template EXPORT_TEMPLATE_DEFINE()
    Handle<TrustedByteArray> BytecodeArrayWriter::ToSourcePositionTable(
        LocalIsolate* isolate);

#ifdef DEBUG
int BytecodeArrayWriter::CheckBytecodeMatches(Tagged<BytecodeArray> bytecode) {}
#endif

void BytecodeArrayWriter::Write(BytecodeNode* node) {}

void BytecodeArrayWriter::WriteJump(BytecodeNode* node, BytecodeLabel* label) {}

void BytecodeArrayWriter::WriteJumpLoop(BytecodeNode* node,
                                        BytecodeLoopHeader* loop_header) {}

void BytecodeArrayWriter::WriteSwitch(BytecodeNode* node,
                                      BytecodeJumpTable* jump_table) {}

void BytecodeArrayWriter::BindLabel(BytecodeLabel* label) {}

void BytecodeArrayWriter::BindLoopHeader(BytecodeLoopHeader* loop_header) {}

void BytecodeArrayWriter::BindJumpTableEntry(BytecodeJumpTable* jump_table,
                                             int case_value) {}

void BytecodeArrayWriter::BindHandlerTarget(
    HandlerTableBuilder* handler_table_builder, int handler_id) {}

void BytecodeArrayWriter::BindTryRegionStart(
    HandlerTableBuilder* handler_table_builder, int handler_id) {}

void BytecodeArrayWriter::BindTryRegionEnd(
    HandlerTableBuilder* handler_table_builder, int handler_id) {}

void BytecodeArrayWriter::SetFunctionEntrySourcePosition(int position) {}

void BytecodeArrayWriter::StartBasicBlock() {}

void BytecodeArrayWriter::UpdateSourcePositionTable(
    const BytecodeNode* const node) {}

void BytecodeArrayWriter::UpdateExitSeenInBlock(Bytecode bytecode) {}

void BytecodeArrayWriter::MaybeElideLastBytecode(Bytecode next_bytecode,
                                                 bool has_source_info) {}

void BytecodeArrayWriter::InvalidateLastBytecode() {}

void BytecodeArrayWriter::EmitBytecode(const BytecodeNode* const node) {}

// static
Bytecode GetJumpWithConstantOperand(Bytecode jump_bytecode) {}

void BytecodeArrayWriter::PatchJumpWith8BitOperand(size_t jump_location,
                                                   int delta) {}

void BytecodeArrayWriter::PatchJumpWith16BitOperand(size_t jump_location,
                                                    int delta) {}

void BytecodeArrayWriter::PatchJumpWith32BitOperand(size_t jump_location,
                                                    int delta) {}

void BytecodeArrayWriter::PatchJump(size_t jump_target, size_t jump_location) {}

void BytecodeArrayWriter::EmitJumpLoop(BytecodeNode* node,
                                       BytecodeLoopHeader* loop_header) {}

void BytecodeArrayWriter::EmitJump(BytecodeNode* node, BytecodeLabel* label) {}

void BytecodeArrayWriter::EmitSwitch(BytecodeNode* node,
                                     BytecodeJumpTable* jump_table) {}

}  // namespace interpreter
}  // namespace internal
}  // namespace v8