| Index: src/ia32/lithium-ia32.cc
|
| diff --git a/src/ia32/lithium-ia32.cc b/src/ia32/lithium-ia32.cc
|
| index b3158685fcf40e3e60d7088b8af06e9e39fa0775..b6e75414d98044916df7f2e86de46ba3a832fc29 100644
|
| --- a/src/ia32/lithium-ia32.cc
|
| +++ b/src/ia32/lithium-ia32.cc
|
| @@ -290,6 +290,14 @@ void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
| }
|
|
|
|
|
| +void LStoreCodeEntry::PrintDataTo(StringStream* stream) {
|
| + stream->Add(" = ");
|
| + function()->PrintTo(stream);
|
| + stream->Add(".code_entry = ");
|
| + code_object()->PrintTo(stream);
|
| +}
|
| +
|
| +
|
| void LInnerAllocatedObject::PrintDataTo(StringStream* stream) {
|
| stream->Add(" = ");
|
| base_object()->PrintTo(stream);
|
| @@ -772,12 +780,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 = UseFixed(right_value, ecx);
|
| @@ -789,12 +792,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);
|
| }
|
| }
|
|
|
| @@ -1160,6 +1158,14 @@ LInstruction* LChunkBuilder::DoPushArgument(HPushArgument* instr) {
|
| }
|
|
|
|
|
| +LInstruction* LChunkBuilder::DoStoreCodeEntry(
|
| + HStoreCodeEntry* store_code_entry) {
|
| + LOperand* function = UseRegister(store_code_entry->function());
|
| + LOperand* code_object = UseTempRegister(store_code_entry->code_object());
|
| + return new(zone()) LStoreCodeEntry(function, code_object);
|
| +}
|
| +
|
| +
|
| LInstruction* LChunkBuilder::DoInnerAllocatedObject(
|
| HInnerAllocatedObject* inner_object) {
|
| LOperand* base_object = UseRegisterAtStart(inner_object->base_object());
|
| @@ -2574,6 +2580,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;
|
| }
|
| @@ -2622,20 +2630,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.
|
|
|