5#ifndef V8_MAGLEV_MAGLEV_CODE_GEN_STATE_H_
6#define V8_MAGLEV_MAGLEV_CODE_GEN_STATE_H_
23class InterpreterFrameState;
37 uint32_t max_block_id)
52 return std::exchange(
deferred_code_, std::vector<DeferredCodeInfo*>());
96 int32_t parameter_slots =
104 int32_t signed_max_unoptimized_frame_height =
110 uint32_t frame_height_delta =
static_cast<uint32_t
>(std::max(
111 signed_max_unoptimized_frame_height - optimized_frame_height, 0));
112 uint32_t max_pushed_argument_bytes =
114 return std::max(frame_height_delta, max_pushed_argument_bytes);
161template <
typename RegisterT>
163 if constexpr (std::is_same_v<RegisterT, Register>) {
static constexpr int kFixedSlotCount
static constexpr int kFixedFrameSize
NativeContextRef target_native_context() const
Register GetRegister() const
static LocationOperand * cast(InstructionOperand *op)
DoubleRegister GetDoubleRegister() const
Label deferred_code_label
virtual void Generate(MaglevAssembler *masm)=0
MaglevGraphLabeller * graph_labeller() const
uint16_t parameter_count() const
const std::vector< EagerDeoptInfo * > & eager_deopts() const
std::vector< LazyDeoptInfo * > lazy_deopts_
void PushDeferredCode(DeferredCodeInfo *deferred_code)
const std::vector< DeferredCodeInfo * > & deferred_code() const
std::vector< NodeBase * > handlers_
void PushEagerDeopt(EagerDeoptInfo *info)
MaglevSafepointTableBuilder *const safepoint_table_builder_
void set_tagged_slots(int slots)
std::vector< DeferredCodeInfo * > TakeDeferredCode()
const std::vector< NodeBase * > & handlers() const
MaglevCompilationInfo *const compilation_info_
compiler::JSHeapBroker * broker() const
void PushHandlerInfo(NodeBase *node)
void set_max_call_stack_args_(uint32_t max_call_stack_args)
const std::vector< LazyDeoptInfo * > & lazy_deopts() const
BasicBlock * RealJumpTarget(BasicBlock *block)
MaglevCompilationInfo * compilation_info() const
void set_untagged_slots(int slots)
std::vector< DeferredCodeInfo * > deferred_code_
void set_max_deopted_stack_size(uint32_t max_deopted_stack_size)
MaglevCodeGenState(MaglevCompilationInfo *compilation_info, MaglevSafepointTableBuilder *safepoint_table_builder, uint32_t max_block_id)
MaglevSafepointTableBuilder * safepoint_table_builder() const
uint32_t max_deopted_stack_size_
uint32_t max_call_stack_args_
void PushLazyDeopt(LazyDeoptInfo *info)
compiler::NativeContextRef native_context() const
std::vector< BasicBlock * > real_jump_target_
std::vector< EagerDeoptInfo * > eager_deopts_
uint32_t stack_check_offset()
MaglevGraphLabeller * graph_labeller() const
MaglevCompilationUnit * toplevel_compilation_unit() const
compiler::JSHeapBroker * broker() const
uint16_t parameter_count() const
const compiler::InstructionOperand & operand() const
int GetSafepointIndexForStackSlot(int i)
DoubleRegister ToDoubleRegister(const compiler::InstructionOperand &operand)
Register ToRegister(const compiler::InstructionOperand &operand)
auto ToRegisterT(const compiler::InstructionOperand &operand)
constexpr int kSystemPointerSize
constexpr uint32_t kMaxUInt32
#define DCHECK(condition)