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

Unified Diff: src/compiler/instruction-selector.cc

Issue 505133002: Unit test of instruction selection for calls with deoptimization. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address review comments. Created 6 years, 4 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 | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc
index 3e3943f3720fcdf09f135525fbdbd21d2066cb40..733624e86622f16e253309a0b1749fd004efed77 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -1082,17 +1082,19 @@ void InstructionSelector::VisitDeoptimize(Node* deopt) {
DCHECK(deopt->op()->opcode() == IrOpcode::kDeoptimize);
Node* state = deopt->InputAt(0);
FrameStateDescriptor* descriptor = GetFrameStateDescriptor(state);
+ int deoptimization_id = sequence()->AddDeoptimizationEntry(descriptor);
InstructionOperandVector inputs(zone());
- inputs.reserve(descriptor->size());
+ inputs.reserve(descriptor->size() + 1);
+
+ OperandGenerator g(this);
+ inputs.push_back(g.TempImmediate(deoptimization_id));
AddFrameStateInputs(state, &inputs, descriptor);
- DCHECK_EQ(descriptor->size(), inputs.size());
+ DCHECK_EQ(descriptor->size() + 1, inputs.size());
- int deoptimization_id = sequence()->AddDeoptimizationEntry(descriptor);
- Emit(kArchDeoptimize | MiscField::encode(deoptimization_id), 0, NULL,
- inputs.size(), &inputs.front(), 0, NULL);
+ Emit(kArchDeoptimize, 0, NULL, inputs.size(), &inputs.front(), 0, NULL);
}
« no previous file with comments | « src/compiler/ia32/code-generator-ia32.cc ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698