| Index: src/compiler/code-generator.h
|
| diff --git a/src/compiler/code-generator.h b/src/compiler/code-generator.h
|
| index 469c435f8c50f8f1539e64fda0150c2d9dfa882e..84ec1d6aa94927ad783649aaa39e19644cbe7db6 100644
|
| --- a/src/compiler/code-generator.h
|
| +++ b/src/compiler/code-generator.h
|
| @@ -62,6 +62,8 @@ class CodeGenerator V8_FINAL : public GapResolver::Assembler {
|
| void AssembleArchBranch(Instruction* instr, FlagsCondition condition);
|
| void AssembleArchBoolean(Instruction* instr, FlagsCondition condition);
|
|
|
| + void AssembleDeoptimizerCall(int deoptimization_id);
|
| +
|
| // Generates an architecture-specific, descriptor-specific prologue
|
| // to set up a stack frame.
|
| void AssemblePrologue();
|
| @@ -82,43 +84,51 @@ class CodeGenerator V8_FINAL : public GapResolver::Assembler {
|
| // ===========================================================================
|
| // Deoptimization table construction
|
| void AddSafepointAndDeopt(Instruction* instr);
|
| - void UpdateSafepointsWithDeoptimizationPc();
|
| - void RecordLazyDeoptimizationEntry(Instruction* instr,
|
| - Safepoint::Id safepoint_id);
|
| + void EmitLazyDeoptimizationCallTable();
|
| void PopulateDeoptimizationData(Handle<Code> code);
|
| int DefineDeoptimizationLiteral(Handle<Object> literal);
|
| - int BuildTranslation(Instruction* instr, int frame_state_offset);
|
| + FrameStateDescriptor* GetFrameStateDescriptor(Instruction* instr,
|
| + int frame_state_offset);
|
| + int BuildTranslation(Instruction* instr, int frame_state_offset,
|
| + OutputFrameStateCombine state_combine);
|
| void AddTranslationForOperand(Translation* translation, Instruction* instr,
|
| InstructionOperand* op);
|
| void AddNopForSmiCodeInlining();
|
| // ===========================================================================
|
|
|
| - class LazyDeoptimizationEntry V8_FINAL {
|
| + class DeoptimizationPoint : public ZoneObject {
|
| public:
|
| - LazyDeoptimizationEntry(int position_after_call, Label* continuation,
|
| - Label* deoptimization, Safepoint::Id safepoint_id)
|
| - : position_after_call_(position_after_call),
|
| - continuation_(continuation),
|
| - deoptimization_(deoptimization),
|
| - safepoint_id_(safepoint_id) {}
|
| -
|
| - int position_after_call() const { return position_after_call_; }
|
| - Label* continuation() const { return continuation_; }
|
| - Label* deoptimization() const { return deoptimization_; }
|
| - Safepoint::Id safepoint_id() const { return safepoint_id_; }
|
| + int state_id() const { return state_id_; }
|
| + int lazy_state_id() const { return lazy_state_id_; }
|
| + FrameStateDescriptor* descriptor() const { return descriptor_; }
|
| + Safepoint::Id safepoint() const { return safepoint_; }
|
| +
|
| + DeoptimizationPoint(int state_id, int lazy_state_id,
|
| + FrameStateDescriptor* descriptor,
|
| + Safepoint::Id safepoint)
|
| + : state_id_(state_id),
|
| + lazy_state_id_(lazy_state_id),
|
| + descriptor_(descriptor),
|
| + safepoint_(safepoint) {}
|
|
|
| private:
|
| - int position_after_call_;
|
| - Label* continuation_;
|
| - Label* deoptimization_;
|
| - Safepoint::Id safepoint_id_;
|
| + int state_id_;
|
| + int lazy_state_id_;
|
| + FrameStateDescriptor* descriptor_;
|
| + Safepoint::Id safepoint_;
|
| };
|
|
|
| struct DeoptimizationState : ZoneObject {
|
| - int translation_id_;
|
| + public:
|
| + BailoutId bailout_id() const { return bailout_id_; }
|
| + int translation_id() const { return translation_id_; }
|
|
|
| - explicit DeoptimizationState(int translation_id)
|
| - : translation_id_(translation_id) {}
|
| + DeoptimizationState(BailoutId bailout_id, int translation_id)
|
| + : bailout_id_(bailout_id), translation_id_(translation_id) {}
|
| +
|
| + private:
|
| + BailoutId bailout_id_;
|
| + int translation_id_;
|
| };
|
|
|
| InstructionSequence* code_;
|
| @@ -127,7 +137,7 @@ class CodeGenerator V8_FINAL : public GapResolver::Assembler {
|
| MacroAssembler masm_;
|
| GapResolver resolver_;
|
| SafepointTableBuilder safepoints_;
|
| - ZoneDeque<LazyDeoptimizationEntry> lazy_deoptimization_entries_;
|
| + ZoneDeque<DeoptimizationPoint*> deoptimization_points_;
|
| ZoneDeque<DeoptimizationState*> deoptimization_states_;
|
| ZoneDeque<Handle<Object> > deoptimization_literals_;
|
| TranslationBuffer translations_;
|
|
|