diff options
Diffstat (limited to 'deps/v8/src/compiler/code-generator.h')
-rw-r--r-- | deps/v8/src/compiler/code-generator.h | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/deps/v8/src/compiler/code-generator.h b/deps/v8/src/compiler/code-generator.h index 1dfe0c3526..dcdb6bb806 100644 --- a/deps/v8/src/compiler/code-generator.h +++ b/deps/v8/src/compiler/code-generator.h @@ -84,15 +84,17 @@ class CodeGenerator final : public GapResolver::Assembler { int start_source_position, JumpOptimizationInfo* jump_opt, WasmCompilationData* wasm_compilation_data, - PoisoningMitigationLevel poisoning_level); + PoisoningMitigationLevel poisoning_level, + const AssemblerOptions& options, + int32_t builtin_index); // Generate native code. After calling AssembleCode, call FinalizeCode to // produce the actual code object. If an error occurs during either phase, - // FinalizeCode returns a null handle. + // FinalizeCode returns an empty MaybeHandle. void AssembleCode(); // Does not need to run on main thread. - Handle<Code> FinalizeCode(); + MaybeHandle<Code> FinalizeCode(); - Handle<ByteArray> GetSourcePositionTable(); + OwnedVector<byte> GetSourcePositionTable(); InstructionSequence* code() const { return code_; } FrameAccessState* frame_access_state() const { return frame_access_state_; } @@ -123,6 +125,11 @@ class CodeGenerator final : public GapResolver::Assembler { size_t GetSafepointTableOffset() const { return safepoints_.GetCodeOffset(); } size_t GetHandlerTableOffset() const { return handler_table_offset_; } + const ZoneVector<int>& block_starts() const { return block_starts_; } + const ZoneVector<int>& instr_starts() const { return instr_starts_; } + + static constexpr int kBinarySearchSwitchMinimalCases = 4; + private: GapResolver* resolver() { return &resolver_; } SafepointTableBuilder* safepoints() { return &safepoints_; } @@ -176,6 +183,9 @@ class CodeGenerator final : public GapResolver::Assembler { // adjusted stack pointer is returned in |slot|. bool GetSlotAboveSPBeforeTailCall(Instruction* instr, int* slot); + // Determines how to call helper stubs depending on the code kind. + StubCallMode DetermineStubCallMode() const; + CodeGenResult AssembleDeoptimizerCall(int deoptimization_id, SourcePosition pos); @@ -192,6 +202,10 @@ class CodeGenerator final : public GapResolver::Assembler { void AssembleArchBoolean(Instruction* instr, FlagsCondition condition); void AssembleArchTrap(Instruction* instr, FlagsCondition condition); + void AssembleArchBinarySearchSwitchRange(Register input, RpoNumber def_block, + std::pair<int32_t, Label*>* begin, + std::pair<int32_t, Label*>* end); + void AssembleArchBinarySearchSwitch(Instruction* instr); void AssembleArchLookupSwitch(Instruction* instr); void AssembleArchTableSwitch(Instruction* instr); @@ -416,6 +430,8 @@ class CodeGenerator final : public GapResolver::Assembler { WasmCompilationData* wasm_compilation_data_; CodeGenResult result_; PoisoningMitigationLevel poisoning_level_; + ZoneVector<int> block_starts_; + ZoneVector<int> instr_starts_; }; } // namespace compiler |