| Index: vm/intermediate_language.cc
|
| ===================================================================
|
| --- vm/intermediate_language.cc (revision 10008)
|
| +++ vm/intermediate_language.cc (working copy)
|
| @@ -77,28 +77,33 @@
|
| #undef DEFINE_ACCEPT
|
|
|
|
|
| -void ForwardInstructionIterator::RemoveCurrentFromGraph() {
|
| - ASSERT(!current_->IsBlockEntry());
|
| - ASSERT(!current_->IsBranch());
|
| - ASSERT(!current_->IsThrow());
|
| - ASSERT(!current_->IsReturn());
|
| - ASSERT(!current_->IsReThrow());
|
| - ASSERT(current_->previous() != NULL);
|
| - ASSERT(current_ != block_entry_->last_instruction());
|
| - Instruction* prev = current_->previous();
|
| - Instruction* next = current_->next();
|
| - ASSERT(next != NULL);
|
| - ASSERT(!next->IsBlockEntry());
|
| - prev->set_next(next);
|
| - next->set_previous(prev);
|
| +Instruction* Instruction::RemoveFromGraph(bool return_previous) {
|
| + ASSERT(!IsBlockEntry());
|
| + ASSERT(!IsBranch());
|
| + ASSERT(!IsThrow());
|
| + ASSERT(!IsReturn());
|
| + ASSERT(!IsReThrow());
|
| + ASSERT(!IsGoto());
|
| + ASSERT(previous() != NULL);
|
| + Instruction* prev_instr = previous();
|
| + Instruction* next_instr = next();
|
| + ASSERT(next_instr != NULL);
|
| + ASSERT(!next_instr->IsBlockEntry());
|
| + prev_instr->set_next(next_instr);
|
| + next_instr->set_previous(prev_instr);
|
| // Reset successor and previous instruction to indicate
|
| // that the instruction is removed from the graph.
|
| - current_->set_previous(NULL);
|
| - current_->set_next(NULL);
|
| - current_ = prev;
|
| + set_previous(NULL);
|
| + set_next(NULL);
|
| + return return_previous ? prev_instr : next_instr;
|
| }
|
|
|
|
|
| +void ForwardInstructionIterator::RemoveCurrentFromGraph() {
|
| + current_ = current_->RemoveFromGraph(true); // Set current_ to previous.
|
| +}
|
| +
|
| +
|
| // Default implementation of visiting basic blocks. Can be overridden.
|
| void FlowGraphVisitor::VisitBlocks() {
|
| for (intptr_t i = 0; i < block_order_.length(); ++i) {
|
| @@ -111,11 +116,6 @@
|
| }
|
|
|
|
|
| -intptr_t InstanceCallComp::InputCount() const {
|
| - return ArgumentCount();
|
| -}
|
| -
|
| -
|
| intptr_t AllocateObjectComp::InputCount() const {
|
| return arguments().length();
|
| }
|
| @@ -1160,7 +1160,6 @@
|
|
|
|
|
| void InstanceCallComp::EmitNativeCode(FlowGraphCompiler* compiler) {
|
| - ASSERT(VerifyCallComputation(this));
|
| compiler->AddCurrentDescriptor(PcDescriptors::kDeopt,
|
| cid(),
|
| token_pos(),
|
| @@ -1175,11 +1174,6 @@
|
| }
|
|
|
|
|
| -bool InstanceCallComp::VerifyComputation() {
|
| - return VerifyCallComputation(this);
|
| -}
|
| -
|
| -
|
| LocationSummary* StaticCallComp::MakeLocationSummary() const {
|
| return MakeCallSummary();
|
| }
|
|
|