Chromium Code Reviews| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 50 InstructionSequence* code, CompilationInfo* info); | 50 InstructionSequence* code, CompilationInfo* info); |
| 51 | 51 |
| 52 // Generate native code. | 52 // Generate native code. |
| 53 Handle<Code> GenerateCode(); | 53 Handle<Code> GenerateCode(); |
| 54 | 54 |
| 55 InstructionSequence* code() const { return code_; } | 55 InstructionSequence* code() const { return code_; } |
| 56 FrameAccessState* frame_access_state() const { return frame_access_state_; } | 56 FrameAccessState* frame_access_state() const { return frame_access_state_; } |
| 57 Frame* frame() const { return frame_access_state_->frame(); } | 57 Frame* frame() const { return frame_access_state_->frame(); } |
| 58 Isolate* isolate() const { return info_->isolate(); } | 58 Isolate* isolate() const { return info_->isolate(); } |
| 59 Linkage* linkage() const { return linkage_; } | 59 Linkage* linkage() const { return linkage_; } |
| 60 | |
|
danno
2016/03/24 12:53:05
nit: Can you please add this line back? Seems like
Mircea Trofin
2016/03/24 17:46:11
Done.
| |
| 61 Label* GetLabel(RpoNumber rpo) { return &labels_[rpo.ToSize()]; } | 60 Label* GetLabel(RpoNumber rpo) { return &labels_[rpo.ToSize()]; } |
| 62 | 61 |
| 63 private: | 62 private: |
| 64 MacroAssembler* masm() { return &masm_; } | 63 MacroAssembler* masm() { return &masm_; } |
| 65 GapResolver* resolver() { return &resolver_; } | 64 GapResolver* resolver() { return &resolver_; } |
| 66 SafepointTableBuilder* safepoints() { return &safepoints_; } | 65 SafepointTableBuilder* safepoints() { return &safepoints_; } |
| 67 Zone* zone() const { return code()->zone(); } | 66 Zone* zone() const { return code()->zone(); } |
| 68 CompilationInfo* info() const { return info_; } | 67 CompilationInfo* info() const { return info_; } |
| 69 | 68 |
| 70 // Checks if {block} will appear directly after {current_block_} when | 69 // Checks if {block} will appear directly after {current_block_} when |
| (...skipping 28 matching lines...) Expand all Loading... | |
| 99 void AssembleArchBoolean(Instruction* instr, FlagsCondition condition); | 98 void AssembleArchBoolean(Instruction* instr, FlagsCondition condition); |
| 100 void AssembleArchLookupSwitch(Instruction* instr); | 99 void AssembleArchLookupSwitch(Instruction* instr); |
| 101 void AssembleArchTableSwitch(Instruction* instr); | 100 void AssembleArchTableSwitch(Instruction* instr); |
| 102 | 101 |
| 103 void AssembleDeoptimizerCall(int deoptimization_id, | 102 void AssembleDeoptimizerCall(int deoptimization_id, |
| 104 Deoptimizer::BailoutType bailout_type); | 103 Deoptimizer::BailoutType bailout_type); |
| 105 | 104 |
| 106 // Generates an architecture-specific, descriptor-specific prologue | 105 // Generates an architecture-specific, descriptor-specific prologue |
| 107 // to set up a stack frame. | 106 // to set up a stack frame. |
| 108 void AssemblePrologue(); | 107 void AssemblePrologue(); |
| 108 | |
| 109 void SetupStackPointer(); | |
| 110 | |
| 109 // Generates an architecture-specific, descriptor-specific return sequence | 111 // Generates an architecture-specific, descriptor-specific return sequence |
| 110 // to tear down a stack frame. | 112 // to tear down a stack frame. |
| 111 void AssembleReturn(); | 113 void AssembleReturn(); |
| 112 | 114 |
| 113 // Generates code to deconstruct a the caller's frame, including arguments. | 115 // Generates code to deconstruct a the caller's frame, including arguments. |
| 114 void AssembleDeconstructActivationRecord(int stack_param_delta); | 116 void AssembleDeconstructActivationRecord(int stack_param_delta); |
| 115 | 117 |
| 118 void AssembleDeconstructFrame(); | |
| 119 | |
| 116 // Generates code to manipulate the stack in preparation for a tail call. | 120 // Generates code to manipulate the stack in preparation for a tail call. |
| 117 void AssemblePrepareTailCall(int stack_param_delta); | 121 void AssemblePrepareTailCall(int stack_param_delta); |
| 118 | 122 |
| 119 // Generates code to pop current frame if it is an arguments adaptor frame. | 123 // Generates code to pop current frame if it is an arguments adaptor frame. |
| 120 void AssemblePopArgumentsAdaptorFrame(Register args_reg, Register scratch1, | 124 void AssemblePopArgumentsAdaptorFrame(Register args_reg, Register scratch1, |
| 121 Register scratch2, Register scratch3); | 125 Register scratch2, Register scratch3); |
| 122 | 126 |
| 123 // =========================================================================== | 127 // =========================================================================== |
| 124 // ============== Architecture-specific gap resolver methods. ================ | 128 // ============== Architecture-specific gap resolver methods. ================ |
| 125 // =========================================================================== | 129 // =========================================================================== |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 227 JumpTable* jump_tables_; | 231 JumpTable* jump_tables_; |
| 228 OutOfLineCode* ools_; | 232 OutOfLineCode* ools_; |
| 229 int osr_pc_offset_; | 233 int osr_pc_offset_; |
| 230 }; | 234 }; |
| 231 | 235 |
| 232 } // namespace compiler | 236 } // namespace compiler |
| 233 } // namespace internal | 237 } // namespace internal |
| 234 } // namespace v8 | 238 } // namespace v8 |
| 235 | 239 |
| 236 #endif // V8_COMPILER_CODE_GENERATOR_H | 240 #endif // V8_COMPILER_CODE_GENERATOR_H |
| OLD | NEW |