| Index: src/ia32/lithium-ia32.cc
|
| ===================================================================
|
| --- src/ia32/lithium-ia32.cc (revision 6230)
|
| +++ src/ia32/lithium-ia32.cc (working copy)
|
| @@ -64,10 +64,10 @@
|
| }
|
|
|
|
|
| -void LInstruction::PrintTo(StringStream* stream) const {
|
| +void LInstruction::PrintTo(StringStream* stream) {
|
| stream->Add("%s ", this->Mnemonic());
|
| if (HasResult()) {
|
| - result()->PrintTo(stream);
|
| + LTemplateInstruction<1>::cast(this)->result()->PrintTo(stream);
|
| stream->Add(" ");
|
| }
|
| PrintDataTo(stream);
|
| @@ -84,7 +84,7 @@
|
| }
|
|
|
|
|
| -void LLabel::PrintDataTo(StringStream* stream) const {
|
| +void LLabel::PrintDataTo(StringStream* stream) {
|
| LGap::PrintDataTo(stream);
|
| LLabel* rep = replacement();
|
| if (rep != NULL) {
|
| @@ -101,7 +101,7 @@
|
| }
|
|
|
|
|
| -void LParallelMove::PrintDataTo(StringStream* stream) const {
|
| +void LParallelMove::PrintDataTo(StringStream* stream) {
|
| for (int i = move_operands_.length() - 1; i >= 0; --i) {
|
| if (!move_operands_[i].IsEliminated()) {
|
| LOperand* from = move_operands_[i].from();
|
| @@ -130,7 +130,7 @@
|
| }
|
|
|
|
|
| -void LGap::PrintDataTo(StringStream* stream) const {
|
| +void LGap::PrintDataTo(StringStream* stream) {
|
| for (int i = 0; i < 4; i++) {
|
| stream->Add("(");
|
| if (parallel_moves_[i] != NULL) {
|
| @@ -170,7 +170,7 @@
|
|
|
|
|
|
|
| -void LBinaryOperation::PrintDataTo(StringStream* stream) const {
|
| +void LBinaryOperation::PrintDataTo(StringStream* stream) {
|
| stream->Add("= ");
|
| left()->PrintTo(stream);
|
| stream->Add(" ");
|
| @@ -178,18 +178,18 @@
|
| }
|
|
|
|
|
| -void LGoto::PrintDataTo(StringStream* stream) const {
|
| +void LGoto::PrintDataTo(StringStream* stream) {
|
| stream->Add("B%d", block_id());
|
| }
|
|
|
|
|
| -void LBranch::PrintDataTo(StringStream* stream) const {
|
| +void LBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("B%d | B%d on ", true_block_id(), false_block_id());
|
| input()->PrintTo(stream);
|
| }
|
|
|
|
|
| -void LCmpIDAndBranch::PrintDataTo(StringStream* stream) const {
|
| +void LCmpIDAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if ");
|
| left()->PrintTo(stream);
|
| stream->Add(" %s ", Token::String(op()));
|
| @@ -198,7 +198,7 @@
|
| }
|
|
|
|
|
| -void LIsNullAndBranch::PrintDataTo(StringStream* stream) const {
|
| +void LIsNullAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if ");
|
| input()->PrintTo(stream);
|
| stream->Add(is_strict() ? " === null" : " == null");
|
| @@ -206,35 +206,35 @@
|
| }
|
|
|
|
|
| -void LIsObjectAndBranch::PrintDataTo(StringStream* stream) const {
|
| +void LIsObjectAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if is_object(");
|
| input()->PrintTo(stream);
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
|
|
| -void LIsSmiAndBranch::PrintDataTo(StringStream* stream) const {
|
| +void LIsSmiAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if is_smi(");
|
| input()->PrintTo(stream);
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
|
|
| -void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) const {
|
| +void LHasInstanceTypeAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if has_instance_type(");
|
| input()->PrintTo(stream);
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
|
|
| -void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) const {
|
| +void LHasCachedArrayIndexAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if has_cached_array_index(");
|
| input()->PrintTo(stream);
|
| stream->Add(") then B%d else B%d", true_block_id(), false_block_id());
|
| }
|
|
|
|
|
| -void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) const {
|
| +void LClassOfTestAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if class_of_test(");
|
| input()->PrintTo(stream);
|
| stream->Add(", \"%o\") then B%d else B%d",
|
| @@ -244,13 +244,13 @@
|
| }
|
|
|
|
|
| -void LTypeofIs::PrintDataTo(StringStream* stream) const {
|
| +void LTypeofIs::PrintDataTo(StringStream* stream) {
|
| input()->PrintTo(stream);
|
| stream->Add(" == \"%s\"", *hydrogen()->type_literal()->ToCString());
|
| }
|
|
|
|
|
| -void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) const {
|
| +void LTypeofIsAndBranch::PrintDataTo(StringStream* stream) {
|
| stream->Add("if typeof ");
|
| input()->PrintTo(stream);
|
| stream->Add(" == \"%s\" then B%d else B%d",
|
| @@ -259,59 +259,60 @@
|
| }
|
|
|
|
|
| -void LCallConstantFunction::PrintDataTo(StringStream* stream) const {
|
| +void LCallConstantFunction::PrintDataTo(StringStream* stream) {
|
| stream->Add("#%d / ", arity());
|
| }
|
|
|
|
|
| -void LUnaryMathOperation::PrintDataTo(StringStream* stream) const {
|
| +void LUnaryMathOperation::PrintDataTo(StringStream* stream) {
|
| stream->Add("/%s ", hydrogen()->OpName());
|
| input()->PrintTo(stream);
|
| }
|
|
|
|
|
| -void LCallKeyed::PrintDataTo(StringStream* stream) const {
|
| +void LCallKeyed::PrintDataTo(StringStream* stream) {
|
| stream->Add("[ecx] #%d / ", arity());
|
| }
|
|
|
|
|
| -void LCallNamed::PrintDataTo(StringStream* stream) const {
|
| +void LCallNamed::PrintDataTo(StringStream* stream) {
|
| SmartPointer<char> name_string = name()->ToCString();
|
| stream->Add("%s #%d / ", *name_string, arity());
|
| }
|
|
|
|
|
| -void LCallGlobal::PrintDataTo(StringStream* stream) const {
|
| +void LCallGlobal::PrintDataTo(StringStream* stream) {
|
| SmartPointer<char> name_string = name()->ToCString();
|
| stream->Add("%s #%d / ", *name_string, arity());
|
| }
|
|
|
|
|
| -void LCallKnownGlobal::PrintDataTo(StringStream* stream) const {
|
| +void LCallKnownGlobal::PrintDataTo(StringStream* stream) {
|
| stream->Add("#%d / ", arity());
|
| }
|
|
|
|
|
| -void LCallNew::PrintDataTo(StringStream* stream) const {
|
| - LUnaryOperation::PrintDataTo(stream);
|
| +void LCallNew::PrintDataTo(StringStream* stream) {
|
| + LUnaryOperation<1>::PrintDataTo(stream);
|
| stream->Add(" #%d / ", arity());
|
| }
|
|
|
|
|
| -void LClassOfTest::PrintDataTo(StringStream* stream) const {
|
| +void LClassOfTest::PrintDataTo(StringStream* stream) {
|
| stream->Add("= class_of_test(");
|
| input()->PrintTo(stream);
|
| stream->Add(", \"%o\")", *hydrogen()->class_name());
|
| }
|
|
|
|
|
| -void LUnaryOperation::PrintDataTo(StringStream* stream) const {
|
| +template <int R>
|
| +void LUnaryOperation<R>::PrintDataTo(StringStream* stream) {
|
| stream->Add("= ");
|
| input()->PrintTo(stream);
|
| }
|
|
|
|
|
| -void LAccessArgumentsAt::PrintDataTo(StringStream* stream) const {
|
| +void LAccessArgumentsAt::PrintDataTo(StringStream* stream) {
|
| arguments()->PrintTo(stream);
|
|
|
| stream->Add(" length ");
|
| @@ -381,7 +382,7 @@
|
| }
|
|
|
|
|
| -void LStoreNamed::PrintDataTo(StringStream* stream) const {
|
| +void LStoreNamed::PrintDataTo(StringStream* stream) {
|
| object()->PrintTo(stream);
|
| stream->Add(".");
|
| stream->Add(*String::cast(*name())->ToCString());
|
| @@ -390,7 +391,7 @@
|
| }
|
|
|
|
|
| -void LStoreKeyed::PrintDataTo(StringStream* stream) const {
|
| +void LStoreKeyed::PrintDataTo(StringStream* stream) {
|
| object()->PrintTo(stream);
|
| stream->Add("[");
|
| key()->PrintTo(stream);
|
| @@ -598,32 +599,34 @@
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::Define(LInstruction* instr) {
|
| +LInstruction* LChunkBuilder::Define(LTemplateInstruction<1>* instr) {
|
| return Define(instr, new LUnallocated(LUnallocated::NONE));
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DefineAsRegister(LInstruction* instr) {
|
| +LInstruction* LChunkBuilder::DefineAsRegister(LTemplateInstruction<1>* instr) {
|
| return Define(instr, new LUnallocated(LUnallocated::MUST_HAVE_REGISTER));
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DefineAsSpilled(LInstruction* instr, int index) {
|
| +LInstruction* LChunkBuilder::DefineAsSpilled(LTemplateInstruction<1>* instr,
|
| + int index) {
|
| return Define(instr, new LUnallocated(LUnallocated::FIXED_SLOT, index));
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DefineSameAsFirst(LInstruction* instr) {
|
| +LInstruction* LChunkBuilder::DefineSameAsFirst(LTemplateInstruction<1>* instr) {
|
| return Define(instr, new LUnallocated(LUnallocated::SAME_AS_FIRST_INPUT));
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DefineFixed(LInstruction* instr, Register reg) {
|
| +LInstruction* LChunkBuilder::DefineFixed(LTemplateInstruction<1>* instr,
|
| + Register reg) {
|
| return Define(instr, ToUnallocated(reg));
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::DefineFixedDouble(LInstruction* instr,
|
| +LInstruction* LChunkBuilder::DefineFixedDouble(LTemplateInstruction<1>* instr,
|
| XMMRegister reg) {
|
| return Define(instr, ToUnallocated(reg));
|
| }
|
| @@ -692,7 +695,8 @@
|
| }
|
|
|
|
|
| -LInstruction* LChunkBuilder::Define(LInstruction* instr, LUnallocated* result) {
|
| +LInstruction* LChunkBuilder::Define(LTemplateInstruction<1>* instr,
|
| + LUnallocated* result) {
|
| allocator_->RecordDefinition(current_instruction_, result);
|
| instr->set_result(result);
|
| return instr;
|
| @@ -781,10 +785,10 @@
|
| can_deopt = !can_truncate;
|
| }
|
|
|
| - LInstruction* result =
|
| - DefineSameAsFirst(new LShiftI(op, left, right, can_deopt));
|
| - if (can_deopt) AssignEnvironment(result);
|
| - return result;
|
| + LShiftI* result = new LShiftI(op, left, right, can_deopt);
|
| + return can_deopt
|
| + ? AssignEnvironment(DefineSameAsFirst(result))
|
| + : DefineSameAsFirst(result);
|
| }
|
|
|
|
|
| @@ -813,7 +817,7 @@
|
| ASSERT(right->representation().IsTagged());
|
| LOperand* left_operand = UseFixed(left, edx);
|
| LOperand* right_operand = UseFixed(right, eax);
|
| - LInstruction* result = new LArithmeticT(op, left_operand, right_operand);
|
| + LArithmeticT* result = new LArithmeticT(op, left_operand, right_operand);
|
| return MarkAsCall(DefineFixed(result, eax), instr);
|
| }
|
|
|
| @@ -947,7 +951,7 @@
|
| }
|
|
|
|
|
| -void LEnvironment::PrintTo(StringStream* stream) const {
|
| +void LEnvironment::PrintTo(StringStream* stream) {
|
| stream->Add("[id=%d|", ast_id());
|
| stream->Add("[parameters=%d|", parameter_count());
|
| stream->Add("[arguments_stack_height=%d|", arguments_stack_height());
|
| @@ -999,10 +1003,11 @@
|
|
|
|
|
| LInstruction* LChunkBuilder::DoGoto(HGoto* instr) {
|
| - LInstruction* result = new LGoto(instr->FirstSuccessor()->block_id(),
|
| - instr->include_stack_check());
|
| - if (instr->include_stack_check()) result = AssignPointerMap(result);
|
| - return result;
|
| + LGoto* result = new LGoto(instr->FirstSuccessor()->block_id(),
|
| + instr->include_stack_check());
|
| + return (instr->include_stack_check())
|
| + ? AssignPointerMap(result)
|
| + : result;
|
| }
|
|
|
|
|
| @@ -1051,10 +1056,10 @@
|
| bool reversed = op == Token::GT || op == Token::LTE;
|
| LOperand* left_operand = UseFixed(left, reversed ? eax : edx);
|
| LOperand* right_operand = UseFixed(right, reversed ? edx : eax);
|
| - LInstruction* result = new LCmpTAndBranch(left_operand,
|
| - right_operand,
|
| - first_id,
|
| - second_id);
|
| + LCmpTAndBranch* result = new LCmpTAndBranch(left_operand,
|
| + right_operand,
|
| + first_id,
|
| + second_id);
|
| return MarkAsCall(result, instr);
|
| }
|
| } else if (v->IsIsSmi()) {
|
| @@ -1108,7 +1113,7 @@
|
| second_id);
|
| } else if (v->IsInstanceOf()) {
|
| HInstanceOf* instance_of = HInstanceOf::cast(v);
|
| - LInstruction* result =
|
| + LInstanceOfAndBranch* result =
|
| new LInstanceOfAndBranch(
|
| UseFixed(instance_of->left(), InstanceofStub::left()),
|
| UseFixed(instance_of->right(), InstanceofStub::right()),
|
| @@ -1155,7 +1160,7 @@
|
|
|
|
|
| LInstruction* LChunkBuilder::DoInstanceOf(HInstanceOf* instr) {
|
| - LInstruction* result =
|
| + LInstanceOf* result =
|
| new LInstanceOf(UseFixed(instr->left(), InstanceofStub::left()),
|
| UseFixed(instr->right(), InstanceofStub::right()));
|
| return MarkAsCall(DefineFixed(result, eax), instr);
|
| @@ -1164,7 +1169,7 @@
|
|
|
| LInstruction* LChunkBuilder::DoInstanceOfKnownGlobal(
|
| HInstanceOfKnownGlobal* instr) {
|
| - LInstruction* result =
|
| + LInstanceOfKnownGlobal* result =
|
| new LInstanceOfKnownGlobal(
|
| UseFixed(instr->value(), InstanceofStub::left()),
|
| FixedTemp(edi));
|
| @@ -1178,10 +1183,10 @@
|
| LOperand* receiver = UseFixed(instr->receiver(), eax);
|
| LOperand* length = UseRegisterAtStart(instr->length());
|
| LOperand* elements = UseRegisterAtStart(instr->elements());
|
| - LInstruction* result = new LApplyArguments(function,
|
| - receiver,
|
| - length,
|
| - elements);
|
| + LApplyArguments* result = new LApplyArguments(function,
|
| + receiver,
|
| + length,
|
| + elements);
|
| return MarkAsCall(DefineFixed(result, eax), instr, CAN_DEOPTIMIZE_EAGERLY);
|
| }
|
|
|
| @@ -1214,11 +1219,11 @@
|
| BuiltinFunctionId op = instr->op();
|
| if (op == kMathLog || op == kMathSin || op == kMathCos) {
|
| LOperand* input = UseFixedDouble(instr->value(), xmm1);
|
| - LInstruction* result = new LUnaryMathOperation(input);
|
| + LUnaryMathOperation* result = new LUnaryMathOperation(input);
|
| return MarkAsCall(DefineFixedDouble(result, xmm1), instr);
|
| } else {
|
| LOperand* input = UseRegisterAtStart(instr->value());
|
| - LInstruction* result = new LUnaryMathOperation(input);
|
| + LUnaryMathOperation* result = new LUnaryMathOperation(input);
|
| switch (op) {
|
| case kMathAbs:
|
| return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
|
| @@ -1267,7 +1272,7 @@
|
| LInstruction* LChunkBuilder::DoCallNew(HCallNew* instr) {
|
| LOperand* constructor = UseFixed(instr->constructor(), edi);
|
| argument_count_ -= instr->argument_count();
|
| - LInstruction* result = new LCallNew(constructor);
|
| + LCallNew* result = new LCallNew(constructor);
|
| return MarkAsCall(DefineFixed(result, eax), instr);
|
| }
|
|
|
| @@ -1347,12 +1352,12 @@
|
| FixedTemp(edx);
|
| LOperand* value = UseFixed(instr->left(), eax);
|
| LOperand* divisor = UseRegister(instr->right());
|
| - LInstruction* result = DefineFixed(new LModI(value, divisor), edx);
|
| - if (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
|
| - instr->CheckFlag(HValue::kCanBeDivByZero)) {
|
| - result = AssignEnvironment(result);
|
| - }
|
| - return result;
|
| + LModI* mod = new LModI(value, divisor);
|
| + LInstruction* result = DefineFixed(mod, edx);
|
| + return (instr->CheckFlag(HValue::kBailoutOnMinusZero) ||
|
| + instr->CheckFlag(HValue::kCanBeDivByZero))
|
| + ? AssignEnvironment(result)
|
| + : result;
|
| } else if (instr->representation().IsTagged()) {
|
| return DoArithmeticT(Token::MOD, instr);
|
| } else {
|
| @@ -1463,7 +1468,7 @@
|
| bool reversed = (op == Token::GT || op == Token::LTE);
|
| LOperand* left = UseFixed(instr->left(), reversed ? eax : edx);
|
| LOperand* right = UseFixed(instr->right(), reversed ? edx : eax);
|
| - LInstruction* result = new LCmpT(left, right);
|
| + LCmpT* result = new LCmpT(left, right);
|
| return MarkAsCall(DefineFixed(result, eax), instr);
|
| }
|
| }
|
| @@ -1473,7 +1478,7 @@
|
| HCompareJSObjectEq* instr) {
|
| LOperand* left = UseRegisterAtStart(instr->left());
|
| LOperand* right = UseRegisterAtStart(instr->right());
|
| - LInstruction* result = new LCmpJSObjectEq(left, right);
|
| + LCmpJSObjectEq* result = new LCmpJSObjectEq(left, right);
|
| return DefineAsRegister(result);
|
| }
|
|
|
| @@ -1542,7 +1547,7 @@
|
|
|
| LInstruction* LChunkBuilder::DoValueOf(HValueOf* instr) {
|
| LOperand* object = UseRegister(instr->value());
|
| - LInstruction* result = new LValueOf(object, TempRegister());
|
| + LValueOf* result = new LValueOf(object, TempRegister());
|
| return AssignEnvironment(DefineSameAsFirst(result));
|
| }
|
|
|
| @@ -1565,7 +1570,7 @@
|
| if (from.IsTagged()) {
|
| if (to.IsDouble()) {
|
| LOperand* value = UseRegister(instr->value());
|
| - LInstruction* res = new LNumberUntagD(value);
|
| + LNumberUntagD* res = new LNumberUntagD(value);
|
| return AssignEnvironment(DefineAsRegister(res));
|
| } else {
|
| ASSERT(to.IsInteger32());
|
| @@ -1576,7 +1581,7 @@
|
| (instr->CanTruncateToInt32() && CpuFeatures::IsSupported(SSE3))
|
| ? NULL
|
| : FixedTemp(xmm1);
|
| - LInstruction* res = new LTaggedToI(value, xmm_temp);
|
| + LTaggedToI* res = new LTaggedToI(value, xmm_temp);
|
| return AssignEnvironment(DefineSameAsFirst(res));
|
| } else {
|
| return DefineSameAsFirst(new LSmiUntag(value, needs_check));
|
| @@ -1589,7 +1594,7 @@
|
|
|
| // Make sure that temp and result_temp are different registers.
|
| LUnallocated* result_temp = TempRegister();
|
| - LInstruction* result = new LNumberTagD(value, temp);
|
| + LNumberTagD* result = new LNumberTagD(value, temp);
|
| return AssignPointerMap(Define(result, result_temp));
|
| } else {
|
| ASSERT(to.IsInteger32());
|
| @@ -1603,7 +1608,7 @@
|
| if (val->HasRange() && val->range()->IsInSmiRange()) {
|
| return DefineSameAsFirst(new LSmiTag(value));
|
| } else {
|
| - LInstruction* result = new LNumberTagI(value);
|
| + LNumberTagI* result = new LNumberTagI(value);
|
| return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result)));
|
| }
|
| } else {
|
| @@ -1625,14 +1630,14 @@
|
| LInstruction* LChunkBuilder::DoCheckInstanceType(HCheckInstanceType* instr) {
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| LOperand* temp = TempRegister();
|
| - LInstruction* result = new LCheckInstanceType(value, temp);
|
| + LCheckInstanceType* result = new LCheckInstanceType(value, temp);
|
| return AssignEnvironment(result);
|
| }
|
|
|
|
|
| LInstruction* LChunkBuilder::DoCheckPrototypeMaps(HCheckPrototypeMaps* instr) {
|
| LOperand* temp = TempRegister();
|
| - LInstruction* result =
|
| + LCheckPrototypeMaps* result =
|
| new LCheckPrototypeMaps(temp,
|
| instr->holder(),
|
| instr->receiver_map());
|
| @@ -1654,7 +1659,7 @@
|
|
|
| LInstruction* LChunkBuilder::DoCheckMap(HCheckMap* instr) {
|
| LOperand* value = UseRegisterAtStart(instr->value());
|
| - LInstruction* result = new LCheckMap(value);
|
| + LCheckMap* result = new LCheckMap(value);
|
| return AssignEnvironment(result);
|
| }
|
|
|
| @@ -1682,7 +1687,7 @@
|
|
|
|
|
| LInstruction* LChunkBuilder::DoLoadGlobal(HLoadGlobal* instr) {
|
| - LInstruction* result = new LLoadGlobal;
|
| + LLoadGlobal* result = new LLoadGlobal;
|
| return instr->check_hole_value()
|
| ? AssignEnvironment(DefineAsRegister(result))
|
| : DefineAsRegister(result);
|
| @@ -1702,8 +1707,8 @@
|
|
|
| LInstruction* LChunkBuilder::DoLoadNamedGeneric(HLoadNamedGeneric* instr) {
|
| LOperand* object = UseFixed(instr->object(), eax);
|
| - LInstruction* result = DefineFixed(new LLoadNamedGeneric(object), eax);
|
| - return MarkAsCall(result, instr);
|
| + LLoadNamedGeneric* result = new LLoadNamedGeneric(object);
|
| + return MarkAsCall(DefineFixed(result, eax), instr);
|
| }
|
|
|
|
|
| @@ -1731,14 +1736,12 @@
|
| // Double needs an extra temp, because the result is converted from heap
|
| // number to a double register.
|
| if (r.IsDouble()) load_result = TempRegister();
|
| - LInstruction* result = new LLoadKeyedFastElement(obj,
|
| - key,
|
| - load_result);
|
| - if (r.IsDouble()) {
|
| - result = DefineAsRegister(result);
|
| - } else {
|
| - result = DefineSameAsFirst(result);
|
| - }
|
| + LLoadKeyedFastElement* load = new LLoadKeyedFastElement(obj,
|
| + key,
|
| + load_result);
|
| + LInstruction* result = r.IsDouble()
|
| + ? DefineAsRegister(load)
|
| + : DefineSameAsFirst(load);
|
| return AssignEnvironment(result);
|
| }
|
|
|
| @@ -1747,9 +1750,8 @@
|
| LOperand* object = UseFixed(instr->object(), edx);
|
| LOperand* key = UseFixed(instr->key(), eax);
|
|
|
| - LInstruction* result =
|
| - DefineFixed(new LLoadKeyedGeneric(object, key), eax);
|
| - return MarkAsCall(result, instr);
|
| + LLoadKeyedGeneric* result = new LLoadKeyedGeneric(object, key);
|
| + return MarkAsCall(DefineFixed(result, eax), instr);
|
| }
|
|
|
|
|
| @@ -1816,7 +1818,7 @@
|
| LOperand* obj = UseFixed(instr->object(), edx);
|
| LOperand* val = UseFixed(instr->value(), eax);
|
|
|
| - LInstruction* result = new LStoreNamedGeneric(obj, instr->name(), val);
|
| + LStoreNamedGeneric* result = new LStoreNamedGeneric(obj, instr->name(), val);
|
| return MarkAsCall(result, instr);
|
| }
|
|
|
| @@ -1842,8 +1844,8 @@
|
|
|
|
|
| LInstruction* LChunkBuilder::DoDeleteProperty(HDeleteProperty* instr) {
|
| - LInstruction* result = new LDeleteProperty(Use(instr->object()),
|
| - UseOrConstant(instr->key()));
|
| + LDeleteProperty* result = new LDeleteProperty(Use(instr->object()),
|
| + UseOrConstant(instr->key()));
|
| return MarkAsCall(DefineFixed(result, eax), instr);
|
| }
|
|
|
| @@ -1884,13 +1886,13 @@
|
| LOperand* arguments = UseRegister(instr->arguments());
|
| LOperand* length = UseTempRegister(instr->length());
|
| LOperand* index = Use(instr->index());
|
| - LInstruction* result = new LAccessArgumentsAt(arguments, length, index);
|
| - return DefineAsRegister(AssignEnvironment(result));
|
| + LAccessArgumentsAt* result = new LAccessArgumentsAt(arguments, length, index);
|
| + return AssignEnvironment(DefineAsRegister(result));
|
| }
|
|
|
|
|
| LInstruction* LChunkBuilder::DoTypeof(HTypeof* instr) {
|
| - LInstruction* result = new LTypeof(UseAtStart(instr->value()));
|
| + LTypeof* result = new LTypeof(UseAtStart(instr->value()));
|
| return MarkAsCall(DefineFixed(result, eax), instr);
|
| }
|
|
|
| @@ -1919,8 +1921,8 @@
|
| // If there is an instruction pending deoptimization environment create a
|
| // lazy bailout instruction to capture the environment.
|
| if (pending_deoptimization_ast_id_ == instr->ast_id()) {
|
| - LInstruction* result = new LLazyBailout;
|
| - result = AssignEnvironment(result);
|
| + LLazyBailout* lazy_bailout = new LLazyBailout;
|
| + LInstruction* result = AssignEnvironment(lazy_bailout);
|
| instructions_pending_deoptimization_environment_->
|
| set_deoptimization_environment(result->environment());
|
| ClearInstructionPendingDeoptimizationEnvironment();
|
| @@ -1964,7 +1966,7 @@
|
| }
|
|
|
|
|
| -void LPointerMap::PrintTo(StringStream* stream) const {
|
| +void LPointerMap::PrintTo(StringStream* stream) {
|
| stream->Add("{");
|
| for (int i = 0; i < pointer_operands_.length(); ++i) {
|
| if (i != 0) stream->Add(";");
|
|
|