| Index: src/crankshaft/s390/lithium-s390.cc
|
| diff --git a/src/crankshaft/ppc/lithium-ppc.cc b/src/crankshaft/s390/lithium-s390.cc
|
| similarity index 96%
|
| copy from src/crankshaft/ppc/lithium-ppc.cc
|
| copy to src/crankshaft/s390/lithium-s390.cc
|
| index c43a64dbb4cffedf24509415480903e921baad0e..76b507d2c494b61b9a3eaca6599bac7133ef270a 100644
|
| --- a/src/crankshaft/ppc/lithium-ppc.cc
|
| +++ b/src/crankshaft/s390/lithium-s390.cc
|
| @@ -2,13 +2,13 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -#include "src/crankshaft/ppc/lithium-ppc.h"
|
| +#include "src/crankshaft/s390/lithium-s390.h"
|
|
|
| #include <sstream>
|
|
|
| #include "src/crankshaft/hydrogen-osr.h"
|
| #include "src/crankshaft/lithium-inl.h"
|
| -#include "src/crankshaft/ppc/lithium-codegen-ppc.h"
|
| +#include "src/crankshaft/s390/lithium-codegen-s390.h"
|
|
|
| namespace v8 {
|
| namespace internal {
|
| @@ -39,7 +39,6 @@ void LInstruction::VerifyCall() {
|
| }
|
| #endif
|
|
|
| -
|
| void LInstruction::PrintTo(StringStream* stream) {
|
| stream->Add("%s ", this->Mnemonic());
|
|
|
| @@ -58,7 +57,6 @@ void LInstruction::PrintTo(StringStream* stream) {
|
| }
|
| }
|
|
|
| -
|
| void LInstruction::PrintDataTo(StringStream* stream) {
|
| stream->Add("= ");
|
| for (int i = 0; i < InputCount(); i++) {
|
| @@ -71,12 +69,10 @@ void LInstruction::PrintDataTo(StringStream* stream) {
|
| }
|
| }
|
|
|
| -
|
| void LInstruction::PrintOutputOperandTo(StringStream* stream) {
|
| if (HasResult()) result()->PrintTo(stream);
|
| }
|
|
|
| -
|
| void LLabel::PrintDataTo(StringStream* stream) {
|
| LGap::PrintDataTo(stream);
|
| LLabel* rep = replacement();
|
| @@ -85,7 +81,6 @@ void LLabel::PrintDataTo(StringStream* stream) {
|
| }
|
| }
|
|
|
| -
|
| bool LGap::IsRedundant() const {
|
| for (int i = 0; i < 4; i++) {
|
| if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) {
|
| @@ -96,7 +91,6 @@ bool LGap::IsRedundant() const {
|
| return true;
|
| }
|
|
|
| -
|
| void LGap::PrintDataTo(StringStream* stream) {
|
| for (int i = 0; i < 4; i++) {
|
| stream->Add("(");
|
| @@ -107,7 +101,6 @@ void LGap::PrintDataTo(StringStream* stream) {
|
| }
|
| }
|
|
|
| -
|
| const char* LArithmeticD::Mnemonic() const {
|
| switch (op()) {
|
| case Token::ADD:
|
| @@ -126,7 +119,6 @@ const char* LArithmeticD::Mnemonic() const {
|
| }
|
| }
|
|
|
| -
|
| const char* LArithmeticT::Mnemonic() const {
|
| switch (op()) {
|
| case Token::ADD:
|
| @@ -159,23 +151,19 @@ const char* LArithmeticT::Mnemonic() const {
|
| }
|
| }
|
|
|
| -
|
| bool LGoto::HasInterestingComment(LCodeGen* gen) const {
|
| return !gen->IsNextEmittedBlock(block_id());
|
| }
|
|
|
| -
|
| void LGoto::PrintDataTo(StringStream* stream) {
|
| stream->Add("B%d", block_id());
|
| }
|
|
|
| -
|
| void LBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("B%d | B%d on ", true_block_id(), false_block_id());
|
| value()->PrintTo(stream);
|
| }
|
|
|
| -
|
| void LCompareNumericAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if ");
|
| left()->PrintTo(stream);
|
| @@ -184,28 +172,24 @@ void LCompareNumericAndBranch::PrintDataTo(StringStream* 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);
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
| -
|
| void LIsSmiAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if is_smi(");
|
| value()->PrintTo(stream);
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
| -
|
| void LIsUndetectableAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if is_undetectable(");
|
| value()->PrintTo(stream);
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
| -
|
| void LStringCompareAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if string_compare(");
|
| left()->PrintTo(stream);
|
| @@ -213,21 +197,18 @@ void LStringCompareAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
| -
|
| void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if has_instance_type(");
|
| value()->PrintTo(stream);
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
| -
|
| void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if has_cached_array_index(");
|
| value()->PrintTo(stream);
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
| -
|
| void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if class_of_test(");
|
| value()->PrintTo(stream);
|
| @@ -235,7 +216,6 @@ void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
|
| true_block_id(), false_block_id());
|
| }
|
|
|
| -
|
| void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if typeof ");
|
| value()->PrintTo(stream);
|
| @@ -244,7 +224,6 @@ void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
| false_block_id());
|
| }
|
|
|
| -
|
| void LStoreCodeEntry::PrintDataTo(StringStream* stream) {
|
| stream->Add(" = ");
|
| function()->PrintTo(stream);
|
| @@ -252,7 +231,6 @@ void LStoreCodeEntry::PrintDataTo(StringStream* stream) {
|
| code_object()->PrintTo(stream);
|
| }
|
|
|
| -
|
| void LInnerAllocatedObject::PrintDataTo(StringStream* stream) {
|
| stream->Add(" = ");
|
| base_object()->PrintTo(stream);
|
| @@ -260,7 +238,6 @@ void LInnerAllocatedObject::PrintDataTo(StringStream* stream) {
|
| offset()->PrintTo(stream);
|
| }
|
|
|
| -
|
| void LCallWithDescriptor::PrintDataTo(StringStream* stream) {
|
| for (int i = 0; i < InputCount(); i++) {
|
| InputAt(i)->PrintTo(stream);
|
| @@ -269,27 +246,23 @@ void LCallWithDescriptor::PrintDataTo(StringStream* stream) {
|
| stream->Add("#%d / ", arity());
|
| }
|
|
|
| -
|
| void LLoadContextSlot::PrintDataTo(StringStream* stream) {
|
| context()->PrintTo(stream);
|
| stream->Add("[%d]", slot_index());
|
| }
|
|
|
| -
|
| void LStoreContextSlot::PrintDataTo(StringStream* stream) {
|
| context()->PrintTo(stream);
|
| stream->Add("[%d] <- ", slot_index());
|
| value()->PrintTo(stream);
|
| }
|
|
|
| -
|
| void LInvokeFunction::PrintDataTo(StringStream* stream) {
|
| stream->Add("= ");
|
| function()->PrintTo(stream);
|
| stream->Add(" #%d / ", arity());
|
| }
|
|
|
| -
|
| void LCallNewArray::PrintDataTo(StringStream* stream) {
|
| stream->Add("= ");
|
| constructor()->PrintTo(stream);
|
| @@ -298,7 +271,6 @@ void LCallNewArray::PrintDataTo(StringStream* stream) {
|
| stream->Add(" (%s) ", ElementsKindToString(kind));
|
| }
|
|
|
| -
|
| void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
|
| arguments()->PrintTo(stream);
|
| stream->Add(" length ");
|
| @@ -307,7 +279,6 @@ void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
|
| index()->PrintTo(stream);
|
| }
|
|
|
| -
|
| void LStoreNamedField::PrintDataTo(StringStream* stream) {
|
| object()->PrintTo(stream);
|
| std::ostringstream os;
|
| @@ -316,7 +287,6 @@ void LStoreNamedField::PrintDataTo(StringStream* stream) {
|
| value()->PrintTo(stream);
|
| }
|
|
|
| -
|
| void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
|
| object()->PrintTo(stream);
|
| stream->Add(".");
|
| @@ -325,7 +295,6 @@ void LStoreNamedGeneric::PrintDataTo(StringStream* stream) {
|
| value()->PrintTo(stream);
|
| }
|
|
|
| -
|
| void LLoadKeyed::PrintDataTo(StringStream* stream) {
|
| elements()->PrintTo(stream);
|
| stream->Add("[");
|
| @@ -337,7 +306,6 @@ void LLoadKeyed::PrintDataTo(StringStream* stream) {
|
| }
|
| }
|
|
|
| -
|
| void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
| elements()->PrintTo(stream);
|
| stream->Add("[");
|
| @@ -357,7 +325,6 @@ void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
| }
|
| }
|
|
|
| -
|
| void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
| object()->PrintTo(stream);
|
| stream->Add("[");
|
| @@ -366,20 +333,17 @@ void LStoreKeyedGeneric::PrintDataTo(StringStream* stream) {
|
| value()->PrintTo(stream);
|
| }
|
|
|
| -
|
| void LTransitionElementsKind::PrintDataTo(StringStream* stream) {
|
| object()->PrintTo(stream);
|
| stream->Add(" %p -> %p", *original_map(), *transitioned_map());
|
| }
|
|
|
| -
|
| int LPlatformChunk::GetNextSpillIndex(RegisterKind kind) {
|
| // Skip a slot if for a double-width slot.
|
| if (kind == DOUBLE_REGISTERS) current_frame_slots_++;
|
| return current_frame_slots_++;
|
| }
|
|
|
| -
|
| LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) {
|
| int index = GetNextSpillIndex(kind);
|
| if (kind == DOUBLE_REGISTERS) {
|
| @@ -390,7 +354,6 @@ LOperand* LPlatformChunk::GetNextSpillSlot(RegisterKind kind) {
|
| }
|
| }
|
|
|
| -
|
| LPlatformChunk* LChunkBuilder::Build() {
|
| DCHECK(is_unused());
|
| chunk_ = new (zone()) LPlatformChunk(info(), graph());
|
| @@ -416,96 +379,80 @@ LPlatformChunk* LChunkBuilder::Build() {
|
| return chunk_;
|
| }
|
|
|
| -
|
| LUnallocated* LChunkBuilder::ToUnallocated(Register reg) {
|
| return new (zone()) LUnallocated(LUnallocated::FIXED_REGISTER, reg.code());
|
| }
|
|
|
| -
|
| LUnallocated* LChunkBuilder::ToUnallocated(DoubleRegister reg) {
|
| return new (zone())
|
| LUnallocated(LUnallocated::FIXED_DOUBLE_REGISTER, reg.code());
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseFixed(HValue* value, Register fixed_register) {
|
| return Use(value, ToUnallocated(fixed_register));
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseFixedDouble(HValue* value, DoubleRegister reg) {
|
| return Use(value, ToUnallocated(reg));
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseRegister(HValue* value) {
|
| return Use(value,
|
| new (zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER));
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseRegisterAtStart(HValue* value) {
|
| return Use(value, new (zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER,
|
| LUnallocated::USED_AT_START));
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseTempRegister(HValue* value) {
|
| return Use(value, new (zone()) LUnallocated(LUnallocated::WRITABLE_REGISTER));
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::Use(HValue* value) {
|
| return Use(value, new (zone()) LUnallocated(LUnallocated::NONE));
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseAtStart(HValue* value) {
|
| - return Use(value, new (zone())
|
| - LUnallocated(LUnallocated::NONE, LUnallocated::USED_AT_START));
|
| + return Use(value, new (zone()) LUnallocated(LUnallocated::NONE,
|
| + LUnallocated::USED_AT_START));
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseOrConstant(HValue* value) {
|
| return value->IsConstant()
|
| ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| : Use(value);
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseOrConstantAtStart(HValue* value) {
|
| return value->IsConstant()
|
| ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| : UseAtStart(value);
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseRegisterOrConstant(HValue* value) {
|
| return value->IsConstant()
|
| ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| : UseRegister(value);
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseRegisterOrConstantAtStart(HValue* value) {
|
| return value->IsConstant()
|
| ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| : UseRegisterAtStart(value);
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseConstant(HValue* value) {
|
| return chunk_->DefineConstantOperand(HConstant::cast(value));
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::UseAny(HValue* value) {
|
| return value->IsConstant()
|
| ? chunk_->DefineConstantOperand(HConstant::cast(value))
|
| : Use(value, new (zone()) LUnallocated(LUnallocated::ANY));
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) {
|
| if (value->EmitAtUses()) {
|
| HInstruction* instr = HInstruction::cast(value);
|
| @@ -515,7 +462,6 @@ LOperand* LChunkBuilder::Use(HValue* value, LUnallocated* operand) {
|
| return operand;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::Define(LTemplateResultInstruction<1>* instr,
|
| LUnallocated* result) {
|
| result->set_virtual_register(current_instruction_->id());
|
| @@ -523,40 +469,34 @@ LInstruction* LChunkBuilder::Define(LTemplateResultInstruction<1>* instr,
|
| return instr;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DefineAsRegister(
|
| LTemplateResultInstruction<1>* instr) {
|
| return Define(instr,
|
| new (zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DefineAsSpilled(
|
| LTemplateResultInstruction<1>* instr, int index) {
|
| return Define(instr,
|
| new (zone()) LUnallocated(LUnallocated::FIXED_SLOT, index));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DefineSameAsFirst(
|
| LTemplateResultInstruction<1>* instr) {
|
| return Define(instr,
|
| new (zone()) LUnallocated(LUnallocated::SAME_AS_FIRST_INPUT));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DefineFixed(LTemplateResultInstruction<1>* instr,
|
| Register reg) {
|
| return Define(instr, ToUnallocated(reg));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DefineFixedDouble(
|
| LTemplateResultInstruction<1>* instr, DoubleRegister reg) {
|
| return Define(instr, ToUnallocated(reg));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
|
| HEnvironment* hydrogen_env = current_block_->last_environment();
|
| int argument_index_accumulator = 0;
|
| @@ -566,7 +506,6 @@ LInstruction* LChunkBuilder::AssignEnvironment(LInstruction* instr) {
|
| return instr;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
|
| HInstruction* hinstr,
|
| CanDeoptimize can_deoptimize) {
|
| @@ -592,14 +531,12 @@ LInstruction* LChunkBuilder::MarkAsCall(LInstruction* instr,
|
| return instr;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::AssignPointerMap(LInstruction* instr) {
|
| DCHECK(!instr->HasPointerMap());
|
| instr->set_pointer_map(new (zone()) LPointerMap(zone()));
|
| return instr;
|
| }
|
|
|
| -
|
| LUnallocated* LChunkBuilder::TempRegister() {
|
| LUnallocated* operand =
|
| new (zone()) LUnallocated(LUnallocated::MUST_HAVE_REGISTER);
|
| @@ -612,7 +549,6 @@ LUnallocated* LChunkBuilder::TempRegister() {
|
| return operand;
|
| }
|
|
|
| -
|
| LUnallocated* LChunkBuilder::TempDoubleRegister() {
|
| LUnallocated* operand =
|
| new (zone()) LUnallocated(LUnallocated::MUST_HAVE_DOUBLE_REGISTER);
|
| @@ -625,42 +561,35 @@ LUnallocated* LChunkBuilder::TempDoubleRegister() {
|
| return operand;
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::FixedTemp(Register reg) {
|
| LUnallocated* operand = ToUnallocated(reg);
|
| DCHECK(operand->HasFixedPolicy());
|
| return operand;
|
| }
|
|
|
| -
|
| LOperand* LChunkBuilder::FixedTemp(DoubleRegister reg) {
|
| LUnallocated* operand = ToUnallocated(reg);
|
| DCHECK(operand->HasFixedPolicy());
|
| return operand;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoBlockEntry(HBlockEntry* instr) {
|
| return new (zone()) LLabel(instr->block());
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoDummyUse(HDummyUse* instr) {
|
| return DefineAsRegister(new (zone()) LDummyUse(UseAny(instr->value())));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoEnvironmentMarker(HEnvironmentMarker* instr) {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoDeoptimize(HDeoptimize* instr) {
|
| return AssignEnvironment(new (zone()) LDeoptimize);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
| HBitwiseBinaryOperation* instr) {
|
| if (instr->representation().IsSmiOrInteger32()) {
|
| @@ -699,7 +628,6 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op,
|
| HArithmeticBinaryOperation* instr) {
|
| DCHECK(instr->representation().IsDouble());
|
| @@ -714,14 +642,13 @@ LInstruction* LChunkBuilder::DoArithmeticD(Token::Value op,
|
| // TODO(fschneider): Allow any register as input registers.
|
| return MarkAsCall(DefineFixedDouble(result, d1), instr);
|
| } else {
|
| - LOperand* left = UseRegisterAtStart(instr->left());
|
| - LOperand* right = UseRegisterAtStart(instr->right());
|
| + LOperand* left = UseRegisterAtStart(instr->BetterLeftOperand());
|
| + LOperand* right = UseRegisterAtStart(instr->BetterRightOperand());
|
| LArithmeticD* result = new (zone()) LArithmeticD(op, left, right);
|
| - return DefineAsRegister(result);
|
| + return DefineSameAsFirst(result);
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
|
| HBinaryOperation* instr) {
|
| HValue* left = instr->left();
|
| @@ -729,14 +656,13 @@ LInstruction* LChunkBuilder::DoArithmeticT(Token::Value op,
|
| DCHECK(left->representation().IsTagged());
|
| DCHECK(right->representation().IsTagged());
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - LOperand* left_operand = UseFixed(left, r4);
|
| - LOperand* right_operand = UseFixed(right, r3);
|
| + LOperand* left_operand = UseFixed(left, r3);
|
| + LOperand* right_operand = UseFixed(right, r2);
|
| LArithmeticT* result =
|
| new (zone()) LArithmeticT(op, context, left_operand, right_operand);
|
| - return MarkAsCall(DefineFixed(result, r3), instr);
|
| + return MarkAsCall(DefineFixed(result, r2), instr);
|
| }
|
|
|
| -
|
| void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
|
| DCHECK(is_building());
|
| current_block_ = block;
|
| @@ -803,7 +729,6 @@ void LChunkBuilder::DoBasicBlock(HBasicBlock* block, HBasicBlock* next_block) {
|
| current_block_ = NULL;
|
| }
|
|
|
| -
|
| void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
| HInstruction* old_current = current_instruction_;
|
| current_instruction_ = current;
|
| @@ -815,7 +740,7 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
| } else {
|
| DCHECK(!current->OperandAt(0)->IsControlInstruction());
|
| instr = DefineAsRegister(new (zone())
|
| - LDummyUse(UseAny(current->OperandAt(0))));
|
| + LDummyUse(UseAny(current->OperandAt(0))));
|
| }
|
| for (int i = 1; i < current->OperandCount(); ++i) {
|
| if (current->OperandAt(i)->IsControlInstruction()) continue;
|
| @@ -845,7 +770,6 @@ void LChunkBuilder::VisitInstruction(HInstruction* current) {
|
| current_instruction_ = old_current;
|
| }
|
|
|
| -
|
| void LChunkBuilder::AddInstruction(LInstruction* instr,
|
| HInstruction* hydrogen_val) {
|
| // Associate the hydrogen instruction first, since we may need it for
|
| @@ -903,62 +827,54 @@ void LChunkBuilder::AddInstruction(LInstruction* instr,
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoPrologue(HPrologue* instr) {
|
| return new (zone()) LPrologue();
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
|
| return new (zone()) LGoto(instr->FirstSuccessor());
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoBranch(HBranch* instr) {
|
| HValue* value = instr->value();
|
| Representation r = value->representation();
|
| HType type = value->type();
|
| - ToBooleanICStub::Types expected = instr->expected_input_types();
|
| - if (expected.IsEmpty()) expected = ToBooleanICStub::Types::Generic();
|
| + ToBooleanStub::Types expected = instr->expected_input_types();
|
| + if (expected.IsEmpty()) expected = ToBooleanStub::Types::Generic();
|
|
|
| bool easy_case = !r.IsTagged() || type.IsBoolean() || type.IsSmi() ||
|
| type.IsJSArray() || type.IsHeapNumber() || type.IsString();
|
| LInstruction* branch = new (zone()) LBranch(UseRegister(value));
|
| if (!easy_case &&
|
| - ((!expected.Contains(ToBooleanICStub::SMI) && expected.NeedsMap()) ||
|
| + ((!expected.Contains(ToBooleanStub::SMI) && expected.NeedsMap()) ||
|
| !expected.IsGeneric())) {
|
| branch = AssignEnvironment(branch);
|
| }
|
| return branch;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoDebugBreak(HDebugBreak* instr) {
|
| return new (zone()) LDebugBreak();
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCompareMap(HCompareMap* instr) {
|
| DCHECK(instr->value()->representation().IsTagged());
|
| - LOperand* value = UseRegisterAtStart(instr->value());
|
| + LOperand* value = UseRegister(instr->value());
|
| LOperand* temp = TempRegister();
|
| return new (zone()) LCmpMapAndBranch(value, temp);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoArgumentsLength(HArgumentsLength* instr) {
|
| info()->MarkAsRequiresFrame();
|
| LOperand* value = UseRegister(instr->value());
|
| return DefineAsRegister(new (zone()) LArgumentsLength(value));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoArgumentsElements(HArgumentsElements* elems) {
|
| info()->MarkAsRequiresFrame();
|
| return DefineAsRegister(new (zone()) LArgumentsElements);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
|
| LOperand* left =
|
| UseFixed(instr->left(), InstanceOfDescriptor::LeftRegister());
|
| @@ -966,10 +882,9 @@ LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
|
| UseFixed(instr->right(), InstanceOfDescriptor::RightRegister());
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| LInstanceOf* result = new (zone()) LInstanceOf(context, left, right);
|
| - return MarkAsCall(DefineFixed(result, r3), instr);
|
| + return MarkAsCall(DefineFixed(result, r2), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoHasInPrototypeChainAndBranch(
|
| HHasInPrototypeChainAndBranch* instr) {
|
| LOperand* object = UseRegister(instr->object());
|
| @@ -979,7 +894,6 @@ LInstruction* LChunkBuilder::DoHasInPrototypeChainAndBranch(
|
| return AssignEnvironment(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
|
| LOperand* receiver = UseRegisterAtStart(instr->receiver());
|
| LOperand* function = UseRegisterAtStart(instr->function());
|
| @@ -987,18 +901,16 @@ LInstruction* LChunkBuilder::DoWrapReceiver(HWrapReceiver* instr) {
|
| return AssignEnvironment(DefineAsRegister(result));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoApplyArguments(HApplyArguments* instr) {
|
| - LOperand* function = UseFixed(instr->function(), r4);
|
| - LOperand* receiver = UseFixed(instr->receiver(), r3);
|
| - LOperand* length = UseFixed(instr->length(), r5);
|
| - LOperand* elements = UseFixed(instr->elements(), r6);
|
| + LOperand* function = UseFixed(instr->function(), r3);
|
| + LOperand* receiver = UseFixed(instr->receiver(), r2);
|
| + LOperand* length = UseFixed(instr->length(), r4);
|
| + LOperand* elements = UseFixed(instr->elements(), r5);
|
| LApplyArguments* result =
|
| new (zone()) LApplyArguments(function, receiver, length, elements);
|
| - return MarkAsCall(DefineFixed(result, r3), instr, CAN_DEOPTIMIZE_EAGERLY);
|
| + return MarkAsCall(DefineFixed(result, r2), instr, CAN_DEOPTIMIZE_EAGERLY);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoPushArguments(HPushArguments* instr) {
|
| int argc = instr->OperandCount();
|
| for (int i = 0; i < argc; ++i) {
|
| @@ -1008,7 +920,6 @@ LInstruction* LChunkBuilder::DoPushArguments(HPushArguments* instr) {
|
| return NULL;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStoreCodeEntry(
|
| HStoreCodeEntry* store_code_entry) {
|
| LOperand* function = UseRegister(store_code_entry->function());
|
| @@ -1016,22 +927,19 @@ LInstruction* LChunkBuilder::DoStoreCodeEntry(
|
| return new (zone()) LStoreCodeEntry(function, code_object);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoInnerAllocatedObject(
|
| HInnerAllocatedObject* instr) {
|
| LOperand* base_object = UseRegisterAtStart(instr->base_object());
|
| LOperand* offset = UseRegisterOrConstantAtStart(instr->offset());
|
| return DefineAsRegister(new (zone())
|
| - LInnerAllocatedObject(base_object, offset));
|
| + LInnerAllocatedObject(base_object, offset));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoThisFunction(HThisFunction* instr) {
|
| return instr->HasNoUses() ? NULL
|
| : DefineAsRegister(new (zone()) LThisFunction);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoContext(HContext* instr) {
|
| if (instr->HasNoUses()) return NULL;
|
|
|
| @@ -1042,13 +950,11 @@ LInstruction* LChunkBuilder::DoContext(HContext* instr) {
|
| return DefineAsRegister(new (zone()) LContext);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoDeclareGlobals(HDeclareGlobals* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| return MarkAsCall(new (zone()) LDeclareGlobals(context), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCallWithDescriptor(HCallWithDescriptor* instr) {
|
| CallInterfaceDescriptor descriptor = instr->descriptor();
|
|
|
| @@ -1071,18 +977,16 @@ LInstruction* LChunkBuilder::DoCallWithDescriptor(HCallWithDescriptor* instr) {
|
|
|
| LCallWithDescriptor* result =
|
| new (zone()) LCallWithDescriptor(descriptor, ops, zone());
|
| - return MarkAsCall(DefineFixed(result, r3), instr);
|
| + return MarkAsCall(DefineFixed(result, r2), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoInvokeFunction(HInvokeFunction* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - LOperand* function = UseFixed(instr->function(), r4);
|
| + LOperand* function = UseFixed(instr->function(), r3);
|
| LInvokeFunction* result = new (zone()) LInvokeFunction(context, function);
|
| - return MarkAsCall(DefineFixed(result, r3), instr, CANNOT_DEOPTIMIZE_EAGERLY);
|
| + return MarkAsCall(DefineFixed(result, r2), instr, CANNOT_DEOPTIMIZE_EAGERLY);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
|
| switch (instr->op()) {
|
| case kMathFloor:
|
| @@ -1109,14 +1013,12 @@ LInstruction* LChunkBuilder::DoUnaryMathOperation(HUnaryMathOperation* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathFloor(HUnaryMathOperation* instr) {
|
| LOperand* input = UseRegister(instr->value());
|
| LMathFloor* result = new (zone()) LMathFloor(input);
|
| return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathRound(HUnaryMathOperation* instr) {
|
| LOperand* input = UseRegister(instr->value());
|
| LOperand* temp = TempDoubleRegister();
|
| @@ -1124,14 +1026,12 @@ LInstruction* LChunkBuilder::DoMathRound(HUnaryMathOperation* instr) {
|
| return AssignEnvironment(DefineAsRegister(result));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathFround(HUnaryMathOperation* instr) {
|
| LOperand* input = UseRegister(instr->value());
|
| LMathFround* result = new (zone()) LMathFround(input);
|
| return DefineAsRegister(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathAbs(HUnaryMathOperation* instr) {
|
| Representation r = instr->value()->representation();
|
| LOperand* context = (r.IsDouble() || r.IsSmiOrInteger32())
|
| @@ -1145,7 +1045,6 @@ LInstruction* LChunkBuilder::DoMathAbs(HUnaryMathOperation* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) {
|
| DCHECK(instr->representation().IsDouble());
|
| DCHECK(instr->value()->representation().IsDouble());
|
| @@ -1153,14 +1052,12 @@ LInstruction* LChunkBuilder::DoMathLog(HUnaryMathOperation* instr) {
|
| return MarkAsCall(DefineFixedDouble(new (zone()) LMathLog(input), d1), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathClz32(HUnaryMathOperation* instr) {
|
| LOperand* input = UseRegisterAtStart(instr->value());
|
| LMathClz32* result = new (zone()) LMathClz32(input);
|
| return DefineAsRegister(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) {
|
| DCHECK(instr->representation().IsDouble());
|
| DCHECK(instr->value()->representation().IsDouble());
|
| @@ -1172,55 +1069,46 @@ LInstruction* LChunkBuilder::DoMathExp(HUnaryMathOperation* instr) {
|
| return DefineAsRegister(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathSqrt(HUnaryMathOperation* instr) {
|
| LOperand* input = UseRegisterAtStart(instr->value());
|
| LMathSqrt* result = new (zone()) LMathSqrt(input);
|
| return DefineAsRegister(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathPowHalf(HUnaryMathOperation* instr) {
|
| LOperand* input = UseRegisterAtStart(instr->value());
|
| LMathPowHalf* result = new (zone()) LMathPowHalf(input);
|
| return DefineAsRegister(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCallNewArray(HCallNewArray* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - LOperand* constructor = UseFixed(instr->constructor(), r4);
|
| + LOperand* constructor = UseFixed(instr->constructor(), r3);
|
| LCallNewArray* result = new (zone()) LCallNewArray(context, constructor);
|
| - return MarkAsCall(DefineFixed(result, r3), instr);
|
| + return MarkAsCall(DefineFixed(result, r2), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCallRuntime(HCallRuntime* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - return MarkAsCall(DefineFixed(new (zone()) LCallRuntime(context), r3), instr);
|
| + return MarkAsCall(DefineFixed(new (zone()) LCallRuntime(context), r2), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoRor(HRor* instr) {
|
| return DoShift(Token::ROR, instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoShr(HShr* instr) {
|
| return DoShift(Token::SHR, instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoSar(HSar* instr) {
|
| return DoShift(Token::SAR, instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoShl(HShl* instr) {
|
| return DoShift(Token::SHL, instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) {
|
| if (instr->representation().IsSmiOrInteger32()) {
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1235,7 +1123,6 @@ LInstruction* LChunkBuilder::DoBitwise(HBitwise* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoDivByPowerOf2I(HDiv* instr) {
|
| DCHECK(instr->representation().IsSmiOrInteger32());
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1253,7 +1140,6 @@ LInstruction* LChunkBuilder::DoDivByPowerOf2I(HDiv* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoDivByConstI(HDiv* instr) {
|
| DCHECK(instr->representation().IsInteger32());
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1270,7 +1156,6 @@ LInstruction* LChunkBuilder::DoDivByConstI(HDiv* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoDivI(HDiv* instr) {
|
| DCHECK(instr->representation().IsSmiOrInteger32());
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1290,7 +1175,6 @@ LInstruction* LChunkBuilder::DoDivI(HDiv* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
|
| if (instr->representation().IsSmiOrInteger32()) {
|
| if (instr->RightIsPowerOf2()) {
|
| @@ -1307,7 +1191,6 @@ LInstruction* LChunkBuilder::DoDiv(HDiv* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr) {
|
| LOperand* dividend = UseRegisterAtStart(instr->left());
|
| int32_t divisor = instr->right()->GetInteger32Constant();
|
| @@ -1320,7 +1203,6 @@ LInstruction* LChunkBuilder::DoFlooringDivByPowerOf2I(HMathFloorOfDiv* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoFlooringDivByConstI(HMathFloorOfDiv* instr) {
|
| DCHECK(instr->representation().IsInteger32());
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1341,7 +1223,6 @@ LInstruction* LChunkBuilder::DoFlooringDivByConstI(HMathFloorOfDiv* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoFlooringDivI(HMathFloorOfDiv* instr) {
|
| DCHECK(instr->representation().IsSmiOrInteger32());
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1359,7 +1240,6 @@ LInstruction* LChunkBuilder::DoFlooringDivI(HMathFloorOfDiv* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) {
|
| if (instr->RightIsPowerOf2()) {
|
| return DoFlooringDivByPowerOf2I(instr);
|
| @@ -1370,7 +1250,6 @@ LInstruction* LChunkBuilder::DoMathFloorOfDiv(HMathFloorOfDiv* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) {
|
| DCHECK(instr->representation().IsSmiOrInteger32());
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1386,7 +1265,6 @@ LInstruction* LChunkBuilder::DoModByPowerOf2I(HMod* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) {
|
| DCHECK(instr->representation().IsSmiOrInteger32());
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1401,7 +1279,6 @@ LInstruction* LChunkBuilder::DoModByConstI(HMod* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoModI(HMod* instr) {
|
| DCHECK(instr->representation().IsSmiOrInteger32());
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1417,7 +1294,6 @@ LInstruction* LChunkBuilder::DoModI(HMod* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMod(HMod* instr) {
|
| if (instr->representation().IsSmiOrInteger32()) {
|
| if (instr->RightIsPowerOf2()) {
|
| @@ -1434,7 +1310,6 @@ LInstruction* LChunkBuilder::DoMod(HMod* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMul(HMul* instr) {
|
| if (instr->representation().IsSmiOrInteger32()) {
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1487,7 +1362,6 @@ LInstruction* LChunkBuilder::DoMul(HMul* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoSub(HSub* instr) {
|
| if (instr->representation().IsSmiOrInteger32()) {
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1514,7 +1388,6 @@ LInstruction* LChunkBuilder::DoSub(HSub* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoRSub(HSub* instr) {
|
| DCHECK(instr->representation().IsSmiOrInteger32());
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1530,26 +1403,23 @@ LInstruction* LChunkBuilder::DoRSub(HSub* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMultiplyAdd(HMul* mul, HValue* addend) {
|
| - LOperand* multiplier_op = UseRegisterAtStart(mul->left());
|
| - LOperand* multiplicand_op = UseRegisterAtStart(mul->right());
|
| - LOperand* addend_op = UseRegisterAtStart(addend);
|
| - return DefineSameAsFirst(
|
| + LOperand* multiplier_op = UseRegister(mul->left());
|
| + LOperand* multiplicand_op = UseRegister(mul->right());
|
| + LOperand* addend_op = UseRegister(addend);
|
| + return DefineAsRegister(
|
| new (zone()) LMultiplyAddD(addend_op, multiplier_op, multiplicand_op));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMultiplySub(HValue* minuend, HMul* mul) {
|
| - LOperand* minuend_op = UseRegisterAtStart(minuend);
|
| - LOperand* multiplier_op = UseRegisterAtStart(mul->left());
|
| - LOperand* multiplicand_op = UseRegisterAtStart(mul->right());
|
| + LOperand* minuend_op = UseRegister(minuend);
|
| + LOperand* multiplier_op = UseRegister(mul->left());
|
| + LOperand* multiplicand_op = UseRegister(mul->right());
|
|
|
| - return DefineSameAsFirst(
|
| + return DefineAsRegister(
|
| new (zone()) LMultiplySubD(minuend_op, multiplier_op, multiplicand_op));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
|
| if (instr->representation().IsSmiOrInteger32()) {
|
| DCHECK(instr->left()->representation().Equals(instr->representation()));
|
| @@ -1577,7 +1447,6 @@ LInstruction* LChunkBuilder::DoAdd(HAdd* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) {
|
| LOperand* left = NULL;
|
| LOperand* right = NULL;
|
| @@ -1590,13 +1459,12 @@ LInstruction* LChunkBuilder::DoMathMinMax(HMathMinMax* instr) {
|
| DCHECK(instr->representation().IsDouble());
|
| DCHECK(instr->left()->representation().IsDouble());
|
| DCHECK(instr->right()->representation().IsDouble());
|
| - left = UseRegisterAtStart(instr->left());
|
| - right = UseRegisterAtStart(instr->right());
|
| + left = UseRegister(instr->left());
|
| + right = UseRegister(instr->right());
|
| }
|
| return DefineAsRegister(new (zone()) LMathMinMax(left, right));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoPower(HPower* instr) {
|
| DCHECK(instr->representation().IsDouble());
|
| // We call a C function for double power. It can't trigger a GC.
|
| @@ -1604,27 +1472,24 @@ LInstruction* LChunkBuilder::DoPower(HPower* instr) {
|
| Representation exponent_type = instr->right()->representation();
|
| DCHECK(instr->left()->representation().IsDouble());
|
| LOperand* left = UseFixedDouble(instr->left(), d1);
|
| - LOperand* right =
|
| - exponent_type.IsDouble()
|
| - ? UseFixedDouble(instr->right(), d2)
|
| - : UseFixed(instr->right(), MathPowTaggedDescriptor::exponent());
|
| + LOperand* right = exponent_type.IsDouble()
|
| + ? UseFixedDouble(instr->right(), d2)
|
| + : UseFixed(instr->right(), r4);
|
| LPower* result = new (zone()) LPower(left, right);
|
| return MarkAsCall(DefineFixedDouble(result, d3), instr,
|
| CAN_DEOPTIMIZE_EAGERLY);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCompareGeneric(HCompareGeneric* instr) {
|
| DCHECK(instr->left()->representation().IsTagged());
|
| DCHECK(instr->right()->representation().IsTagged());
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - LOperand* left = UseFixed(instr->left(), r4);
|
| - LOperand* right = UseFixed(instr->right(), r3);
|
| + LOperand* left = UseFixed(instr->left(), r3);
|
| + LOperand* right = UseFixed(instr->right(), r2);
|
| LCmpT* result = new (zone()) LCmpT(context, left, right);
|
| - return MarkAsCall(DefineFixed(result, r3), instr);
|
| + return MarkAsCall(DefineFixed(result, r2), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCompareNumericAndBranch(
|
| HCompareNumericAndBranch* instr) {
|
| Representation r = instr->representation();
|
| @@ -1644,7 +1509,6 @@ LInstruction* LChunkBuilder::DoCompareNumericAndBranch(
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch(
|
| HCompareObjectEqAndBranch* instr) {
|
| LOperand* left = UseRegisterAtStart(instr->left());
|
| @@ -1652,14 +1516,12 @@ LInstruction* LChunkBuilder::DoCompareObjectEqAndBranch(
|
| return new (zone()) LCmpObjectEqAndBranch(left, right);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCompareHoleAndBranch(
|
| HCompareHoleAndBranch* instr) {
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| return new (zone()) LCmpHoleAndBranch(value);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) {
|
| DCHECK(instr->value()->representation().IsTagged());
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| @@ -1667,13 +1529,11 @@ LInstruction* LChunkBuilder::DoIsStringAndBranch(HIsStringAndBranch* instr) {
|
| return new (zone()) LIsStringAndBranch(value, temp);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoIsSmiAndBranch(HIsSmiAndBranch* instr) {
|
| DCHECK(instr->value()->representation().IsTagged());
|
| return new (zone()) LIsSmiAndBranch(Use(instr->value()));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoIsUndetectableAndBranch(
|
| HIsUndetectableAndBranch* instr) {
|
| DCHECK(instr->value()->representation().IsTagged());
|
| @@ -1681,20 +1541,18 @@ LInstruction* LChunkBuilder::DoIsUndetectableAndBranch(
|
| return new (zone()) LIsUndetectableAndBranch(value, TempRegister());
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStringCompareAndBranch(
|
| HStringCompareAndBranch* instr) {
|
| DCHECK(instr->left()->representation().IsTagged());
|
| DCHECK(instr->right()->representation().IsTagged());
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - LOperand* left = UseFixed(instr->left(), r4);
|
| - LOperand* right = UseFixed(instr->right(), r3);
|
| + LOperand* left = UseFixed(instr->left(), r3);
|
| + LOperand* right = UseFixed(instr->right(), r2);
|
| LStringCompareAndBranch* result =
|
| new (zone()) LStringCompareAndBranch(context, left, right);
|
| return MarkAsCall(result, instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
|
| HHasInstanceTypeAndBranch* instr) {
|
| DCHECK(instr->value()->representation().IsTagged());
|
| @@ -1702,7 +1560,6 @@ LInstruction* LChunkBuilder::DoHasInstanceTypeAndBranch(
|
| return new (zone()) LHasInstanceTypeAndBranch(value);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
|
| HGetCachedArrayIndex* instr) {
|
| DCHECK(instr->value()->representation().IsTagged());
|
| @@ -1711,7 +1568,6 @@ LInstruction* LChunkBuilder::DoGetCachedArrayIndex(
|
| return DefineAsRegister(new (zone()) LGetCachedArrayIndex(value));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
|
| HHasCachedArrayIndexAndBranch* instr) {
|
| DCHECK(instr->value()->representation().IsTagged());
|
| @@ -1719,7 +1575,6 @@ LInstruction* LChunkBuilder::DoHasCachedArrayIndexAndBranch(
|
| LHasCachedArrayIndexAndBranch(UseRegisterAtStart(instr->value()));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoClassOfTestAndBranch(
|
| HClassOfTestAndBranch* instr) {
|
| DCHECK(instr->value()->representation().IsTagged());
|
| @@ -1727,14 +1582,12 @@ LInstruction* LChunkBuilder::DoClassOfTestAndBranch(
|
| return new (zone()) LClassOfTestAndBranch(value, TempRegister());
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoSeqStringGetChar(HSeqStringGetChar* instr) {
|
| LOperand* string = UseRegisterAtStart(instr->string());
|
| LOperand* index = UseRegisterOrConstantAtStart(instr->index());
|
| return DefineAsRegister(new (zone()) LSeqStringGetChar(string, index));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) {
|
| LOperand* string = UseRegisterAtStart(instr->string());
|
| LOperand* index = FLAG_debug_code
|
| @@ -1745,7 +1598,6 @@ LInstruction* LChunkBuilder::DoSeqStringSetChar(HSeqStringSetChar* instr) {
|
| return new (zone()) LSeqStringSetChar(context, string, index, value);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
|
| if (!FLAG_debug_code && instr->skip_check()) return NULL;
|
| LOperand* index = UseRegisterOrConstantAtStart(instr->index());
|
| @@ -1759,24 +1611,20 @@ LInstruction* LChunkBuilder::DoBoundsCheck(HBoundsCheck* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoBoundsCheckBaseIndexInformation(
|
| HBoundsCheckBaseIndexInformation* instr) {
|
| UNREACHABLE();
|
| return NULL;
|
| }
|
|
|
| -
|
| 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.
|
| return NULL;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoUseConst(HUseConst* instr) { return NULL; }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) {
|
| // All HForceRepresentation instructions should be eliminated in the
|
| // representation change phase of Hydrogen.
|
| @@ -1784,7 +1632,6 @@ LInstruction* LChunkBuilder::DoForceRepresentation(HForceRepresentation* bad) {
|
| return NULL;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| Representation from = instr->from();
|
| Representation to = instr->to();
|
| @@ -1884,7 +1731,6 @@ LInstruction* LChunkBuilder::DoChange(HChange* instr) {
|
| return NULL;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) {
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| LInstruction* result = new (zone()) LCheckNonSmi(value);
|
| @@ -1894,13 +1740,11 @@ LInstruction* LChunkBuilder::DoCheckHeapObject(HCheckHeapObject* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCheckSmi(HCheckSmi* instr) {
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| return AssignEnvironment(new (zone()) LCheckSmi(value));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCheckArrayBufferNotNeutered(
|
| HCheckArrayBufferNotNeutered* instr) {
|
| LOperand* view = UseRegisterAtStart(instr->value());
|
| @@ -1909,20 +1753,17 @@ LInstruction* LChunkBuilder::DoCheckArrayBufferNotNeutered(
|
| return AssignEnvironment(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| LInstruction* result = new (zone()) LCheckInstanceType(value);
|
| return AssignEnvironment(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCheckValue(HCheckValue* instr) {
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| return AssignEnvironment(new (zone()) LCheckValue(value));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) {
|
| if (instr->IsStabilityCheck()) return new (zone()) LCheckMaps;
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| @@ -1936,7 +1777,6 @@ LInstruction* LChunkBuilder::DoCheckMaps(HCheckMaps* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
|
| HValue* value = instr->value();
|
| Representation input_rep = value->representation();
|
| @@ -1953,29 +1793,25 @@ LInstruction* LChunkBuilder::DoClampToUint8(HClampToUint8* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoDoubleBits(HDoubleBits* instr) {
|
| HValue* value = instr->value();
|
| DCHECK(value->representation().IsDouble());
|
| return DefineAsRegister(new (zone()) LDoubleBits(UseRegister(value)));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoConstructDouble(HConstructDouble* instr) {
|
| LOperand* lo = UseRegister(instr->lo());
|
| LOperand* hi = UseRegister(instr->hi());
|
| return DefineAsRegister(new (zone()) LConstructDouble(hi, lo));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoReturn(HReturn* instr) {
|
| LOperand* context = info()->IsStub() ? UseFixed(instr->context(), cp) : NULL;
|
| LOperand* parameter_count = UseRegisterOrConstant(instr->parameter_count());
|
| return new (zone())
|
| - LReturn(UseFixed(instr->value(), r3), context, parameter_count);
|
| + LReturn(UseFixed(instr->value(), r2), context, parameter_count);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
|
| Representation r = instr->representation();
|
| if (r.IsSmi()) {
|
| @@ -1994,7 +1830,6 @@ LInstruction* LChunkBuilder::DoConstant(HConstant* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| LOperand* global_object =
|
| @@ -2005,10 +1840,9 @@ LInstruction* LChunkBuilder::DoLoadGlobalGeneric(HLoadGlobalGeneric* instr) {
|
| }
|
| LLoadGlobalGeneric* result =
|
| new (zone()) LLoadGlobalGeneric(context, global_object, vector);
|
| - return MarkAsCall(DefineFixed(result, r3), instr);
|
| + return MarkAsCall(DefineFixed(result, r2), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
|
| LOperand* context = UseRegisterAtStart(instr->value());
|
| LInstruction* result =
|
| @@ -2019,7 +1853,6 @@ LInstruction* LChunkBuilder::DoLoadContextSlot(HLoadContextSlot* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
|
| LOperand* context;
|
| LOperand* value;
|
| @@ -2037,13 +1870,11 @@ LInstruction* LChunkBuilder::DoStoreContextSlot(HStoreContextSlot* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLoadNamedField(HLoadNamedField* instr) {
|
| LOperand* obj = UseRegisterAtStart(instr->object());
|
| return DefineAsRegister(new (zone()) LLoadNamedField(obj));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| LOperand* object =
|
| @@ -2054,23 +1885,20 @@ LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
|
| }
|
|
|
| LInstruction* result =
|
| - DefineFixed(new (zone()) LLoadNamedGeneric(context, object, vector), r3);
|
| + DefineFixed(new (zone()) LLoadNamedGeneric(context, object, vector), r2);
|
| return MarkAsCall(result, instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLoadFunctionPrototype(
|
| HLoadFunctionPrototype* instr) {
|
| return AssignEnvironment(DefineAsRegister(
|
| new (zone()) LLoadFunctionPrototype(UseRegister(instr->function()))));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLoadRoot(HLoadRoot* instr) {
|
| return DefineAsRegister(new (zone()) LLoadRoot);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
|
| DCHECK(instr->key()->representation().IsSmiOrInteger32());
|
| ElementsKind elements_kind = instr->elements_kind();
|
| @@ -2115,7 +1943,6 @@ LInstruction* LChunkBuilder::DoLoadKeyed(HLoadKeyed* instr) {
|
| return result;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| LOperand* object =
|
| @@ -2127,11 +1954,10 @@ LInstruction* LChunkBuilder::DoLoadKeyedGeneric(HLoadKeyedGeneric* instr) {
|
| }
|
|
|
| LInstruction* result = DefineFixed(
|
| - new (zone()) LLoadKeyedGeneric(context, object, key, vector), r3);
|
| + new (zone()) LLoadKeyedGeneric(context, object, key, vector), r2);
|
| return MarkAsCall(result, instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
| if (!instr->is_fixed_typed_array()) {
|
| DCHECK(instr->elements()->representation().IsTagged());
|
| @@ -2171,7 +1997,6 @@ LInstruction* LChunkBuilder::DoStoreKeyed(HStoreKeyed* instr) {
|
| return new (zone()) LStoreKeyed(backing_store, key, val, backing_store_owner);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| LOperand* obj =
|
| @@ -2195,7 +2020,6 @@ LInstruction* LChunkBuilder::DoStoreKeyedGeneric(HStoreKeyedGeneric* instr) {
|
| return MarkAsCall(result, instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
| HTransitionElementsKind* instr) {
|
| if (IsSimpleMapChangeTransition(instr->from_kind(), instr->to_kind())) {
|
| @@ -2205,7 +2029,7 @@ LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
| new (zone()) LTransitionElementsKind(object, NULL, new_map_reg);
|
| return result;
|
| } else {
|
| - LOperand* object = UseFixed(instr->object(), r3);
|
| + LOperand* object = UseFixed(instr->object(), r2);
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| LTransitionElementsKind* result =
|
| new (zone()) LTransitionElementsKind(object, context, NULL);
|
| @@ -2213,7 +2037,6 @@ LInstruction* LChunkBuilder::DoTransitionElementsKind(
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoTrapAllocationMemento(
|
| HTrapAllocationMemento* instr) {
|
| LOperand* object = UseRegister(instr->object());
|
| @@ -2223,7 +2046,6 @@ LInstruction* LChunkBuilder::DoTrapAllocationMemento(
|
| return AssignEnvironment(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoMaybeGrowElements(HMaybeGrowElements* instr) {
|
| info()->MarkAsDeferredCalling();
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| @@ -2234,11 +2056,10 @@ LInstruction* LChunkBuilder::DoMaybeGrowElements(HMaybeGrowElements* instr) {
|
|
|
| LMaybeGrowElements* result = new (zone())
|
| LMaybeGrowElements(context, object, elements, key, current_capacity);
|
| - DefineFixed(result, r3);
|
| + DefineFixed(result, r2);
|
| return AssignPointerMap(AssignEnvironment(result));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| bool is_in_object = instr->access().IsInobject();
|
| bool needs_write_barrier = instr->NeedsWriteBarrier();
|
| @@ -2269,7 +2090,6 @@ LInstruction* LChunkBuilder::DoStoreNamedField(HStoreNamedField* instr) {
|
| return new (zone()) LStoreNamedField(obj, val, temp);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| LOperand* obj =
|
| @@ -2287,16 +2107,14 @@ LInstruction* LChunkBuilder::DoStoreNamedGeneric(HStoreNamedGeneric* instr) {
|
| return MarkAsCall(result, instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStringAdd(HStringAdd* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - LOperand* left = UseFixed(instr->left(), r4);
|
| - LOperand* right = UseFixed(instr->right(), r3);
|
| + LOperand* left = UseFixed(instr->left(), r3);
|
| + LOperand* right = UseFixed(instr->right(), r2);
|
| return MarkAsCall(
|
| - DefineFixed(new (zone()) LStringAdd(context, left, right), r3), instr);
|
| + DefineFixed(new (zone()) LStringAdd(context, left, right), r2), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
|
| LOperand* string = UseTempRegister(instr->string());
|
| LOperand* index = UseTempRegister(instr->index());
|
| @@ -2306,7 +2124,6 @@ LInstruction* LChunkBuilder::DoStringCharCodeAt(HStringCharCodeAt* instr) {
|
| return AssignPointerMap(DefineAsRegister(result));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) {
|
| LOperand* char_code = UseRegister(instr->value());
|
| LOperand* context = UseAny(instr->context());
|
| @@ -2315,7 +2132,6 @@ LInstruction* LChunkBuilder::DoStringCharFromCode(HStringCharFromCode* instr) {
|
| return AssignPointerMap(DefineAsRegister(result));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
|
| info()->MarkAsDeferredCalling();
|
| LOperand* context = UseAny(instr->context());
|
| @@ -2326,7 +2142,6 @@ LInstruction* LChunkBuilder::DoAllocate(HAllocate* instr) {
|
| return AssignPointerMap(DefineAsRegister(result));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
|
| DCHECK(argument_count_ == 0);
|
| allocator_->MarkAsOsrEntry();
|
| @@ -2334,7 +2149,6 @@ LInstruction* LChunkBuilder::DoOsrEntry(HOsrEntry* instr) {
|
| return AssignEnvironment(new (zone()) LOsrEntry);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
|
| LParameter* result = new (zone()) LParameter;
|
| if (instr->kind() == HParameter::STACK_PARAMETER) {
|
| @@ -2349,7 +2163,6 @@ LInstruction* LChunkBuilder::DoParameter(HParameter* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
| // Use an index that corresponds to the location in the unoptimized frame,
|
| // which the optimized frame will subsume.
|
| @@ -2368,7 +2181,6 @@ LInstruction* LChunkBuilder::DoUnknownOSRValue(HUnknownOSRValue* instr) {
|
| return DefineAsSpilled(new (zone()) LUnknownOSRValue, spill_index);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
|
| // There are no real uses of the arguments object.
|
| // arguments.length and element access are supported directly on
|
| @@ -2377,7 +2189,6 @@ LInstruction* LChunkBuilder::DoArgumentsObject(HArgumentsObject* instr) {
|
| return NULL;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) {
|
| instr->ReplayEnvironment(current_block_->last_environment());
|
|
|
| @@ -2385,7 +2196,6 @@ LInstruction* LChunkBuilder::DoCapturedObject(HCapturedObject* instr) {
|
| return NULL;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
|
| info()->MarkAsRequiresFrame();
|
| LOperand* args = UseRegister(instr->arguments());
|
| @@ -2394,33 +2204,28 @@ LInstruction* LChunkBuilder::DoAccessArgumentsAt(HAccessArgumentsAt* instr) {
|
| return DefineAsRegister(new (zone()) LAccessArgumentsAt(args, length, index));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoToFastProperties(HToFastProperties* instr) {
|
| - LOperand* object = UseFixed(instr->value(), r3);
|
| + LOperand* object = UseFixed(instr->value(), r2);
|
| LToFastProperties* result = new (zone()) LToFastProperties(object);
|
| - return MarkAsCall(DefineFixed(result, r3), instr);
|
| + return MarkAsCall(DefineFixed(result, r2), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - LOperand* value = UseFixed(instr->value(), r6);
|
| + LOperand* value = UseFixed(instr->value(), r5);
|
| LTypeof* result = new (zone()) LTypeof(context, value);
|
| - return MarkAsCall(DefineFixed(result, r3), instr);
|
| + return MarkAsCall(DefineFixed(result, r2), instr);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoTypeofIsAndBranch(HTypeofIsAndBranch* instr) {
|
| return new (zone()) LTypeofIsAndBranch(UseRegister(instr->value()));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoSimulate(HSimulate* instr) {
|
| instr->ReplayEnvironment(current_block_->last_environment());
|
| return NULL;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
|
| if (instr->is_function_entry()) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| @@ -2433,7 +2238,6 @@ LInstruction* LChunkBuilder::DoStackCheck(HStackCheck* instr) {
|
| }
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
|
| HEnvironment* outer = current_block_->last_environment();
|
| outer->set_ast_id(instr->ReturnId());
|
| @@ -2452,7 +2256,6 @@ LInstruction* LChunkBuilder::DoEnterInlined(HEnterInlined* instr) {
|
| return NULL;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
|
| LInstruction* pop = NULL;
|
|
|
| @@ -2471,29 +2274,25 @@ LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
|
| return pop;
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoForInPrepareMap(HForInPrepareMap* instr) {
|
| LOperand* context = UseFixed(instr->context(), cp);
|
| - LOperand* object = UseFixed(instr->enumerable(), r3);
|
| + LOperand* object = UseFixed(instr->enumerable(), r2);
|
| LForInPrepareMap* result = new (zone()) LForInPrepareMap(context, object);
|
| - return MarkAsCall(DefineFixed(result, r3), instr, CAN_DEOPTIMIZE_EAGERLY);
|
| + return MarkAsCall(DefineFixed(result, r2), instr, CAN_DEOPTIMIZE_EAGERLY);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoForInCacheArray(HForInCacheArray* instr) {
|
| LOperand* map = UseRegister(instr->map());
|
| return AssignEnvironment(
|
| DefineAsRegister(new (zone()) LForInCacheArray(map)));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoCheckMapValue(HCheckMapValue* instr) {
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| LOperand* map = UseRegisterAtStart(instr->map());
|
| return AssignEnvironment(new (zone()) LCheckMapValue(value, map));
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
|
| LOperand* object = UseRegister(instr->object());
|
| LOperand* index = UseTempRegister(instr->index());
|
| @@ -2502,7 +2301,6 @@ LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
|
| return AssignPointerMap(result);
|
| }
|
|
|
| -
|
| LInstruction* LChunkBuilder::DoStoreFrameContext(HStoreFrameContext* instr) {
|
| LOperand* context = UseRegisterAtStart(instr->context());
|
| return new (zone()) LStoreFrameContext(context);
|
|
|