Commit 31027880 authored by sanjoy@chromium.org's avatar sanjoy@chromium.org

Rename LChunkBase to LChunk, LChunk to LPlatformChunk and remove some unneeded...

Rename LChunkBase to LChunk, LChunk to LPlatformChunk and remove some unneeded explicit constructor attributes.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10701157

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12067 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 812bc1db
......@@ -407,14 +407,14 @@ void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
}
int LChunk::GetNextSpillIndex(bool is_double) {
int LPlatformChunk::GetNextSpillIndex(bool is_double) {
// Skip a slot if for a double-width slot.
if (is_double) spill_slot_count_++;
return spill_slot_count_++;
}
LOperand* LChunk::GetNextSpillSlot(bool is_double) {
LOperand* LPlatformChunk::GetNextSpillSlot(bool is_double) {
int index = GetNextSpillIndex(is_double);
if (is_double) {
return LDoubleStackSlot::Create(index, zone());
......@@ -424,9 +424,9 @@ LOperand* LChunk::GetNextSpillSlot(bool is_double) {
}
LChunk* LChunkBuilder::Build() {
LPlatformChunk* LChunkBuilder::Build() {
ASSERT(is_unused());
chunk_ = new(zone()) LChunk(info(), graph());
chunk_ = new(zone()) LPlatformChunk(info(), graph());
HPhase phase("L_Building chunk", chunk_);
status_ = BUILDING;
const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
......@@ -445,7 +445,7 @@ void LChunkBuilder::Abort(const char* format, ...) {
if (FLAG_trace_bailout) {
SmartArrayPointer<char> name(
info()->shared_info()->DebugName()->ToCString());
PrintF("Aborting LChunk building in @\"%s\": ", *name);
PrintF("Aborting LPlatformChunk building in @\"%s\": ", *name);
va_list arguments;
va_start(arguments, format);
OS::VPrint(format, arguments);
......
......@@ -2224,10 +2224,10 @@ class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> {
class LChunkBuilder;
class LChunk: public LChunkBase {
class LPlatformChunk: public LChunk {
public:
explicit LChunk(CompilationInfo* info, HGraph* graph)
: LChunkBase(info, graph) { }
LPlatformChunk(CompilationInfo* info, HGraph* graph)
: LChunk(info, graph) { }
int GetNextSpillIndex(bool is_double);
LOperand* GetNextSpillSlot(bool is_double);
......@@ -2252,7 +2252,7 @@ class LChunkBuilder BASE_EMBEDDED {
pending_deoptimization_ast_id_(AstNode::kNoNumber) { }
// Build the sequence for the graph.
LChunk* Build();
LPlatformChunk* Build();
// Declare methods that deal with the individual node types.
#define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
......@@ -2271,7 +2271,7 @@ class LChunkBuilder BASE_EMBEDDED {
ABORTED
};
LChunk* chunk() const { return chunk_; }
LPlatformChunk* chunk() const { return chunk_; }
CompilationInfo* info() const { return info_; }
HGraph* graph() const { return graph_; }
Zone* zone() const { return zone_; }
......@@ -2371,7 +2371,7 @@ class LChunkBuilder BASE_EMBEDDED {
LInstruction* DoArithmeticT(Token::Value op,
HArithmeticBinaryOperation* instr);
LChunk* chunk_;
LPlatformChunk* chunk_;
CompilationInfo* info_;
HGraph* const graph_;
Zone* zone_;
......
......@@ -43,9 +43,9 @@ class SafepointGenerator;
class LCodeGen BASE_EMBEDDED {
public:
LCodeGen(LChunkBase* chunk, MacroAssembler* assembler, CompilationInfo* info)
LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
: zone_(info->zone()),
chunk_(static_cast<LChunk*>(chunk)),
chunk_(static_cast<LPlatformChunk*>(chunk)),
masm_(assembler),
info_(info),
current_block_(-1),
......@@ -157,7 +157,7 @@ class LCodeGen BASE_EMBEDDED {
return info()->is_classic_mode() ? kNonStrictMode : kStrictMode;
}
LChunk* chunk() const { return chunk_; }
LPlatformChunk* chunk() const { return chunk_; }
Scope* scope() const { return scope_; }
HGraph* graph() const { return chunk_->graph(); }
......@@ -350,7 +350,7 @@ class LCodeGen BASE_EMBEDDED {
void EnsureSpaceForLazyDeopt();
Zone* zone_;
LChunk* const chunk_;
LPlatformChunk* const chunk_;
MacroAssembler* const masm_;
CompilationInfo* const info_;
......
......@@ -312,7 +312,7 @@ static bool MakeCrankshaftCode(CompilationInfo* info) {
if (!graph->Optimize(&bailout_reason)) {
if (!bailout_reason.is_empty()) builder.Bailout(*bailout_reason);
} else {
LChunkBase* chunk = LChunkBase::NewChunk(graph);
LChunk* chunk = LChunk::NewChunk(graph);
if (chunk != NULL) {
Handle<Code> optimized_code = chunk->Codegen();
if (!optimized_code.is_null()) {
......
......@@ -9229,7 +9229,7 @@ void HTracer::TraceCompilation(FunctionLiteral* function) {
}
void HTracer::TraceLithium(const char* name, LChunkBase* chunk) {
void HTracer::TraceLithium(const char* name, LChunk* chunk) {
Trace(name, chunk->graph(), chunk);
}
......@@ -9239,7 +9239,7 @@ void HTracer::TraceHydrogen(const char* name, HGraph* graph) {
}
void HTracer::Trace(const char* name, HGraph* graph, LChunkBase* chunk) {
void HTracer::Trace(const char* name, HGraph* graph, LChunk* chunk) {
Tag tag(this, "cfg");
PrintStringProperty("name", name);
const ZoneList<HBasicBlock*>* blocks = graph->blocks();
......@@ -9501,7 +9501,7 @@ const char* const HPhase::kTotal = "Total";
void HPhase::Begin(const char* name,
HGraph* graph,
LChunkBase* chunk,
LChunk* chunk,
LAllocator* allocator) {
name_ = name;
graph_ = graph;
......
......@@ -48,7 +48,7 @@ class HGraph;
class HLoopInformation;
class HTracer;
class LAllocator;
class LChunkBase;
class LChunk;
class LiveRange;
......@@ -1336,7 +1336,7 @@ class HPhase BASE_EMBEDDED {
HPhase(const char* name, HGraph* graph) {
Begin(name, graph, NULL, NULL);
}
HPhase(const char* name, LChunkBase* chunk) {
HPhase(const char* name, LChunk* chunk) {
Begin(name, NULL, chunk, NULL);
}
HPhase(const char* name, LAllocator* allocator) {
......@@ -1350,14 +1350,14 @@ class HPhase BASE_EMBEDDED {
private:
void Begin(const char* name,
HGraph* graph,
LChunkBase* chunk,
LChunk* chunk,
LAllocator* allocator);
void End() const;
int64_t start_;
const char* name_;
HGraph* graph_;
LChunkBase* chunk_;
LChunk* chunk_;
LAllocator* allocator_;
unsigned start_allocation_size_;
};
......@@ -1367,7 +1367,7 @@ class HTracer: public Malloced {
public:
void TraceCompilation(FunctionLiteral* function);
void TraceHydrogen(const char* name, HGraph* graph);
void TraceLithium(const char* name, LChunkBase* chunk);
void TraceLithium(const char* name, LChunk* chunk);
void TraceLiveRanges(const char* name, LAllocator* allocator);
static HTracer* Instance() {
......@@ -1408,7 +1408,7 @@ class HTracer: public Malloced {
}
void TraceLiveRange(LiveRange* range, const char* type, Zone* zone);
void Trace(const char* name, HGraph* graph, LChunkBase* chunk);
void Trace(const char* name, HGraph* graph, LChunk* chunk);
void FlushToFile();
void PrintEmptyProperty(const char* name) {
......
......@@ -46,9 +46,9 @@ class SafepointGenerator;
class LCodeGen BASE_EMBEDDED {
public:
LCodeGen(LChunkBase* chunk, MacroAssembler* assembler, CompilationInfo* info)
LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
: zone_(info->zone()),
chunk_(static_cast<LChunk*>(chunk)),
chunk_(static_cast<LPlatformChunk*>(chunk)),
masm_(assembler),
info_(info),
current_block_(-1),
......@@ -150,7 +150,7 @@ class LCodeGen BASE_EMBEDDED {
return info()->is_classic_mode() ? kNonStrictMode : kStrictMode;
}
LChunk* chunk() const { return chunk_; }
LPlatformChunk* chunk() const { return chunk_; }
Scope* scope() const { return scope_; }
HGraph* graph() const { return chunk_->graph(); }
......@@ -330,7 +330,7 @@ class LCodeGen BASE_EMBEDDED {
void EmitPushTaggedOperand(LOperand* operand);
Zone* zone_;
LChunk* const chunk_;
LPlatformChunk* const chunk_;
MacroAssembler* const masm_;
CompilationInfo* const info_;
......
......@@ -366,7 +366,7 @@ void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
}
int LChunk::GetNextSpillIndex(bool is_double) {
int LPlatformChunk::GetNextSpillIndex(bool is_double) {
// Skip a slot if for a double-width slot.
if (is_double) {
spill_slot_count_++;
......@@ -377,7 +377,7 @@ int LChunk::GetNextSpillIndex(bool is_double) {
}
LOperand* LChunk::GetNextSpillSlot(bool is_double) {
LOperand* LPlatformChunk::GetNextSpillSlot(bool is_double) {
int index = GetNextSpillIndex(is_double);
if (is_double) {
return LDoubleStackSlot::Create(index, zone());
......@@ -438,9 +438,9 @@ void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
}
LChunk* LChunkBuilder::Build() {
LPlatformChunk* LChunkBuilder::Build() {
ASSERT(is_unused());
chunk_ = new(zone()) LChunk(info(), graph());
chunk_ = new(zone()) LPlatformChunk(info(), graph());
HPhase phase("L_Building chunk", chunk_);
status_ = BUILDING;
......@@ -465,7 +465,7 @@ void LChunkBuilder::Abort(const char* format, ...) {
if (FLAG_trace_bailout) {
SmartArrayPointer<char> name(
info()->shared_info()->DebugName()->ToCString());
PrintF("Aborting LChunk building in @\"%s\": ", *name);
PrintF("Aborting LPlatformChunk building in @\"%s\": ", *name);
va_list arguments;
va_start(arguments, format);
OS::VPrint(format, arguments);
......
......@@ -2319,10 +2319,10 @@ class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> {
class LChunkBuilder;
class LChunk: public LChunkBase {
class LPlatformChunk: public LChunk {
public:
LChunk(CompilationInfo* info, HGraph* graph)
: LChunkBase(info, graph),
LPlatformChunk(CompilationInfo* info, HGraph* graph)
: LChunk(info, graph),
num_double_slots_(0) { }
int GetNextSpillIndex(bool is_double);
......@@ -2353,7 +2353,7 @@ class LChunkBuilder BASE_EMBEDDED {
pending_deoptimization_ast_id_(AstNode::kNoNumber) { }
// Build the sequence for the graph.
LChunk* Build();
LPlatformChunk* Build();
// Declare methods that deal with the individual node types.
#define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
......@@ -2371,7 +2371,7 @@ class LChunkBuilder BASE_EMBEDDED {
ABORTED
};
LChunk* chunk() const { return chunk_; }
LPlatformChunk* chunk() const { return chunk_; }
CompilationInfo* info() const { return info_; }
HGraph* graph() const { return graph_; }
Zone* zone() const { return zone_; }
......@@ -2475,7 +2475,7 @@ class LChunkBuilder BASE_EMBEDDED {
LInstruction* DoArithmeticT(Token::Value op,
HArithmeticBinaryOperation* instr);
LChunk* chunk_;
LPlatformChunk* chunk_;
CompilationInfo* info_;
HGraph* const graph_;
Zone* zone_;
......
......@@ -1062,9 +1062,9 @@ void LAllocator::ResolvePhis(HBasicBlock* block) {
}
bool LAllocator::Allocate(LChunkBase* chunk) {
bool LAllocator::Allocate(LChunk* chunk) {
ASSERT(chunk_ == NULL);
chunk_ = static_cast<LChunk*>(chunk);
chunk_ = static_cast<LPlatformChunk*>(chunk);
MeetRegisterConstraints();
if (!AllocationOk()) return false;
ResolvePhis();
......
......@@ -48,7 +48,7 @@ class BitVector;
class StringStream;
class LArgument;
class LChunk;
class LPlatformChunk;
class LOperand;
class LUnallocated;
class LConstantOperand;
......@@ -445,7 +445,7 @@ class LAllocator BASE_EMBEDDED {
// Returns the register kind required by the given virtual register.
RegisterKind RequiredRegisterKind(int virtual_register) const;
bool Allocate(LChunkBase* chunk);
bool Allocate(LChunk* chunk);
const ZoneList<LiveRange*>* live_ranges() const { return &live_ranges_; }
const Vector<LiveRange*>* fixed_live_ranges() const {
......@@ -455,7 +455,7 @@ class LAllocator BASE_EMBEDDED {
return &fixed_double_live_ranges_;
}
LChunk* chunk() const { return chunk_; }
LPlatformChunk* chunk() const { return chunk_; }
HGraph* graph() const { return graph_; }
Zone* zone() const { return zone_; }
......@@ -598,7 +598,7 @@ class LAllocator BASE_EMBEDDED {
Zone* zone_;
LChunk* chunk_;
LPlatformChunk* chunk_;
// During liveness analysis keep a mapping from block id to live_in sets
// for blocks already analyzed.
......
......@@ -257,14 +257,14 @@ int ElementsKindToShiftSize(ElementsKind elements_kind) {
}
LLabel* LChunkBase::GetLabel(int block_id) const {
LLabel* LChunk::GetLabel(int block_id) const {
HBasicBlock* block = graph_->blocks()->at(block_id);
int first_instruction = block->first_instruction_index();
return LLabel::cast(instructions_[first_instruction]);
}
int LChunkBase::LookupDestination(int block_id) const {
int LChunk::LookupDestination(int block_id) const {
LLabel* cur = GetLabel(block_id);
while (cur->replacement() != NULL) {
cur = cur->replacement();
......@@ -272,13 +272,13 @@ int LChunkBase::LookupDestination(int block_id) const {
return cur->block_id();
}
Label* LChunkBase::GetAssemblyLabel(int block_id) const {
Label* LChunk::GetAssemblyLabel(int block_id) const {
LLabel* label = GetLabel(block_id);
ASSERT(!label->HasReplacement());
return label->label();
}
void LChunkBase::MarkEmptyBlocks() {
void LChunk::MarkEmptyBlocks() {
HPhase phase("L_Mark empty blocks", this);
for (int i = 0; i < graph()->blocks()->length(); ++i) {
HBasicBlock* block = graph()->blocks()->at(i);
......@@ -314,7 +314,7 @@ void LChunkBase::MarkEmptyBlocks() {
}
void LChunkBase::AddInstruction(LInstruction* instr, HBasicBlock* block) {
void LChunk::AddInstruction(LInstruction* instr, HBasicBlock* block) {
LInstructionGap* gap = new(graph_->zone()) LInstructionGap(block);
int index = -1;
if (instr->IsControl()) {
......@@ -333,12 +333,12 @@ void LChunkBase::AddInstruction(LInstruction* instr, HBasicBlock* block) {
}
LConstantOperand* LChunkBase::DefineConstantOperand(HConstant* constant) {
LConstantOperand* LChunk::DefineConstantOperand(HConstant* constant) {
return LConstantOperand::Create(constant->id(), zone());
}
int LChunkBase::GetParameterStackSlot(int index) const {
int LChunk::GetParameterStackSlot(int index) const {
// The receiver is at index 0, the first parameter at index 1, so we
// shift all parameter indexes down by the number of parameters, and
// make sure they end up negative so they are distinguishable from
......@@ -350,47 +350,47 @@ int LChunkBase::GetParameterStackSlot(int index) const {
// A parameter relative to ebp in the arguments stub.
int LChunkBase::ParameterAt(int index) {
int LChunk::ParameterAt(int index) {
ASSERT(-1 <= index); // -1 is the receiver.
return (1 + info()->scope()->num_parameters() - index) *
kPointerSize;
}
LGap* LChunkBase::GetGapAt(int index) const {
LGap* LChunk::GetGapAt(int index) const {
return LGap::cast(instructions_[index]);
}
bool LChunkBase::IsGapAt(int index) const {
bool LChunk::IsGapAt(int index) const {
return instructions_[index]->IsGap();
}
int LChunkBase::NearestGapPos(int index) const {
int LChunk::NearestGapPos(int index) const {
while (!IsGapAt(index)) index--;
return index;
}
void LChunkBase::AddGapMove(int index, LOperand* from, LOperand* to) {
void LChunk::AddGapMove(int index, LOperand* from, LOperand* to) {
GetGapAt(index)->GetOrCreateParallelMove(
LGap::START, zone())->AddMove(from, to, zone());
}
HConstant* LChunkBase::LookupConstant(LConstantOperand* operand) const {
HConstant* LChunk::LookupConstant(LConstantOperand* operand) const {
return HConstant::cast(graph_->LookupValue(operand->index()));
}
Representation LChunkBase::LookupLiteralRepresentation(
Representation LChunk::LookupLiteralRepresentation(
LConstantOperand* operand) const {
return graph_->LookupValue(operand->index())->representation();
}
LChunkBase* LChunkBase::NewChunk(HGraph* graph) {
LChunk* LChunk::NewChunk(HGraph* graph) {
int values = graph->GetMaximumValueID();
if (values > LUnallocated::kMaxVirtualRegisters) {
if (FLAG_trace_bailout) {
......@@ -400,7 +400,7 @@ LChunkBase* LChunkBase::NewChunk(HGraph* graph) {
}
LAllocator allocator(values, graph);
LChunkBuilder builder(graph->info(), graph, &allocator);
LChunkBase* chunk = builder.Build();
LChunk* chunk = builder.Build();
if (chunk == NULL) return NULL;
if (!allocator.Allocate(chunk)) {
......@@ -414,7 +414,7 @@ LChunkBase* LChunkBase::NewChunk(HGraph* graph) {
}
Handle<Code> LChunkBase::Codegen() {
Handle<Code> LChunk::Codegen() {
MacroAssembler assembler(info()->isolate(), NULL, 0);
LCodeGen generator(this, &assembler, info());
......
......@@ -622,15 +622,15 @@ class DeepIterator BASE_EMBEDDED {
};
class LChunk;
class LPlatformChunk;
class LGap;
class LLabel;
// Superclass providing data and behavior common to all the
// arch-specific LChunk classes.
class LChunkBase: public ZoneObject {
// arch-specific LPlatformChunk classes.
class LChunk: public ZoneObject {
public:
static LChunkBase* NewChunk(HGraph* graph);
static LChunk* NewChunk(HGraph* graph);
void AddInstruction(LInstruction* instruction, HBasicBlock* block);
LConstantOperand* DefineConstantOperand(HConstant* constant);
......@@ -666,7 +666,7 @@ class LChunkBase: public ZoneObject {
Handle<Code> Codegen();
protected:
LChunkBase(CompilationInfo* info, HGraph* graph)
LChunk(CompilationInfo* info, HGraph* graph)
: spill_slot_count_(0),
info_(info),
graph_(graph),
......
......@@ -43,9 +43,9 @@ class SafepointGenerator;
class LCodeGen BASE_EMBEDDED {
public:
LCodeGen(LChunkBase* chunk, MacroAssembler* assembler, CompilationInfo* info)
LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
: zone_(info->zone()),
chunk_(static_cast<LChunk*>(chunk)),
chunk_(static_cast<LPlatformChunk*>(chunk)),
masm_(assembler),
info_(info),
current_block_(-1),
......@@ -153,7 +153,7 @@ class LCodeGen BASE_EMBEDDED {
return info()->is_classic_mode() ? kNonStrictMode : kStrictMode;
}
LChunk* chunk() const { return chunk_; }
LPlatformChunk* chunk() const { return chunk_; }
Scope* scope() const { return scope_; }
HGraph* graph() const { return chunk_->graph(); }
......@@ -354,7 +354,7 @@ class LCodeGen BASE_EMBEDDED {
void EnsureSpaceForLazyDeopt();
Zone* zone_;
LChunk* const chunk_;
LPlatformChunk* const chunk_;
MacroAssembler* const masm_;
CompilationInfo* const info_;
......
......@@ -407,14 +407,14 @@ void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
}
int LChunk::GetNextSpillIndex(bool is_double) {
int LPlatformChunk::GetNextSpillIndex(bool is_double) {
// Skip a slot if for a double-width slot.
if (is_double) spill_slot_count_++;
return spill_slot_count_++;
}
LOperand* LChunk::GetNextSpillSlot(bool is_double) {
LOperand* LPlatformChunk::GetNextSpillSlot(bool is_double) {
int index = GetNextSpillIndex(is_double);
if (is_double) {
return LDoubleStackSlot::Create(index, zone());
......@@ -424,9 +424,9 @@ LOperand* LChunk::GetNextSpillSlot(bool is_double) {
}
LChunk* LChunkBuilder::Build() {
LPlatformChunk* LChunkBuilder::Build() {
ASSERT(is_unused());
chunk_ = new(zone()) LChunk(info(), graph());
chunk_ = new(zone()) LPlatformChunk(info(), graph());
HPhase phase("L_Building chunk", chunk_);
status_ = BUILDING;
const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
......@@ -445,7 +445,7 @@ void LChunkBuilder::Abort(const char* format, ...) {
if (FLAG_trace_bailout) {
SmartArrayPointer<char> name(
info()->shared_info()->DebugName()->ToCString());
PrintF("Aborting LChunk building in @\"%s\": ", *name);
PrintF("Aborting LPlatformChunk building in @\"%s\": ", *name);
va_list arguments;
va_start(arguments, format);
OS::VPrint(format, arguments);
......
......@@ -2188,10 +2188,10 @@ class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> {
class LChunkBuilder;
class LChunk: public LChunkBase {
class LPlatformChunk: public LChunk {
public:
explicit LChunk(CompilationInfo* info, HGraph* graph)
: LChunkBase(info, graph) { }
LPlatformChunk(CompilationInfo* info, HGraph* graph)
: LChunk(info, graph) { }
int GetNextSpillIndex(bool is_double);
LOperand* GetNextSpillSlot(bool is_double);
......@@ -2216,7 +2216,7 @@ class LChunkBuilder BASE_EMBEDDED {
pending_deoptimization_ast_id_(AstNode::kNoNumber) { }
// Build the sequence for the graph.
LChunk* Build();
LPlatformChunk* Build();
// Declare methods that deal with the individual node types.
#define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
......@@ -2231,7 +2231,7 @@ class LChunkBuilder BASE_EMBEDDED {
ABORTED
};
LChunk* chunk() const { return chunk_; }
LPlatformChunk* chunk() const { return chunk_; }
CompilationInfo* info() const { return info_; }
HGraph* graph() const { return graph_; }
Zone* zone() const { return zone_; }
......@@ -2332,7 +2332,7 @@ class LChunkBuilder BASE_EMBEDDED {
LInstruction* DoArithmeticT(Token::Value op,
HArithmeticBinaryOperation* instr);
LChunk* chunk_;
LPlatformChunk* chunk_;
CompilationInfo* info_;
HGraph* const graph_;
Zone* zone_;
......
......@@ -45,9 +45,9 @@ class SafepointGenerator;
class LCodeGen BASE_EMBEDDED {
public:
LCodeGen(LChunkBase* chunk, MacroAssembler* assembler, CompilationInfo* info)
LCodeGen(LChunk* chunk, MacroAssembler* assembler, CompilationInfo* info)
: zone_(info->zone()),
chunk_(static_cast<LChunk*>(chunk)),
chunk_(static_cast<LPlatformChunk*>(chunk)),
masm_(assembler),
info_(info),
current_block_(-1),
......@@ -140,7 +140,7 @@ class LCodeGen BASE_EMBEDDED {
return info()->is_classic_mode() ? kNonStrictMode : kStrictMode;
}
LChunk* chunk() const { return chunk_; }
LPlatformChunk* chunk() const { return chunk_; }
Scope* scope() const { return scope_; }
HGraph* graph() const { return chunk_->graph(); }
......@@ -325,7 +325,7 @@ class LCodeGen BASE_EMBEDDED {
void EnsureSpaceForLazyDeopt(int space_needed);
Zone* zone_;
LChunk* const chunk_;
LPlatformChunk* const chunk_;
MacroAssembler* const masm_;
CompilationInfo* const info_;
......
......@@ -358,12 +358,12 @@ void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
}
int LChunk::GetNextSpillIndex(bool is_double) {
int LPlatformChunk::GetNextSpillIndex(bool is_double) {
return spill_slot_count_++;
}
LOperand* LChunk::GetNextSpillSlot(bool is_double) {
LOperand* LPlatformChunk::GetNextSpillSlot(bool is_double) {
// All stack slots are Double stack slots on x64.
// Alternatively, at some point, start using half-size
// stack slots for int32 values.
......@@ -427,9 +427,9 @@ void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
}
LChunk* LChunkBuilder::Build() {
LPlatformChunk* LChunkBuilder::Build() {
ASSERT(is_unused());
chunk_ = new(zone()) LChunk(info(), graph());
chunk_ = new(zone()) LPlatformChunk(info(), graph());
HPhase phase("L_Building chunk", chunk_);
status_ = BUILDING;
const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
......@@ -448,7 +448,7 @@ void LChunkBuilder::Abort(const char* format, ...) {
if (FLAG_trace_bailout) {
SmartArrayPointer<char> name(
info()->shared_info()->DebugName()->ToCString());
PrintF("Aborting LChunk building in @\"%s\": ", *name);
PrintF("Aborting LPlatformChunk building in @\"%s\": ", *name);
va_list arguments;
va_start(arguments, format);
OS::VPrint(format, arguments);
......
......@@ -2178,10 +2178,10 @@ class LLoadFieldByIndex: public LTemplateInstruction<1, 2, 0> {
class LChunkBuilder;
class LChunk: public LChunkBase {
class LPlatformChunk: public LChunk {
public:
LChunk(CompilationInfo* info, HGraph* graph)
: LChunkBase(info, graph) { }
LPlatformChunk(CompilationInfo* info, HGraph* graph)
: LChunk(info, graph) { }
int GetNextSpillIndex(bool is_double);
LOperand* GetNextSpillSlot(bool is_double);
......@@ -2206,7 +2206,7 @@ class LChunkBuilder BASE_EMBEDDED {
pending_deoptimization_ast_id_(AstNode::kNoNumber) { }
// Build the sequence for the graph.
LChunk* Build();
LPlatformChunk* Build();
// Declare methods that deal with the individual node types.
#define DECLARE_DO(type) LInstruction* Do##type(H##type* node);
......@@ -2224,7 +2224,7 @@ class LChunkBuilder BASE_EMBEDDED {
ABORTED
};
LChunk* chunk() const { return chunk_; }
LPlatformChunk* chunk() const { return chunk_; }
CompilationInfo* info() const { return info_; }
HGraph* graph() const { return graph_; }
Zone* zone() const { return zone_; }
......@@ -2328,7 +2328,7 @@ class LChunkBuilder BASE_EMBEDDED {
LInstruction* DoArithmeticT(Token::Value op,
HArithmeticBinaryOperation* instr);
LChunk* chunk_;
LPlatformChunk* chunk_;
CompilationInfo* info_;
HGraph* const graph_;
Zone* zone_;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment