| Index: src/x64/lithium-x64.cc
|
| ===================================================================
|
| --- src/x64/lithium-x64.cc (revision 11356)
|
| +++ src/x64/lithium-x64.cc (working copy)
|
| @@ -727,22 +727,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) {
|
| @@ -755,8 +739,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
|
| @@ -774,12 +760,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_));
|
| @@ -2241,9 +2221,12 @@
|
| if (pending_deoptimization_ast_id_ == instr->ast_id()) {
|
| LLazyBailout* lazy_bailout = new(zone()) LLazyBailout;
|
| LInstruction* result = AssignEnvironment(lazy_bailout);
|
| + // 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;
|
| }
|
|
|
|
|