| Index: src/mips/lithium-mips.cc
|
| diff --git a/src/mips/lithium-mips.cc b/src/mips/lithium-mips.cc
|
| index 861e65dfbb1bb66bc8f94fb7bcf333515cd56dfd..18e89ddd5c047bd2beaf90b67b0678378af060fa 100644
|
| --- a/src/mips/lithium-mips.cc
|
| +++ b/src/mips/lithium-mips.cc
|
| @@ -723,12 +723,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
| // Left shifts can deoptimize if we shift by > 0 and the result cannot be
|
| // truncated to smi.
|
| if (instr->representation().IsSmi() && constant_value > 0) {
|
| - for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
|
| - if (!it.value()->CheckFlag(HValue::kTruncatingToSmi)) {
|
| - does_deopt = true;
|
| - break;
|
| - }
|
| - }
|
| + does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToSmi);
|
| }
|
| } else {
|
| right = UseRegisterAtStart(right_value);
|
| @@ -740,12 +735,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
| if (FLAG_opt_safe_uint32_operations) {
|
| does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
| } else {
|
| - for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
|
| - if (!it.value()->CheckFlag(HValue::kTruncatingToInt32)) {
|
| - does_deopt = true;
|
| - break;
|
| - }
|
| - }
|
| + does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
|
| }
|
| }
|
|
|
| @@ -2371,6 +2361,8 @@ LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
|
|
|
|
|
| LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) {
|
| + instr->ReplayEnvironment(current_block_->last_environment());
|
| +
|
| // There are no real uses of a captured object.
|
| return NULL;
|
| }
|
| @@ -2417,20 +2409,7 @@ LInstruction* LChunkBuilder::DoIsConstructCallAndBranch(
|
|
|
|
|
| LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
|
| - HEnvironment* env = current_block_->last_environment();
|
| - ASSERT(env != NULL);
|
| -
|
| - env->set_ast_id(instr->ast_id());
|
| -
|
| - env->Drop(instr->pop_count());
|
| - for (int i = instr->values()->length() - 1; i >= 0; --i) {
|
| - HValue* value = instr->values()->at(i);
|
| - if (instr->HasAssignedIndexAt(i)) {
|
| - env->Bind(instr->GetAssignedIndexAt(i), value);
|
| - } else {
|
| - env->Push(value);
|
| - }
|
| - }
|
| + instr->ReplayEnvironment(current_block_->last_environment());
|
|
|
| // If there is an instruction pending deoptimization environment create a
|
| // lazy bailout instruction to capture the environment.
|
|
|