OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_CODE_GENERATOR_H_ | 5 #ifndef V8_COMPILER_CODE_GENERATOR_H_ |
6 #define V8_COMPILER_CODE_GENERATOR_H_ | 6 #define V8_COMPILER_CODE_GENERATOR_H_ |
7 | 7 |
8 #include <deque> | 8 #include <deque> |
9 | 9 |
10 #include "src/compiler/gap-resolver.h" | 10 #include "src/compiler/gap-resolver.h" |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 int BuildTranslation(Instruction* instr, int pc_offset, | 91 int BuildTranslation(Instruction* instr, int pc_offset, |
92 size_t frame_state_offset, | 92 size_t frame_state_offset, |
93 OutputFrameStateCombine state_combine); | 93 OutputFrameStateCombine state_combine); |
94 void BuildTranslationForFrameStateDescriptor( | 94 void BuildTranslationForFrameStateDescriptor( |
95 FrameStateDescriptor* descriptor, Instruction* instr, | 95 FrameStateDescriptor* descriptor, Instruction* instr, |
96 Translation* translation, size_t frame_state_offset, | 96 Translation* translation, size_t frame_state_offset, |
97 OutputFrameStateCombine state_combine); | 97 OutputFrameStateCombine state_combine); |
98 void AddTranslationForOperand(Translation* translation, Instruction* instr, | 98 void AddTranslationForOperand(Translation* translation, Instruction* instr, |
99 InstructionOperand* op); | 99 InstructionOperand* op); |
100 void AddNopForSmiCodeInlining(); | 100 void AddNopForSmiCodeInlining(); |
| 101 void EnsureSpaceForLazyDeopt(); |
| 102 void MarkLazyDeoptSite(); |
| 103 |
101 // =========================================================================== | 104 // =========================================================================== |
102 | |
103 struct DeoptimizationState : ZoneObject { | 105 struct DeoptimizationState : ZoneObject { |
104 public: | 106 public: |
105 BailoutId bailout_id() const { return bailout_id_; } | 107 BailoutId bailout_id() const { return bailout_id_; } |
106 int translation_id() const { return translation_id_; } | 108 int translation_id() const { return translation_id_; } |
107 int pc_offset() const { return pc_offset_; } | 109 int pc_offset() const { return pc_offset_; } |
108 | 110 |
109 DeoptimizationState(BailoutId bailout_id, int translation_id, int pc_offset) | 111 DeoptimizationState(BailoutId bailout_id, int translation_id, int pc_offset) |
110 : bailout_id_(bailout_id), | 112 : bailout_id_(bailout_id), |
111 translation_id_(translation_id), | 113 translation_id_(translation_id), |
112 pc_offset_(pc_offset) {} | 114 pc_offset_(pc_offset) {} |
113 | 115 |
114 private: | 116 private: |
115 BailoutId bailout_id_; | 117 BailoutId bailout_id_; |
116 int translation_id_; | 118 int translation_id_; |
117 int pc_offset_; | 119 int pc_offset_; |
118 }; | 120 }; |
119 | 121 |
120 InstructionSequence* code_; | 122 InstructionSequence* code_; |
121 BasicBlock* current_block_; | 123 BasicBlock* current_block_; |
122 SourcePosition current_source_position_; | 124 SourcePosition current_source_position_; |
123 MacroAssembler masm_; | 125 MacroAssembler masm_; |
124 GapResolver resolver_; | 126 GapResolver resolver_; |
125 SafepointTableBuilder safepoints_; | 127 SafepointTableBuilder safepoints_; |
126 ZoneDeque<DeoptimizationState*> deoptimization_states_; | 128 ZoneDeque<DeoptimizationState*> deoptimization_states_; |
127 ZoneDeque<Handle<Object> > deoptimization_literals_; | 129 ZoneDeque<Handle<Object> > deoptimization_literals_; |
128 TranslationBuffer translations_; | 130 TranslationBuffer translations_; |
| 131 int last_lazy_deopt_pc_; |
129 }; | 132 }; |
130 | 133 |
131 } // namespace compiler | 134 } // namespace compiler |
132 } // namespace internal | 135 } // namespace internal |
133 } // namespace v8 | 136 } // namespace v8 |
134 | 137 |
135 #endif // V8_COMPILER_CODE_GENERATOR_H | 138 #endif // V8_COMPILER_CODE_GENERATOR_H |
OLD | NEW |