79 std::optional<OsrHelper> osr_helper,
80 int start_source_position,
83 size_t max_unoptimized_frame_height,
84 size_t max_pushed_argument_count,
85 const char* debug_name =
nullptr);
93#if V8_ENABLE_WEBASSEMBLY
102 const Frame*
frame()
const {
return frame_access_state_->frame(); }
108 void RecordProtectedInstruction(uint32_t instr_offset);
111 return start_source_position_;
129 return instr_starts_;
133 return offsets_info_;
136#if V8_ENABLE_WEBASSEMBLY
137 bool IsWasm()
const {
return info()->IsWasm(); }
140 static constexpr int kBinarySearchSwitchMinimalCases = 4;
149 uint32_t GetStackCheckOffset();
160 void CreateFrameAccessState(
Frame* frame);
163 void FinishFrame(
Frame* frame);
167 bool IsNextInAssemblyOrder(
RpoNumber block)
const;
181 CodeGenResult AssembleInstruction(
int instruction_index,
202 size_t frame_state_offset,
203 size_t immediate_args_count,
212 void AssembleArchJumpRegardlessOfAssemblyOrder(
RpoNumber target);
222#if V8_ENABLE_WEBASSEMBLY
225#if V8_TARGET_ARCH_X64
226 void AssembleArchBinarySearchSwitchRange(
228 std::pair<int32_t, Label*>*
end, std::optional<int32_t>& last_cmp_value);
231 std::pair<int32_t, Label*>* begin,
232 std::pair<int32_t, Label*>*
end);
239 void AssembleCodeStartRegisterCheck();
241#ifdef V8_ENABLE_LEAPTIERING
244 void AssembleDispatchHandleRegisterCheck();
253 void BailoutIfDeoptimized();
261 void AssembleConstructFrame();
267 void AssembleDeconstructFrame();
270 void AssemblePrepareTailCall();
273 kImmediatePush = 0x1,
275 kStackSlotPush = 0x4,
276 kScalarPush = kRegisterPush | kStackSlotPush
318 int first_unused_stack_slot);
323 int first_unused_stack_slot);
326 void MaybeEmitOutOfLineConstantPool();
342 void PopTempStackSlots() final;
359 void AssembleJumpTable(
base::Vector<
Label*> targets);
368 int DefineProtectedDeoptimizationLiteral(
371 bool HasProtectedDeoptimizationLiteral(
374 size_t frame_state_offset);
376 void BuildTranslationForFrameStateDescriptor(
389 size_t frame_state_offset,
390 size_t immediate_args_count);
401 friend class CodeGeneratorTester;
419 int next_deoptimization_id_ = 0;
420 int deopt_exit_start_offset_ = 0;
421 int eager_deopt_count_ = 0;
422 int lazy_deopt_count_ = 0;
426 size_t inlined_function_count_ = 0;
446 uint16_t parameter_count_ = 0;
465#if V8_ENABLE_WEBASSEMBLY
474 const char* debug_name_ =
nullptr;