Index: src/compiler/code-generator.h |
diff --git a/src/compiler/code-generator.h b/src/compiler/code-generator.h |
index f1e99ec8d2817880df0b1892c407b341ac80ecd1..b51379728bd5794861851252256fe1645659be95 100644 |
--- a/src/compiler/code-generator.h |
+++ b/src/compiler/code-generator.h |
@@ -57,7 +57,18 @@ class CodeGenerator final : public GapResolver::Assembler { |
Frame* frame() const { return frame_access_state_->frame(); } |
Isolate* isolate() const { return info_->isolate(); } |
Linkage* linkage() const { return linkage_; } |
- |
+ bool deconstruct_frame_when_leaving() const { |
+ return deconstruct_frame_when_leaving_; |
+ } |
+ void set_deconstruct_frame_when_leaving(bool deconstruct) { |
+ deconstruct_frame_when_leaving_ = deconstruct; |
+ } |
+ bool deconstruct_frame_between_blocks() const { |
+ return deconstruct_frame_between_blocks_; |
+ } |
+ void set_deconstruct_frame_between_blocks(bool deconstruct) { |
+ deconstruct_frame_between_blocks_ = deconstruct; |
+ } |
Label* GetLabel(RpoNumber rpo) { return &labels_[rpo.ToSize()]; } |
private: |
@@ -106,6 +117,13 @@ class CodeGenerator final : public GapResolver::Assembler { |
// Generates an architecture-specific, descriptor-specific prologue |
// to set up a stack frame. |
void AssemblePrologue(); |
+ |
+ // Setup the type of frame access, and the occupied slots, based on the |
+ // needs of the block. |
+ void SetupFrameAccessForBlock(const InstructionBlock* block); |
+ |
+ void SetupStackPointer(); |
+ |
// Generates an architecture-specific, descriptor-specific return sequence |
// to tear down a stack frame. |
void AssembleReturn(); |
@@ -113,6 +131,24 @@ class CodeGenerator final : public GapResolver::Assembler { |
// Generates code to deconstruct a the caller's frame, including arguments. |
void AssembleDeconstructActivationRecord(int stack_param_delta); |
+ void AssembleDeconstructFrameWhenLeaving() { |
+ if (deconstruct_frame_when_leaving()) { |
+ AssembleDeconstructFrame(); |
+ set_deconstruct_frame_between_blocks(false); |
+ set_deconstruct_frame_when_leaving(false); |
+ } |
+ } |
+ |
+ void AssembleDeconstructFrameBetweenBlocks() { |
+ if (deconstruct_frame_between_blocks()) { |
+ AssembleDeconstructFrame(); |
+ set_deconstruct_frame_between_blocks(false); |
+ set_deconstruct_frame_when_leaving(false); |
+ } |
+ } |
+ |
+ void AssembleDeconstructFrame(); |
+ |
// Generates code to manipulate the stack in preparation for a tail call. |
void AssemblePrepareTailCall(int stack_param_delta); |
@@ -227,6 +263,8 @@ class CodeGenerator final : public GapResolver::Assembler { |
JumpTable* jump_tables_; |
OutOfLineCode* ools_; |
int osr_pc_offset_; |
+ bool deconstruct_frame_when_leaving_; |
danno
2016/03/16 18:18:11
I don't think you want this variable here, I think
Mircea Trofin
2016/03/16 20:20:46
I agree, this was from my 3 month old prototype.
|
+ bool deconstruct_frame_between_blocks_; |
danno
2016/03/16 18:18:11
I don't think this boolean belongs here at all. Se
|
}; |
} // namespace compiler |