Revision: 6763
Author: [email protected]
Date: Mon Feb 14 01:23:26 2011
Log: Small cleanup of unused code in hydrogen IR.
Review URL: http://codereview.chromium.org/6513008
http://code.google.com/p/v8/source/detail?r=6763
Modified:
/branches/bleeding_edge/src/hydrogen-instructions.h
/branches/bleeding_edge/src/hydrogen.cc
/branches/bleeding_edge/src/hydrogen.h
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Fri Feb 11 06:34:02
2011
+++ /branches/bleeding_edge/src/hydrogen-instructions.h Mon Feb 14 01:23:26
2011
@@ -611,9 +611,6 @@
virtual HType CalculateInferredType() const;
- // Helper for type conversions used by normal and phi instructions.
- void InsertInputConversion(HInstruction* previous, int index, HType
type);
-
#ifdef DEBUG
virtual void Verify() = 0;
#endif
=======================================
--- /branches/bleeding_edge/src/hydrogen.cc Fri Feb 11 06:34:02 2011
+++ /branches/bleeding_edge/src/hydrogen.cc Mon Feb 14 01:23:26 2011
@@ -65,6 +65,7 @@
first_instruction_index_(-1),
last_instruction_index_(-1),
deleted_phis_(4),
+ parent_loop_header_(NULL),
is_inline_return_target_(false) {
}
@@ -293,20 +294,6 @@
// Check that every block is finished.
ASSERT(IsFinished());
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
=======================================
--- /branches/bleeding_edge/src/hydrogen.h Fri Feb 11 05:20:06 2011
+++ /branches/bleeding_edge/src/hydrogen.h Mon Feb 14 01:23:26 2011
@@ -103,16 +103,14 @@
void ClearEnvironment() { last_environment_ = NULL; }
bool HasEnvironment() const { return last_environment_ != NULL; }
void UpdateEnvironment(HEnvironment* env) { last_environment_ = env; }
- HBasicBlock* parent_loop_header() const {
- if (!HasParentLoopHeader()) return NULL;
- return parent_loop_header_.get();
- }
+ HBasicBlock* parent_loop_header() const { return parent_loop_header_; }
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);
@@ -135,9 +133,6 @@
// Goto (target block)
bool IsInlineReturnTarget() const { return is_inline_return_target_; }
void MarkAsInlineReturnTarget() { is_inline_return_target_ = true; }
-
- Handle<Object> cond() { return cond_; }
- void set_cond(Handle<Object> value) { cond_ = value; }
#ifdef DEBUG
void Verify();
@@ -166,9 +161,8 @@
int first_instruction_index_;
int last_instruction_index_;
ZoneList<int> deleted_phis_;
- SetOncePointer<HBasicBlock> parent_loop_header_;
+ HBasicBlock* parent_loop_header_;
bool is_inline_return_target_;
- Handle<Object> cond_;
};
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev