Index: src/mips/lithium-mips.cc |
=================================================================== |
--- src/mips/lithium-mips.cc (revision 11356) |
+++ src/mips/lithium-mips.cc (working copy) |
@@ -732,22 +732,6 @@ |
} |
-LInstruction* LChunkBuilder::SetInstructionPendingDeoptimizationEnvironment( |
- LInstruction* instr, int ast_id) { |
- ASSERT(instruction_pending_deoptimization_environment_ == NULL); |
- ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber); |
- instruction_pending_deoptimization_environment_ = instr; |
- pending_deoptimization_ast_id_ = ast_id; |
- return instr; |
-} |
- |
- |
-void LChunkBuilder::ClearInstructionPendingDeoptimizationEnvironment() { |
- instruction_pending_deoptimization_environment_ = NULL; |
- pending_deoptimization_ast_id_ = AstNode::kNoNumber; |
-} |
- |
- |
LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr, |
HInstruction* hinstr, |
CanDeoptimize can_deoptimize) { |
@@ -760,8 +744,10 @@ |
if (hinstr->HasObservableSideEffects()) { |
ASSERT(hinstr->next()->IsSimulate()); |
HSimulate* sim = HSimulate::cast(hinstr->next()); |
- instr = SetInstructionPendingDeoptimizationEnvironment( |
- instr, sim->ast_id()); |
+ ASSERT(instruction_pending_deoptimization_environment_ == NULL); |
+ ASSERT(pending_deoptimization_ast_id_ == AstNode::kNoNumber); |
+ instruction_pending_deoptimization_environment_ = instr; |
+ pending_deoptimization_ast_id_ = sim->ast_id(); |
} |
// If instruction does not have side-effects lazy deoptimization |
@@ -779,12 +765,6 @@ |
} |
-LInstruction* LChunkBuilder::MarkAsSaveDoubles(LInstruction* instr) { |
- instr->MarkAsSaveDoubles(); |
- return instr; |
-} |
- |
- |
LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) { |
ASSERT(!instr->HasPointerMap()); |
instr->set_pointer_map(new(zone()) LPointerMap(position_)); |
@@ -2248,9 +2228,12 @@ |
if (pending_deoptimization_ast_id_ == instr->ast_id()) { |
LInstruction* result = new(zone()) LLazyBailout; |
result = AssignEnvironment(result); |
+ // Store the lazy deopt environment with the instruction if needed. Right |
+ // now it is only used for LInstanceOfKnownGlobal. |
instruction_pending_deoptimization_environment_-> |
- set_deoptimization_environment(result->environment()); |
- ClearInstructionPendingDeoptimizationEnvironment(); |
+ SetDeferredLazyDeoptimizationEnvironment(result->environment()); |
+ instruction_pending_deoptimization_environment_ = NULL; |
+ pending_deoptimization_ast_id_ = AstNode::kNoNumber; |
return result; |
} |