| Index: src/arm/lithium-arm.cc
|
| diff --git a/src/arm/lithium-arm.cc b/src/arm/lithium-arm.cc
|
| index 998b73b62e9242a6dd2393a919f199f2af5c1859..5bca4f50ac6044db764a7ef6b92d3af919929fc4 100644
|
| --- a/src/arm/lithium-arm.cc
|
| +++ b/src/arm/lithium-arm.cc
|
| @@ -260,6 +260,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);
|
| @@ -718,12 +726,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);
|
| @@ -735,12 +738,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);
|
| }
|
| }
|
|
|
| @@ -1089,6 +1087,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());
|
| @@ -1925,13 +1931,10 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| } else {
|
| value = UseRegister(instr->value());
|
| LOperand* temp1 = TempRegister();
|
| - LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
|
| - : NULL;
|
| - LOperand* temp3 = FixedTemp(d11);
|
| + LOperand* temp2 = FixedTemp(d11);
|
| res = DefineSameAsFirst(new(zone()) LTaggedToI(value,
|
| temp1,
|
| - temp2,
|
| - temp3));
|
| + temp2));
|
| res = AssignEnvironment(res);
|
| }
|
| return res;
|
| @@ -1951,14 +1954,12 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| return AssignPointerMap(result);
|
| } else if (to.IsSmi()) {
|
| LOperand* value = UseRegister(instr->value());
|
| - return AssignEnvironment(DefineAsRegister(new(zone()) LDoubleToSmi(value,
|
| - TempRegister(), TempRegister())));
|
| + return AssignEnvironment(
|
| + DefineAsRegister(new(zone()) LDoubleToSmi(value)));
|
| } else {
|
| ASSERT(to.IsInteger32());
|
| LOperand* value = UseRegister(instr->value());
|
| - LOperand* temp1 = TempRegister();
|
| - LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() : NULL;
|
| - LDoubleToI* res = new(zone()) LDoubleToI(value, temp1, temp2);
|
| + LDoubleToI* res = new(zone()) LDoubleToI(value);
|
| return AssignEnvironment(DefineAsRegister(res));
|
| }
|
| } else if (from.IsInteger32()) {
|
| @@ -2450,6 +2451,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;
|
| }
|
| @@ -2496,20 +2499,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.
|
|
|