diff options
Diffstat (limited to 'deps/v8/src/arm64/lithium-arm64.cc')
-rw-r--r-- | deps/v8/src/arm64/lithium-arm64.cc | 63 |
1 files changed, 21 insertions, 42 deletions
diff --git a/deps/v8/src/arm64/lithium-arm64.cc b/deps/v8/src/arm64/lithium-arm64.cc index 4b8208180e..e623718a1a 100644 --- a/deps/v8/src/arm64/lithium-arm64.cc +++ b/deps/v8/src/arm64/lithium-arm64.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "src/arm64/lithium-arm64.h" + #include <sstream> #include "src/arm64/lithium-codegen-arm64.h" @@ -205,13 +207,6 @@ void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) { } -void LIsObjectAndBranch::PrintDataTo(StringStream* stream) { - stream->Add("if is_object("); - value()->PrintTo(stream); - stream->Add(") then B%d else B%d", true_block_id(), false_block_id()); -} - - void LIsStringAndBranch::PrintDataTo(StringStream* stream) { stream->Add("if is_string("); value()->PrintTo(stream); @@ -763,24 +758,16 @@ void LChunkBuilder::AddInstruction(LInstruction* instr, } chunk_->AddInstruction(instr, current_block_); - if (instr->IsCall()) { + if (instr->IsCall() || instr->IsPrologue()) { HValue* hydrogen_value_for_lazy_bailout = hydrogen_val; - LInstruction* instruction_needing_environment = NULL; if (hydrogen_val->HasObservableSideEffects()) { HSimulate* sim = HSimulate::cast(hydrogen_val->next()); - instruction_needing_environment = instr; sim->ReplayEnvironment(current_block_->last_environment()); hydrogen_value_for_lazy_bailout = sim; } LInstruction* bailout = AssignEnvironment(new(zone()) LLazyBailout()); bailout->set_hydrogen_value(hydrogen_value_for_lazy_bailout); chunk_->AddInstruction(bailout, current_block_); - if (instruction_needing_environment != NULL) { - // Store the lazy deopt environment with the instruction if needed. - // Right now it is only used for LInstanceOfKnownGlobal. - instruction_needing_environment-> - SetDeferredLazyDeoptimizationEnvironment(bailout->environment()); - } } } @@ -796,6 +783,11 @@ LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) { } +LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) { + return new (zone()) LPrologue(); +} + + LInstruction* LChunkBuilder::DoAbnormalExit(HAbnormalExit* instr) { // The control instruction marking the end of a block that completed // abruptly (e.g., threw an exception). There is nothing specific to do. @@ -1540,13 +1532,6 @@ LInstruction* LChunkBuilder::DoForceRepresentation( } -LInstruction* LChunkBuilder::DoFunctionLiteral(HFunctionLiteral* instr) { - LOperand* context = UseFixed(instr->context(), cp); - return MarkAsCall( - DefineFixed(new(zone()) LFunctionLiteral(context), x0), instr); -} - - LInstruction* LChunkBuilder::DoGetCachedArrayIndex( HGetCachedArrayIndex* instr) { DCHECK(instr->value()->representation().IsTagged()); @@ -1586,21 +1571,22 @@ LInstruction* LChunkBuilder::DoInnerAllocatedObject( LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) { + LOperand* left = + UseFixed(instr->left(), InstanceOfDescriptor::LeftRegister()); + LOperand* right = + UseFixed(instr->right(), InstanceOfDescriptor::RightRegister()); LOperand* context = UseFixed(instr->context(), cp); - LInstanceOf* result = new(zone()) LInstanceOf( - context, - UseFixed(instr->left(), InstanceofStub::left()), - UseFixed(instr->right(), InstanceofStub::right())); + LInstanceOf* result = new (zone()) LInstanceOf(context, left, right); return MarkAsCall(DefineFixed(result, x0), instr); } -LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal( - HInstanceOfKnownGlobal* instr) { - LInstanceOfKnownGlobal* result = new(zone()) LInstanceOfKnownGlobal( - UseFixed(instr->context(), cp), - UseFixed(instr->left(), InstanceofStub::left())); - return MarkAsCall(DefineFixed(result, x0), instr); +LInstruction* LChunkBuilder::DoHasInPrototypeChainAndBranch( + HHasInPrototypeChainAndBranch* instr) { + LOperand* object = UseRegister(instr->object()); + LOperand* prototype = UseRegister(instr->prototype()); + LOperand* scratch = TempRegister(); + return new (zone()) LHasInPrototypeChainAndBranch(object, prototype, scratch); } @@ -1627,15 +1613,6 @@ LInstruction* LChunkBuilder::DoCompareMinusZeroAndBranch( } -LInstruction* LChunkBuilder::DoIsObjectAndBranch(HIsObjectAndBranch* instr) { - DCHECK(instr->value()->representation().IsTagged()); - LOperand* value = UseRegisterAtStart(instr->value()); - LOperand* temp1 = TempRegister(); - LOperand* temp2 = TempRegister(); - return new(zone()) LIsObjectAndBranch(value, temp1, temp2); -} - - LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) { DCHECK(instr->value()->representation().IsTagged()); LOperand* value = UseRegisterAtStart(instr->value()); @@ -2150,6 +2127,8 @@ HBitwiseBinaryOperation* LChunkBuilder::CanTransformToShiftedOp(HValue* val, DCHECK(hleft->representation().Equals(hinstr->representation())); DCHECK(hright->representation().Equals(hinstr->representation())); + if (hleft == hright) return NULL; + if ((hright->IsConstant() && LikelyFitsImmField(hinstr, HConstant::cast(hright)->Integer32Value())) || (hinstr->IsCommutative() && hleft->IsConstant() && |