Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(51)

Side by Side Diff: src/compiler/code-generator.h

Issue 1775323002: [turbofan] Frame elision for code stubs (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 // Check if a heap object can be materialized by loading from the frame, which 78 // Check if a heap object can be materialized by loading from the frame, which
79 // is usually way cheaper than materializing the actual heap object constant. 79 // is usually way cheaper than materializing the actual heap object constant.
80 bool IsMaterializableFromFrame(Handle<HeapObject> object, int* slot_return); 80 bool IsMaterializableFromFrame(Handle<HeapObject> object, int* slot_return);
81 // Check if a heap object can be materialized by loading from a heap root, 81 // Check if a heap object can be materialized by loading from a heap root,
82 // which is cheaper on some platforms than materializing the actual heap 82 // which is cheaper on some platforms than materializing the actual heap
83 // object constant. 83 // object constant.
84 bool IsMaterializableFromRoot(Handle<HeapObject> object, 84 bool IsMaterializableFromRoot(Handle<HeapObject> object,
85 Heap::RootListIndex* index_return); 85 Heap::RootListIndex* index_return);
86 86
87 // Assemble code for the specified instruction. 87 // Assemble code for the specified instruction.
88 void AssembleInstruction(Instruction* instr); 88 void AssembleInstruction(Instruction* instr, const InstructionBlock* block);
89 void AssembleSourcePosition(Instruction* instr); 89 void AssembleSourcePosition(Instruction* instr);
90 void AssembleGaps(Instruction* instr); 90 void AssembleGaps(Instruction* instr);
91 91
92 // =========================================================================== 92 // ===========================================================================
93 // ============= Architecture-specific code generation methods. ============== 93 // ============= Architecture-specific code generation methods. ==============
94 // =========================================================================== 94 // ===========================================================================
95 95
96 void AssembleArchInstruction(Instruction* instr); 96 void AssembleArchInstruction(Instruction* instr);
97 void AssembleArchJump(RpoNumber target); 97 void AssembleArchJump(RpoNumber target);
98 void AssembleArchBranch(Instruction* instr, BranchInfo* branch); 98 void AssembleArchBranch(Instruction* instr, BranchInfo* branch);
99 void AssembleArchBoolean(Instruction* instr, FlagsCondition condition); 99 void AssembleArchBoolean(Instruction* instr, FlagsCondition condition);
100 void AssembleArchLookupSwitch(Instruction* instr); 100 void AssembleArchLookupSwitch(Instruction* instr);
101 void AssembleArchTableSwitch(Instruction* instr); 101 void AssembleArchTableSwitch(Instruction* instr);
102 102
103 void AssembleDeoptimizerCall(int deoptimization_id, 103 void AssembleDeoptimizerCall(int deoptimization_id,
104 Deoptimizer::BailoutType bailout_type); 104 Deoptimizer::BailoutType bailout_type);
105 105
106 // Generates an architecture-specific, descriptor-specific prologue 106 // Generates an architecture-specific, descriptor-specific prologue
107 // to set up a stack frame. 107 // to set up a stack frame.
108 void AssemblePrologue(); 108 void AssemblePrologue();
109
110 void AssembleSetupStackPointer();
111
109 // Generates an architecture-specific, descriptor-specific return sequence 112 // Generates an architecture-specific, descriptor-specific return sequence
110 // to tear down a stack frame. 113 // to tear down a stack frame.
111 void AssembleReturn(); 114 void AssembleReturn();
112 115
113 // Generates code to deconstruct a the caller's frame, including arguments. 116 // Generates code to deconstruct a the caller's frame, including arguments.
114 void AssembleDeconstructActivationRecord(int stack_param_delta); 117 void AssembleDeconstructActivationRecord(int stack_param_delta);
115 118
119 void AssembleDeconstructFrame();
120
116 // Generates code to manipulate the stack in preparation for a tail call. 121 // Generates code to manipulate the stack in preparation for a tail call.
117 void AssemblePrepareTailCall(int stack_param_delta); 122 void AssemblePrepareTailCall(int stack_param_delta);
118 123
119 // Generates code to pop current frame if it is an arguments adaptor frame. 124 // Generates code to pop current frame if it is an arguments adaptor frame.
120 void AssemblePopArgumentsAdaptorFrame(Register args_reg, Register scratch1, 125 void AssemblePopArgumentsAdaptorFrame(Register args_reg, Register scratch1,
121 Register scratch2, Register scratch3); 126 Register scratch2, Register scratch3);
122 127
123 // =========================================================================== 128 // ===========================================================================
124 // ============== Architecture-specific gap resolver methods. ================ 129 // ============== Architecture-specific gap resolver methods. ================
125 // =========================================================================== 130 // ===========================================================================
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 JumpTable* jump_tables_; 232 JumpTable* jump_tables_;
228 OutOfLineCode* ools_; 233 OutOfLineCode* ools_;
229 int osr_pc_offset_; 234 int osr_pc_offset_;
230 }; 235 };
231 236
232 } // namespace compiler 237 } // namespace compiler
233 } // namespace internal 238 } // namespace internal
234 } // namespace v8 239 } // namespace v8
235 240
236 #endif // V8_COMPILER_CODE_GENERATOR_H 241 #endif // V8_COMPILER_CODE_GENERATOR_H
OLDNEW
« no previous file with comments | « src/compiler/arm64/code-generator-arm64.cc ('k') | src/compiler/code-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698