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

Unified Diff: vm/intermediate_language.cc

Issue 10833068: Refactor building arguments for InstanceCall and fix deoptimization environment for pushed argument… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/runtime/
Patch Set: Created 8 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
« no previous file with comments | « vm/intermediate_language.h ('k') | vm/intermediate_language_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
}
« no previous file with comments | « vm/intermediate_language.h ('k') | vm/intermediate_language_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698