Small cleanup of unused code in hydrogen IR.

Review URL: http://codereview.chromium.org/6513008

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@6763 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 46bde305
...@@ -611,9 +611,6 @@ class HValue: public ZoneObject { ...@@ -611,9 +611,6 @@ class HValue: public ZoneObject {
virtual HType CalculateInferredType() const; virtual HType CalculateInferredType() const;
// Helper for type conversions used by normal and phi instructions.
void InsertInputConversion(HInstruction* previous, int index, HType type);
#ifdef DEBUG #ifdef DEBUG
virtual void Verify() = 0; virtual void Verify() = 0;
#endif #endif
......
...@@ -65,6 +65,7 @@ HBasicBlock::HBasicBlock(HGraph* graph) ...@@ -65,6 +65,7 @@ HBasicBlock::HBasicBlock(HGraph* graph)
first_instruction_index_(-1), first_instruction_index_(-1),
last_instruction_index_(-1), last_instruction_index_(-1),
deleted_phis_(4), deleted_phis_(4),
parent_loop_header_(NULL),
is_inline_return_target_(false) { is_inline_return_target_(false) {
} }
...@@ -293,20 +294,6 @@ void HBasicBlock::Verify() { ...@@ -293,20 +294,6 @@ void HBasicBlock::Verify() {
// Check that every block is finished. // Check that every block is finished.
ASSERT(IsFinished()); ASSERT(IsFinished());
ASSERT(block_id() >= 0); ASSERT(block_id() >= 0);
// Verify that all blocks targetting a branch target, have the same boolean
// value on top of their expression stack.
if (!cond().is_null()) {
ASSERT(predecessors()->length() > 0);
for (int i = 1; i < predecessors()->length(); i++) {
HBasicBlock* pred = predecessors()->at(i);
HValue* top = pred->last_environment()->Top();
ASSERT(top->IsConstant());
Object* a = *HConstant::cast(top)->handle();
Object* b = *cond();
ASSERT(a == b);
}
}
} }
#endif #endif
......
...@@ -103,16 +103,14 @@ class HBasicBlock: public ZoneObject { ...@@ -103,16 +103,14 @@ class HBasicBlock: public ZoneObject {
void ClearEnvironment() { last_environment_ = NULL; } void ClearEnvironment() { last_environment_ = NULL; }
bool HasEnvironment() const { return last_environment_ != NULL; } bool HasEnvironment() const { return last_environment_ != NULL; }
void UpdateEnvironment(HEnvironment* env) { last_environment_ = env; } void UpdateEnvironment(HEnvironment* env) { last_environment_ = env; }
HBasicBlock* parent_loop_header() const { HBasicBlock* parent_loop_header() const { return parent_loop_header_; }
if (!HasParentLoopHeader()) return NULL;
return parent_loop_header_.get();
}
void set_parent_loop_header(HBasicBlock* block) { void set_parent_loop_header(HBasicBlock* block) {
parent_loop_header_.set(block); ASSERT(parent_loop_header_ == NULL);
parent_loop_header_ = block;
} }
bool HasParentLoopHeader() const { return parent_loop_header_.is_set(); } bool HasParentLoopHeader() const { return parent_loop_header_ != NULL; }
void SetJoinId(int id); void SetJoinId(int id);
...@@ -136,9 +134,6 @@ class HBasicBlock: public ZoneObject { ...@@ -136,9 +134,6 @@ class HBasicBlock: public ZoneObject {
bool IsInlineReturnTarget() const { return is_inline_return_target_; } bool IsInlineReturnTarget() const { return is_inline_return_target_; }
void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; } void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; }
Handle<Object> cond() { return cond_; }
void set_cond(Handle<Object> value) { cond_ = value; }
#ifdef DEBUG #ifdef DEBUG
void Verify(); void Verify();
#endif #endif
...@@ -166,9 +161,8 @@ class HBasicBlock: public ZoneObject { ...@@ -166,9 +161,8 @@ class HBasicBlock: public ZoneObject {
int first_instruction_index_; int first_instruction_index_;
int last_instruction_index_; int last_instruction_index_;
ZoneList<int> deleted_phis_; ZoneList<int> deleted_phis_;
SetOncePointer<HBasicBlock> parent_loop_header_; HBasicBlock* parent_loop_header_;
bool is_inline_return_target_; bool is_inline_return_target_;
Handle<Object> cond_;
}; };
......
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