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, 18 insertions, 6 deletions
diff --git a/deps/v8/src/compiler/code-generator.h b/deps/v8/src/compiler/code-generator.h index 7aed85a37f..e20a8be774 100644 --- a/deps/v8/src/compiler/code-generator.h +++ b/deps/v8/src/compiler/code-generator.h @@ -12,6 +12,7 @@ #include "src/macro-assembler.h" #include "src/safepoint-table.h" #include "src/source-position-table.h" +#include "src/trap-handler/trap-handler.h" namespace v8 { namespace internal { @@ -52,7 +53,9 @@ class InstructionOperandIterator { class CodeGenerator final : public GapResolver::Assembler { public: explicit CodeGenerator(Frame* frame, Linkage* linkage, - InstructionSequence* code, CompilationInfo* info); + InstructionSequence* code, CompilationInfo* info, + ZoneVector<trap_handler::ProtectedInstructionData>* + protected_instructions = nullptr); // Generate native code. Handle<Code> GenerateCode(); @@ -65,6 +68,16 @@ class CodeGenerator final : public GapResolver::Assembler { Label* GetLabel(RpoNumber rpo) { return &labels_[rpo.ToSize()]; } + void AddProtectedInstruction(int instr_offset, int landing_offset); + + void AssembleSourcePosition(Instruction* instr); + + void AssembleSourcePosition(SourcePosition source_position); + + // Record a safepoint with the given pointer map. + void RecordSafepoint(ReferenceMap* references, Safepoint::Kind kind, + int arguments, Safepoint::DeoptMode deopt_mode); + private: MacroAssembler* masm() { return &masm_; } GapResolver* resolver() { return &resolver_; } @@ -82,10 +95,6 @@ class CodeGenerator final : public GapResolver::Assembler { // assembling code, in which case, a fall-through can be used. bool IsNextInAssemblyOrder(RpoNumber block) const; - // Record a safepoint with the given pointer map. - void RecordSafepoint(ReferenceMap* references, Safepoint::Kind kind, - int arguments, Safepoint::DeoptMode deopt_mode); - // Check if a heap object can be materialized by loading from a heap root, // which is cheaper on some platforms than materializing the actual heap // object constant. @@ -100,7 +109,6 @@ class CodeGenerator final : public GapResolver::Assembler { // Assemble code for the specified instruction. CodeGenResult AssembleInstruction(Instruction* instr, const InstructionBlock* block); - void AssembleSourcePosition(Instruction* instr); void AssembleGaps(Instruction* instr); // Returns true if a instruction is a tail call that needs to adjust the stack @@ -116,6 +124,7 @@ class CodeGenerator final : public GapResolver::Assembler { void AssembleArchJump(RpoNumber target); void AssembleArchBranch(Instruction* instr, BranchInfo* branch); void AssembleArchBoolean(Instruction* instr, FlagsCondition condition); + void AssembleArchTrap(Instruction* instr, FlagsCondition condition); void AssembleArchLookupSwitch(Instruction* instr); void AssembleArchTableSwitch(Instruction* instr); @@ -213,6 +222,7 @@ class CodeGenerator final : public GapResolver::Assembler { FrameStateDescriptor* descriptor, InstructionOperandIterator* iter, Translation* translation, OutputFrameStateCombine state_combine); void TranslateStateValueDescriptor(StateValueDescriptor* desc, + StateValueList* nested, Translation* translation, InstructionOperandIterator* iter); void TranslateFrameStateDescriptorOperands(FrameStateDescriptor* desc, @@ -279,7 +289,9 @@ class CodeGenerator final : public GapResolver::Assembler { JumpTable* jump_tables_; OutOfLineCode* ools_; int osr_pc_offset_; + int optimized_out_literal_id_; SourcePositionTableBuilder source_position_table_builder_; + ZoneVector<trap_handler::ProtectedInstructionData>* protected_instructions_; }; } // namespace compiler |