| 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 "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
| 9 #include "src/compiler/instruction.h" | 9 #include "src/compiler/instruction.h" |
| 10 #include "src/deoptimizer.h" | 10 #include "src/deoptimizer.h" |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 // Generates an architecture-specific, descriptor-specific prologue | 89 // Generates an architecture-specific, descriptor-specific prologue |
| 90 // to set up a stack frame. | 90 // to set up a stack frame. |
| 91 void AssemblePrologue(); | 91 void AssemblePrologue(); |
| 92 // Generates an architecture-specific, descriptor-specific return sequence | 92 // Generates an architecture-specific, descriptor-specific return sequence |
| 93 // to tear down a stack frame. | 93 // to tear down a stack frame. |
| 94 void AssembleReturn(); | 94 void AssembleReturn(); |
| 95 | 95 |
| 96 // Generates code to deconstruct a the caller's frame, including arguments. | 96 // Generates code to deconstruct a the caller's frame, including arguments. |
| 97 void AssembleDeconstructActivationRecord(int stack_param_delta); | 97 void AssembleDeconstructActivationRecord(int stack_param_delta); |
| 98 | 98 |
| 99 // Generates code to manipulate the stack in preparation for a tail call. |
| 100 void AssemblePrepareTailCall(int stack_param_delta); |
| 101 |
| 99 // =========================================================================== | 102 // =========================================================================== |
| 100 // ============== Architecture-specific gap resolver methods. ================ | 103 // ============== Architecture-specific gap resolver methods. ================ |
| 101 // =========================================================================== | 104 // =========================================================================== |
| 102 | 105 |
| 103 // Interface used by the gap resolver to emit moves and swaps. | 106 // Interface used by the gap resolver to emit moves and swaps. |
| 104 void AssembleMove(InstructionOperand* source, | 107 void AssembleMove(InstructionOperand* source, |
| 105 InstructionOperand* destination) final; | 108 InstructionOperand* destination) final; |
| 106 void AssembleSwap(InstructionOperand* source, | 109 void AssembleSwap(InstructionOperand* source, |
| 107 InstructionOperand* destination) final; | 110 InstructionOperand* destination) final; |
| 108 | 111 |
| (...skipping 24 matching lines...) Expand all Loading... |
| 133 void BuildTranslationForFrameStateDescriptor( | 136 void BuildTranslationForFrameStateDescriptor( |
| 134 FrameStateDescriptor* descriptor, Instruction* instr, | 137 FrameStateDescriptor* descriptor, Instruction* instr, |
| 135 Translation* translation, size_t frame_state_offset, | 138 Translation* translation, size_t frame_state_offset, |
| 136 OutputFrameStateCombine state_combine); | 139 OutputFrameStateCombine state_combine); |
| 137 void AddTranslationForOperand(Translation* translation, Instruction* instr, | 140 void AddTranslationForOperand(Translation* translation, Instruction* instr, |
| 138 InstructionOperand* op, MachineType type); | 141 InstructionOperand* op, MachineType type); |
| 139 void AddNopForSmiCodeInlining(); | 142 void AddNopForSmiCodeInlining(); |
| 140 void EnsureSpaceForLazyDeopt(); | 143 void EnsureSpaceForLazyDeopt(); |
| 141 void MarkLazyDeoptSite(); | 144 void MarkLazyDeoptSite(); |
| 142 | 145 |
| 146 // Converts the delta in the number of stack parameter passed from a tail |
| 147 // caller to the callee into the distance (in pointers) the SP must be |
| 148 // adjusted, taking frame elision and other relevant factors into |
| 149 // consideration. |
| 150 int TailCallFrameStackSlotDelta(int stack_param_delta); |
| 151 |
| 143 // =========================================================================== | 152 // =========================================================================== |
| 144 | 153 |
| 145 struct DeoptimizationState : ZoneObject { | 154 struct DeoptimizationState : ZoneObject { |
| 146 public: | 155 public: |
| 147 BailoutId bailout_id() const { return bailout_id_; } | 156 BailoutId bailout_id() const { return bailout_id_; } |
| 148 int translation_id() const { return translation_id_; } | 157 int translation_id() const { return translation_id_; } |
| 149 int pc_offset() const { return pc_offset_; } | 158 int pc_offset() const { return pc_offset_; } |
| 150 | 159 |
| 151 DeoptimizationState(BailoutId bailout_id, int translation_id, int pc_offset) | 160 DeoptimizationState(BailoutId bailout_id, int translation_id, int pc_offset) |
| 152 : bailout_id_(bailout_id), | 161 : bailout_id_(bailout_id), |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 OutOfLineCode* ools_; | 197 OutOfLineCode* ools_; |
| 189 int osr_pc_offset_; | 198 int osr_pc_offset_; |
| 190 bool needs_frame_; | 199 bool needs_frame_; |
| 191 }; | 200 }; |
| 192 | 201 |
| 193 } // namespace compiler | 202 } // namespace compiler |
| 194 } // namespace internal | 203 } // namespace internal |
| 195 } // namespace v8 | 204 } // namespace v8 |
| 196 | 205 |
| 197 #endif // V8_COMPILER_CODE_GENERATOR_H | 206 #endif // V8_COMPILER_CODE_GENERATOR_H |
| OLD | NEW |