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

Unified Diff: src/compiler/pipeline.cc

Issue 1259203002: [turbofan] Implement tail calls with differing stack parameter counts (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix bugs in frameless tail calls Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: src/compiler/pipeline.cc
diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc
index d2c5fa6f35c3e2b465df7d6d07daab2b52df8187..9ff875f85577305f6d23045c7dcd23dab5ce96dc 100644
--- a/src/compiler/pipeline.cc
+++ b/src/compiler/pipeline.cc
@@ -87,7 +87,7 @@ class PipelineData {
instruction_zone_scope_(zone_pool_),
instruction_zone_(instruction_zone_scope_.zone()),
sequence_(nullptr),
- frame_(nullptr),
+ frame_(!info->IsStub()),
register_allocation_zone_scope_(zone_pool_),
register_allocation_zone_(register_allocation_zone_scope_.zone()),
register_allocation_data_(nullptr) {
@@ -127,7 +127,7 @@ class PipelineData {
instruction_zone_scope_(zone_pool_),
instruction_zone_(instruction_zone_scope_.zone()),
sequence_(nullptr),
- frame_(nullptr),
+ frame_(false),
register_allocation_zone_scope_(zone_pool_),
register_allocation_zone_(register_allocation_zone_scope_.zone()),
register_allocation_data_(nullptr) {}
@@ -155,7 +155,7 @@ class PipelineData {
instruction_zone_scope_(zone_pool_),
instruction_zone_(sequence->zone()),
sequence_(sequence),
- frame_(nullptr),
+ frame_(false),
register_allocation_zone_scope_(zone_pool_),
register_allocation_zone_(register_allocation_zone_scope_.zone()),
register_allocation_data_(nullptr) {}
@@ -209,7 +209,7 @@ class PipelineData {
Zone* instruction_zone() const { return instruction_zone_; }
InstructionSequence* sequence() const { return sequence_; }
- Frame* frame() const { return frame_; }
+ Frame* frame() { return &frame_; }
Zone* register_allocation_zone() const { return register_allocation_zone_; }
RegisterAllocationData* register_allocation_data() const {
@@ -238,7 +238,6 @@ class PipelineData {
instruction_zone_scope_.Destroy();
instruction_zone_ = nullptr;
sequence_ = nullptr;
- frame_ = nullptr;
}
void DeleteRegisterAllocationZone() {
@@ -248,20 +247,18 @@ class PipelineData {
register_allocation_data_ = nullptr;
}
- void InitializeInstructionSequence() {
+ void InitializeInstructionSequence(Linkage* linkage) {
DCHECK(sequence_ == nullptr);
InstructionBlocks* instruction_blocks =
InstructionSequence::InstructionBlocksFor(instruction_zone(),
schedule());
sequence_ = new (instruction_zone()) InstructionSequence(
- info()->isolate(), instruction_zone(), instruction_blocks);
+ info()->isolate(), instruction_zone(), instruction_blocks, frame());
}
void InitializeRegisterAllocationData(const RegisterConfiguration* config,
const char* debug_name) {
- DCHECK(frame_ == nullptr);
DCHECK(register_allocation_data_ == nullptr);
- frame_ = new (instruction_zone()) Frame();
register_allocation_data_ = new (register_allocation_zone())
RegisterAllocationData(config, register_allocation_zone(), frame(),
sequence(), debug_name);
@@ -297,7 +294,7 @@ class PipelineData {
ZonePool::Scope instruction_zone_scope_;
Zone* instruction_zone_;
InstructionSequence* sequence_;
- Frame* frame_;
+ Frame frame_;
// All objects in the following group of fields are allocated in
// register_allocation_zone_. They are all set to NULL when the zone is
@@ -1202,10 +1199,10 @@ Handle<Code> Pipeline::ScheduleAndGenerateCode(
data->schedule());
}
- data->InitializeInstructionSequence();
+ Linkage linkage(call_descriptor);
+ data->InitializeInstructionSequence(&linkage);
// Select and schedule instructions covering the scheduled graph.
- Linkage linkage(call_descriptor);
Run<InstructionSelectionPhase>(&linkage);
if (FLAG_trace_turbo && !data->MayHaveUnverifiableGraph()) {

Powered by Google App Engine
This is Rietveld 408576698