Index: src/ia32/lithium-codegen-ia32.cc |
=================================================================== |
--- src/ia32/lithium-codegen-ia32.cc (revision 6305) |
+++ src/ia32/lithium-codegen-ia32.cc (working copy) |
@@ -746,11 +746,11 @@ |
void LCodeGen::DoModI(LModI* instr) { |
- LOperand* right = instr->right(); |
+ LOperand* right = instr->InputAt(1); |
ASSERT(ToRegister(instr->result()).is(edx)); |
- ASSERT(ToRegister(instr->left()).is(eax)); |
- ASSERT(!ToRegister(instr->right()).is(eax)); |
- ASSERT(!ToRegister(instr->right()).is(edx)); |
+ ASSERT(ToRegister(instr->InputAt(0)).is(eax)); |
+ ASSERT(!ToRegister(instr->InputAt(1)).is(eax)); |
+ ASSERT(!ToRegister(instr->InputAt(1)).is(edx)); |
Register right_reg = ToRegister(right); |
@@ -786,11 +786,11 @@ |
void LCodeGen::DoDivI(LDivI* instr) { |
- LOperand* right = instr->right(); |
+ LOperand* right = instr->InputAt(1); |
ASSERT(ToRegister(instr->result()).is(eax)); |
- ASSERT(ToRegister(instr->left()).is(eax)); |
- ASSERT(!ToRegister(instr->right()).is(eax)); |
- ASSERT(!ToRegister(instr->right()).is(edx)); |
+ ASSERT(ToRegister(instr->InputAt(0)).is(eax)); |
+ ASSERT(!ToRegister(instr->InputAt(1)).is(eax)); |
+ ASSERT(!ToRegister(instr->InputAt(1)).is(edx)); |
Register left_reg = eax; |
@@ -832,11 +832,11 @@ |
void LCodeGen::DoMulI(LMulI* instr) { |
- Register left = ToRegister(instr->left()); |
- LOperand* right = instr->right(); |
+ Register left = ToRegister(instr->InputAt(0)); |
+ LOperand* right = instr->InputAt(1); |
if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) { |
- __ mov(ToRegister(instr->temp()), left); |
+ __ mov(ToRegister(instr->TempAt(0)), left); |
} |
if (right->IsConstantOperand()) { |
@@ -860,7 +860,7 @@ |
} |
} else { |
// Test the non-zero operand for negative sign. |
- __ or_(ToRegister(instr->temp()), ToOperand(right)); |
+ __ or_(ToRegister(instr->TempAt(0)), ToOperand(right)); |
DeoptimizeIf(sign, instr->environment()); |
} |
__ bind(&done); |
@@ -869,8 +869,8 @@ |
void LCodeGen::DoBitI(LBitI* instr) { |
- LOperand* left = instr->left(); |
- LOperand* right = instr->right(); |
+ LOperand* left = instr->InputAt(0); |
+ LOperand* right = instr->InputAt(1); |
ASSERT(left->Equals(instr->result())); |
ASSERT(left->IsRegister()); |
@@ -910,8 +910,8 @@ |
void LCodeGen::DoShiftI(LShiftI* instr) { |
- LOperand* left = instr->left(); |
- LOperand* right = instr->right(); |
+ LOperand* left = instr->InputAt(0); |
+ LOperand* right = instr->InputAt(1); |
ASSERT(left->Equals(instr->result())); |
ASSERT(left->IsRegister()); |
if (right->IsRegister()) { |
@@ -966,8 +966,8 @@ |
void LCodeGen::DoSubI(LSubI* instr) { |
- LOperand* left = instr->left(); |
- LOperand* right = instr->right(); |
+ LOperand* left = instr->InputAt(0); |
+ LOperand* right = instr->InputAt(1); |
ASSERT(left->Equals(instr->result())); |
if (right->IsConstantOperand()) { |
@@ -1022,22 +1022,22 @@ |
void LCodeGen::DoJSArrayLength(LJSArrayLength* instr) { |
Register result = ToRegister(instr->result()); |
- Register array = ToRegister(instr->input()); |
+ Register array = ToRegister(instr->InputAt(0)); |
__ mov(result, FieldOperand(array, JSArray::kLengthOffset)); |
} |
void LCodeGen::DoFixedArrayLength(LFixedArrayLength* instr) { |
Register result = ToRegister(instr->result()); |
- Register array = ToRegister(instr->input()); |
+ Register array = ToRegister(instr->InputAt(0)); |
__ mov(result, FieldOperand(array, FixedArray::kLengthOffset)); |
} |
void LCodeGen::DoValueOf(LValueOf* instr) { |
- Register input = ToRegister(instr->input()); |
+ Register input = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
- Register map = ToRegister(instr->temporary()); |
+ Register map = ToRegister(instr->TempAt(0)); |
ASSERT(input.is(result)); |
NearLabel done; |
// If the object is a smi return the object. |
@@ -1054,14 +1054,14 @@ |
void LCodeGen::DoBitNotI(LBitNotI* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->Equals(instr->result())); |
__ not_(ToRegister(input)); |
} |
void LCodeGen::DoThrow(LThrow* instr) { |
- __ push(ToOperand(instr->input())); |
+ __ push(ToOperand(instr->InputAt(0))); |
CallRuntime(Runtime::kThrow, 1, instr); |
if (FLAG_debug_code) { |
@@ -1072,8 +1072,8 @@ |
void LCodeGen::DoAddI(LAddI* instr) { |
- LOperand* left = instr->left(); |
- LOperand* right = instr->right(); |
+ LOperand* left = instr->InputAt(0); |
+ LOperand* right = instr->InputAt(1); |
ASSERT(left->Equals(instr->result())); |
if (right->IsConstantOperand()) { |
@@ -1089,8 +1089,8 @@ |
void LCodeGen::DoArithmeticD(LArithmeticD* instr) { |
- LOperand* left = instr->left(); |
- LOperand* right = instr->right(); |
+ LOperand* left = instr->InputAt(0); |
+ LOperand* right = instr->InputAt(1); |
// Modulo uses a fixed result register. |
ASSERT(instr->op() == Token::MOD || left->Equals(instr->result())); |
switch (instr->op()) { |
@@ -1129,8 +1129,8 @@ |
void LCodeGen::DoArithmeticT(LArithmeticT* instr) { |
- ASSERT(ToRegister(instr->left()).is(edx)); |
- ASSERT(ToRegister(instr->right()).is(eax)); |
+ ASSERT(ToRegister(instr->InputAt(0)).is(edx)); |
+ ASSERT(ToRegister(instr->InputAt(1)).is(eax)); |
ASSERT(ToRegister(instr->result()).is(eax)); |
TypeRecordingBinaryOpStub stub(instr->op(), NO_OVERWRITE); |
@@ -1171,17 +1171,17 @@ |
Representation r = instr->hydrogen()->representation(); |
if (r.IsInteger32()) { |
- Register reg = ToRegister(instr->input()); |
+ Register reg = ToRegister(instr->InputAt(0)); |
__ test(reg, Operand(reg)); |
EmitBranch(true_block, false_block, not_zero); |
} else if (r.IsDouble()) { |
- XMMRegister reg = ToDoubleRegister(instr->input()); |
+ XMMRegister reg = ToDoubleRegister(instr->InputAt(0)); |
__ xorpd(xmm0, xmm0); |
__ ucomisd(reg, xmm0); |
EmitBranch(true_block, false_block, not_equal); |
} else { |
ASSERT(r.IsTagged()); |
- Register reg = ToRegister(instr->input()); |
+ Register reg = ToRegister(instr->InputAt(0)); |
if (instr->hydrogen()->type().IsBoolean()) { |
__ cmp(reg, Factory::true_value()); |
EmitBranch(true_block, false_block, equal); |
@@ -1309,8 +1309,8 @@ |
void LCodeGen::DoCmpID(LCmpID* instr) { |
- LOperand* left = instr->left(); |
- LOperand* right = instr->right(); |
+ LOperand* left = instr->InputAt(0); |
+ LOperand* right = instr->InputAt(1); |
LOperand* result = instr->result(); |
NearLabel unordered; |
@@ -1335,8 +1335,8 @@ |
void LCodeGen::DoCmpIDAndBranch(LCmpIDAndBranch* instr) { |
- LOperand* left = instr->left(); |
- LOperand* right = instr->right(); |
+ LOperand* left = instr->InputAt(0); |
+ LOperand* right = instr->InputAt(1); |
int false_block = chunk_->LookupDestination(instr->false_block_id()); |
int true_block = chunk_->LookupDestination(instr->true_block_id()); |
@@ -1355,8 +1355,8 @@ |
void LCodeGen::DoCmpJSObjectEq(LCmpJSObjectEq* instr) { |
- Register left = ToRegister(instr->left()); |
- Register right = ToRegister(instr->right()); |
+ Register left = ToRegister(instr->InputAt(0)); |
+ Register right = ToRegister(instr->InputAt(1)); |
Register result = ToRegister(instr->result()); |
__ cmp(left, Operand(right)); |
@@ -1369,8 +1369,8 @@ |
void LCodeGen::DoCmpJSObjectEqAndBranch(LCmpJSObjectEqAndBranch* instr) { |
- Register left = ToRegister(instr->left()); |
- Register right = ToRegister(instr->right()); |
+ Register left = ToRegister(instr->InputAt(0)); |
+ Register right = ToRegister(instr->InputAt(1)); |
int false_block = chunk_->LookupDestination(instr->false_block_id()); |
int true_block = chunk_->LookupDestination(instr->true_block_id()); |
@@ -1380,7 +1380,7 @@ |
void LCodeGen::DoIsNull(LIsNull* instr) { |
- Register reg = ToRegister(instr->input()); |
+ Register reg = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
// TODO(fsc): If the expression is known to be a smi, then it's |
@@ -1418,7 +1418,7 @@ |
void LCodeGen::DoIsNullAndBranch(LIsNullAndBranch* instr) { |
- Register reg = ToRegister(instr->input()); |
+ Register reg = ToRegister(instr->InputAt(0)); |
// TODO(fsc): If the expression is known to be a smi, then it's |
// definitely not null. Jump to the false block. |
@@ -1439,7 +1439,7 @@ |
__ j(zero, false_label); |
// Check for undetectable objects by looking in the bit field in |
// the map. The object has already been smi checked. |
- Register scratch = ToRegister(instr->temp()); |
+ Register scratch = ToRegister(instr->TempAt(0)); |
__ mov(scratch, FieldOperand(reg, HeapObject::kMapOffset)); |
__ movzx_b(scratch, FieldOperand(scratch, Map::kBitFieldOffset)); |
__ test(scratch, Immediate(1 << Map::kIsUndetectable)); |
@@ -1478,9 +1478,9 @@ |
void LCodeGen::DoIsObject(LIsObject* instr) { |
- Register reg = ToRegister(instr->input()); |
+ Register reg = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
- Register temp = ToRegister(instr->temp()); |
+ Register temp = ToRegister(instr->TempAt(0)); |
Label is_false, is_true, done; |
Condition true_cond = EmitIsObject(reg, result, temp, &is_false, &is_true); |
@@ -1498,9 +1498,9 @@ |
void LCodeGen::DoIsObjectAndBranch(LIsObjectAndBranch* instr) { |
- Register reg = ToRegister(instr->input()); |
- Register temp = ToRegister(instr->temp()); |
- Register temp2 = ToRegister(instr->temp2()); |
+ Register reg = ToRegister(instr->InputAt(0)); |
+ Register temp = ToRegister(instr->TempAt(0)); |
+ Register temp2 = ToRegister(instr->TempAt(1)); |
int true_block = chunk_->LookupDestination(instr->true_block_id()); |
int false_block = chunk_->LookupDestination(instr->false_block_id()); |
@@ -1514,7 +1514,7 @@ |
void LCodeGen::DoIsSmi(LIsSmi* instr) { |
- Operand input = ToOperand(instr->input()); |
+ Operand input = ToOperand(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
ASSERT(instr->hydrogen()->value()->representation().IsTagged()); |
@@ -1528,7 +1528,7 @@ |
void LCodeGen::DoIsSmiAndBranch(LIsSmiAndBranch* instr) { |
- Operand input = ToOperand(instr->input()); |
+ Operand input = ToOperand(instr->InputAt(0)); |
int true_block = chunk_->LookupDestination(instr->true_block_id()); |
int false_block = chunk_->LookupDestination(instr->false_block_id()); |
@@ -1538,9 +1538,9 @@ |
} |
-InstanceType LHasInstanceType::TestType() { |
- InstanceType from = hydrogen()->from(); |
- InstanceType to = hydrogen()->to(); |
+static InstanceType TestType(HHasInstanceType* instr) { |
+ InstanceType from = instr->from(); |
+ InstanceType to = instr->to(); |
if (from == FIRST_TYPE) return to; |
ASSERT(from == to || to == LAST_TYPE); |
return from; |
@@ -1548,9 +1548,9 @@ |
-Condition LHasInstanceType::BranchCondition() { |
- InstanceType from = hydrogen()->from(); |
- InstanceType to = hydrogen()->to(); |
+static Condition BranchCondition(HHasInstanceType* instr) { |
+ InstanceType from = instr->from(); |
+ InstanceType to = instr->to(); |
if (from == to) return equal; |
if (to == LAST_TYPE) return above_equal; |
if (from == FIRST_TYPE) return below_equal; |
@@ -1560,15 +1560,15 @@ |
void LCodeGen::DoHasInstanceType(LHasInstanceType* instr) { |
- Register input = ToRegister(instr->input()); |
+ Register input = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
ASSERT(instr->hydrogen()->value()->representation().IsTagged()); |
__ test(input, Immediate(kSmiTagMask)); |
NearLabel done, is_false; |
__ j(zero, &is_false); |
- __ CmpObjectType(input, instr->TestType(), result); |
- __ j(NegateCondition(instr->BranchCondition()), &is_false); |
+ __ CmpObjectType(input, TestType(instr->hydrogen()), result); |
+ __ j(NegateCondition(BranchCondition(instr->hydrogen())), &is_false); |
__ mov(result, Handle<Object>(Heap::true_value())); |
__ jmp(&done); |
__ bind(&is_false); |
@@ -1578,8 +1578,8 @@ |
void LCodeGen::DoHasInstanceTypeAndBranch(LHasInstanceTypeAndBranch* instr) { |
- Register input = ToRegister(instr->input()); |
- Register temp = ToRegister(instr->temp()); |
+ Register input = ToRegister(instr->InputAt(0)); |
+ Register temp = ToRegister(instr->TempAt(0)); |
int true_block = chunk_->LookupDestination(instr->true_block_id()); |
int false_block = chunk_->LookupDestination(instr->false_block_id()); |
@@ -1589,13 +1589,13 @@ |
__ test(input, Immediate(kSmiTagMask)); |
__ j(zero, false_label); |
- __ CmpObjectType(input, instr->TestType(), temp); |
- EmitBranch(true_block, false_block, instr->BranchCondition()); |
+ __ CmpObjectType(input, TestType(instr->hydrogen()), temp); |
+ EmitBranch(true_block, false_block, BranchCondition(instr->hydrogen())); |
} |
void LCodeGen::DoHasCachedArrayIndex(LHasCachedArrayIndex* instr) { |
- Register input = ToRegister(instr->input()); |
+ Register input = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
ASSERT(instr->hydrogen()->value()->representation().IsTagged()); |
@@ -1611,7 +1611,7 @@ |
void LCodeGen::DoHasCachedArrayIndexAndBranch( |
LHasCachedArrayIndexAndBranch* instr) { |
- Register input = ToRegister(instr->input()); |
+ Register input = ToRegister(instr->InputAt(0)); |
int true_block = chunk_->LookupDestination(instr->true_block_id()); |
int false_block = chunk_->LookupDestination(instr->false_block_id()); |
@@ -1680,10 +1680,10 @@ |
void LCodeGen::DoClassOfTest(LClassOfTest* instr) { |
- Register input = ToRegister(instr->input()); |
+ Register input = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
ASSERT(input.is(result)); |
- Register temp = ToRegister(instr->temporary()); |
+ Register temp = ToRegister(instr->TempAt(0)); |
Handle<String> class_name = instr->hydrogen()->class_name(); |
NearLabel done; |
Label is_true, is_false; |
@@ -1703,9 +1703,9 @@ |
void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) { |
- Register input = ToRegister(instr->input()); |
- Register temp = ToRegister(instr->temporary()); |
- Register temp2 = ToRegister(instr->temporary2()); |
+ Register input = ToRegister(instr->InputAt(0)); |
+ Register temp = ToRegister(instr->TempAt(0)); |
+ Register temp2 = ToRegister(instr->TempAt(1)); |
if (input.is(temp)) { |
// Swap. |
Register swapper = temp; |
@@ -1727,7 +1727,7 @@ |
void LCodeGen::DoCmpMapAndBranch(LCmpMapAndBranch* instr) { |
- Register reg = ToRegister(instr->input()); |
+ Register reg = ToRegister(instr->InputAt(0)); |
int true_block = instr->true_block_id(); |
int false_block = instr->false_block_id(); |
@@ -1784,8 +1784,8 @@ |
deferred = new DeferredInstanceOfKnownGlobal(this, instr); |
Label done, false_result; |
- Register object = ToRegister(instr->input()); |
- Register temp = ToRegister(instr->temp()); |
+ Register object = ToRegister(instr->InputAt(0)); |
+ Register temp = ToRegister(instr->TempAt(0)); |
// A Smi is not instance of anything. |
__ test(object, Immediate(kSmiTagMask)); |
@@ -1795,7 +1795,7 @@ |
// hole value will be patched to the last map/result pair generated by the |
// instanceof stub. |
NearLabel cache_miss; |
- Register map = ToRegister(instr->temp()); |
+ Register map = ToRegister(instr->TempAt(0)); |
__ mov(map, FieldOperand(object, HeapObject::kMapOffset)); |
__ bind(deferred->map_check()); // Label for calculating code patching. |
__ cmp(map, Factory::the_hole_value()); // Patched to cached map. |
@@ -1843,7 +1843,7 @@ |
// Get the temp register reserved by the instruction. This needs to be edi as |
// its slot of the pushing of safepoint registers is used to communicate the |
// offset to the location of the map check. |
- Register temp = ToRegister(instr->temp()); |
+ Register temp = ToRegister(instr->TempAt(0)); |
ASSERT(temp.is(edi)); |
__ mov(InstanceofStub::right(), Immediate(instr->function())); |
static const int kAdditionalDelta = 13; |
@@ -1948,13 +1948,13 @@ |
void LCodeGen::DoStoreGlobal(LStoreGlobal* instr) { |
- Register value = ToRegister(instr->input()); |
+ Register value = ToRegister(instr->InputAt(0)); |
__ mov(Operand::Cell(instr->hydrogen()->cell()), value); |
} |
void LCodeGen::DoLoadNamedField(LLoadNamedField* instr) { |
- Register object = ToRegister(instr->input()); |
+ Register object = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
if (instr->hydrogen()->is_in_object()) { |
__ mov(result, FieldOperand(object, instr->hydrogen()->offset())); |
@@ -1977,7 +1977,7 @@ |
void LCodeGen::DoLoadFunctionPrototype(LLoadFunctionPrototype* instr) { |
Register function = ToRegister(instr->function()); |
- Register temp = ToRegister(instr->temporary()); |
+ Register temp = ToRegister(instr->TempAt(0)); |
Register result = ToRegister(instr->result()); |
// Check that the function really is a function. |
@@ -2018,8 +2018,8 @@ |
void LCodeGen::DoLoadElements(LLoadElements* instr) { |
- ASSERT(instr->result()->Equals(instr->input())); |
- Register reg = ToRegister(instr->input()); |
+ ASSERT(instr->result()->Equals(instr->InputAt(0))); |
+ Register reg = ToRegister(instr->InputAt(0)); |
__ mov(reg, FieldOperand(reg, JSObject::kElementsOffset)); |
if (FLAG_debug_code) { |
NearLabel done; |
@@ -2099,7 +2099,7 @@ |
void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) { |
- Operand elem = ToOperand(instr->input()); |
+ Operand elem = ToOperand(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
NearLabel done; |
@@ -2173,7 +2173,7 @@ |
void LCodeGen::DoPushArgument(LPushArgument* instr) { |
- LOperand* argument = instr->input(); |
+ LOperand* argument = instr->InputAt(0); |
if (argument->IsConstantOperand()) { |
__ push(ToImmediate(argument)); |
} else { |
@@ -2239,7 +2239,7 @@ |
void LCodeGen::DoDeferredMathAbsTaggedHeapNumber(LUnaryMathOperation* instr) { |
- Register input_reg = ToRegister(instr->input()); |
+ Register input_reg = ToRegister(instr->InputAt(0)); |
__ cmp(FieldOperand(input_reg, HeapObject::kMapOffset), |
Factory::heap_number_map()); |
DeoptimizeIf(not_equal, instr->environment()); |
@@ -2306,17 +2306,17 @@ |
LUnaryMathOperation* instr_; |
}; |
- ASSERT(instr->input()->Equals(instr->result())); |
+ ASSERT(instr->InputAt(0)->Equals(instr->result())); |
Representation r = instr->hydrogen()->value()->representation(); |
if (r.IsDouble()) { |
XMMRegister scratch = xmm0; |
- XMMRegister input_reg = ToDoubleRegister(instr->input()); |
+ XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
__ pxor(scratch, scratch); |
__ subsd(scratch, input_reg); |
__ pand(input_reg, scratch); |
} else if (r.IsInteger32()) { |
- Register input_reg = ToRegister(instr->input()); |
+ Register input_reg = ToRegister(instr->InputAt(0)); |
__ test(input_reg, Operand(input_reg)); |
Label is_positive; |
__ j(not_sign, &is_positive); |
@@ -2328,7 +2328,7 @@ |
DeferredMathAbsTaggedHeapNumber* deferred = |
new DeferredMathAbsTaggedHeapNumber(this, instr); |
Label not_smi; |
- Register input_reg = ToRegister(instr->input()); |
+ Register input_reg = ToRegister(instr->InputAt(0)); |
// Smi check. |
__ test(input_reg, Immediate(kSmiTagMask)); |
__ j(not_zero, deferred->entry()); |
@@ -2349,7 +2349,7 @@ |
void LCodeGen::DoMathFloor(LUnaryMathOperation* instr) { |
XMMRegister xmm_scratch = xmm0; |
Register output_reg = ToRegister(instr->result()); |
- XMMRegister input_reg = ToDoubleRegister(instr->input()); |
+ XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
__ xorpd(xmm_scratch, xmm_scratch); // Zero the register. |
__ ucomisd(input_reg, xmm_scratch); |
@@ -2371,7 +2371,7 @@ |
void LCodeGen::DoMathRound(LUnaryMathOperation* instr) { |
XMMRegister xmm_scratch = xmm0; |
Register output_reg = ToRegister(instr->result()); |
- XMMRegister input_reg = ToDoubleRegister(instr->input()); |
+ XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
// xmm_scratch = 0.5 |
ExternalReference one_half = ExternalReference::address_of_one_half(); |
@@ -2404,7 +2404,7 @@ |
void LCodeGen::DoMathSqrt(LUnaryMathOperation* instr) { |
- XMMRegister input_reg = ToDoubleRegister(instr->input()); |
+ XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
ASSERT(ToDoubleRegister(instr->result()).is(input_reg)); |
__ sqrtsd(input_reg, input_reg); |
} |
@@ -2412,7 +2412,7 @@ |
void LCodeGen::DoMathPowHalf(LUnaryMathOperation* instr) { |
XMMRegister xmm_scratch = xmm0; |
- XMMRegister input_reg = ToDoubleRegister(instr->input()); |
+ XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
ASSERT(ToDoubleRegister(instr->result()).is(input_reg)); |
ExternalReference negative_infinity = |
ExternalReference::address_of_negative_infinity(); |
@@ -2424,8 +2424,8 @@ |
void LCodeGen::DoPower(LPower* instr) { |
- LOperand* left = instr->left(); |
- LOperand* right = instr->right(); |
+ LOperand* left = instr->InputAt(0); |
+ LOperand* right = instr->InputAt(1); |
DoubleRegister result_reg = ToDoubleRegister(instr->result()); |
Representation exponent_type = instr->hydrogen()->right()->representation(); |
if (exponent_type.IsDouble()) { |
@@ -2587,7 +2587,7 @@ |
void LCodeGen::DoCallNew(LCallNew* instr) { |
- ASSERT(ToRegister(instr->input()).is(edi)); |
+ ASSERT(ToRegister(instr->InputAt(0)).is(edi)); |
ASSERT(ToRegister(instr->result()).is(eax)); |
Handle<Code> builtin(Builtins::builtin(Builtins::JSConstructCall)); |
@@ -2614,12 +2614,12 @@ |
if (instr->is_in_object()) { |
__ mov(FieldOperand(object, offset), value); |
if (instr->needs_write_barrier()) { |
- Register temp = ToRegister(instr->temp()); |
+ Register temp = ToRegister(instr->TempAt(0)); |
// Update the write barrier for the object for in-object properties. |
__ RecordWrite(object, offset, value, temp); |
} |
} else { |
- Register temp = ToRegister(instr->temp()); |
+ Register temp = ToRegister(instr->TempAt(0)); |
__ mov(temp, FieldOperand(object, JSObject::kPropertiesOffset)); |
__ mov(FieldOperand(temp, offset), value); |
if (instr->needs_write_barrier()) { |
@@ -2683,7 +2683,7 @@ |
void LCodeGen::DoInteger32ToDouble(LInteger32ToDouble* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister() || input->IsStackSlot()); |
LOperand* output = instr->result(); |
ASSERT(output->IsDoubleRegister()); |
@@ -2701,7 +2701,7 @@ |
LNumberTagI* instr_; |
}; |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister() && input->Equals(instr->result())); |
Register reg = ToRegister(input); |
@@ -2714,7 +2714,7 @@ |
void LCodeGen::DoDeferredNumberTagI(LNumberTagI* instr) { |
Label slow; |
- Register reg = ToRegister(instr->input()); |
+ Register reg = ToRegister(instr->InputAt(0)); |
Register tmp = reg.is(eax) ? ecx : eax; |
// Preserve the value of all registers. |
@@ -2764,9 +2764,9 @@ |
LNumberTagD* instr_; |
}; |
- XMMRegister input_reg = ToDoubleRegister(instr->input()); |
+ XMMRegister input_reg = ToDoubleRegister(instr->InputAt(0)); |
Register reg = ToRegister(instr->result()); |
- Register tmp = ToRegister(instr->temp()); |
+ Register tmp = ToRegister(instr->TempAt(0)); |
DeferredNumberTagD* deferred = new DeferredNumberTagD(this, instr); |
if (FLAG_inline_new) { |
@@ -2796,7 +2796,7 @@ |
void LCodeGen::DoSmiTag(LSmiTag* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister() && input->Equals(instr->result())); |
ASSERT(!instr->hydrogen_value()->CheckFlag(HValue::kCanOverflow)); |
__ SmiTag(ToRegister(input)); |
@@ -2804,7 +2804,7 @@ |
void LCodeGen::DoSmiUntag(LSmiUntag* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister() && input->Equals(instr->result())); |
if (instr->needs_check()) { |
__ test(ToRegister(input), Immediate(kSmiTagMask)); |
@@ -2864,7 +2864,7 @@ |
void LCodeGen::DoDeferredTaggedToI(LTaggedToI* instr) { |
NearLabel done, heap_number; |
- Register input_reg = ToRegister(instr->input()); |
+ Register input_reg = ToRegister(instr->InputAt(0)); |
// Heap number map check. |
__ cmp(FieldOperand(input_reg, HeapObject::kMapOffset), |
@@ -2907,7 +2907,7 @@ |
__ add(Operand(esp), Immediate(kDoubleSize)); |
} else { |
NearLabel deopt; |
- XMMRegister xmm_temp = ToDoubleRegister(instr->temp()); |
+ XMMRegister xmm_temp = ToDoubleRegister(instr->TempAt(0)); |
__ movdbl(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset)); |
__ cvttsd2si(input_reg, Operand(xmm0)); |
__ cmp(input_reg, 0x80000000u); |
@@ -2924,7 +2924,7 @@ |
// Deoptimize if we don't have a heap number. |
DeoptimizeIf(not_equal, instr->environment()); |
- XMMRegister xmm_temp = ToDoubleRegister(instr->temp()); |
+ XMMRegister xmm_temp = ToDoubleRegister(instr->TempAt(0)); |
__ movdbl(xmm0, FieldOperand(input_reg, HeapNumber::kValueOffset)); |
__ cvttsd2si(input_reg, Operand(xmm0)); |
__ cvtsi2sd(xmm_temp, Operand(input_reg)); |
@@ -2944,7 +2944,7 @@ |
void LCodeGen::DoTaggedToI(LTaggedToI* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister()); |
ASSERT(input->Equals(instr->result())); |
@@ -2964,7 +2964,7 @@ |
void LCodeGen::DoNumberUntagD(LNumberUntagD* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister()); |
LOperand* result = instr->result(); |
ASSERT(result->IsDoubleRegister()); |
@@ -2977,7 +2977,7 @@ |
void LCodeGen::DoDoubleToI(LDoubleToI* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->IsDoubleRegister()); |
LOperand* result = instr->result(); |
ASSERT(result->IsRegister()); |
@@ -3015,7 +3015,7 @@ |
__ bind(&done); |
} else { |
NearLabel done; |
- Register temp_reg = ToRegister(instr->temporary()); |
+ Register temp_reg = ToRegister(instr->TempAt(0)); |
XMMRegister xmm_scratch = xmm0; |
// If cvttsd2si succeeded, we're done. Otherwise, we attempt |
@@ -3094,7 +3094,7 @@ |
void LCodeGen::DoCheckSmi(LCheckSmi* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister()); |
__ test(ToRegister(input), Immediate(kSmiTagMask)); |
DeoptimizeIf(instr->condition(), instr->environment()); |
@@ -3102,8 +3102,8 @@ |
void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) { |
- Register input = ToRegister(instr->input()); |
- Register temp = ToRegister(instr->temp()); |
+ Register input = ToRegister(instr->InputAt(0)); |
+ Register temp = ToRegister(instr->TempAt(0)); |
InstanceType first = instr->hydrogen()->first(); |
InstanceType last = instr->hydrogen()->last(); |
@@ -3127,15 +3127,15 @@ |
void LCodeGen::DoCheckFunction(LCheckFunction* instr) { |
- ASSERT(instr->input()->IsRegister()); |
- Register reg = ToRegister(instr->input()); |
+ ASSERT(instr->InputAt(0)->IsRegister()); |
+ Register reg = ToRegister(instr->InputAt(0)); |
__ cmp(reg, instr->hydrogen()->target()); |
DeoptimizeIf(not_equal, instr->environment()); |
} |
void LCodeGen::DoCheckMap(LCheckMap* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
ASSERT(input->IsRegister()); |
Register reg = ToRegister(input); |
__ cmp(FieldOperand(reg, HeapObject::kMapOffset), |
@@ -3156,7 +3156,7 @@ |
void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) { |
- Register reg = ToRegister(instr->temp()); |
+ Register reg = ToRegister(instr->TempAt(0)); |
Handle<JSObject> holder = instr->holder(); |
Handle<JSObject> current_prototype = instr->prototype(); |
@@ -3300,7 +3300,7 @@ |
void LCodeGen::DoTypeof(LTypeof* instr) { |
- LOperand* input = instr->input(); |
+ LOperand* input = instr->InputAt(0); |
if (input->IsConstantOperand()) { |
__ push(ToImmediate(input)); |
} else { |
@@ -3311,7 +3311,7 @@ |
void LCodeGen::DoTypeofIs(LTypeofIs* instr) { |
- Register input = ToRegister(instr->input()); |
+ Register input = ToRegister(instr->InputAt(0)); |
Register result = ToRegister(instr->result()); |
Label true_label; |
Label false_label; |
@@ -3334,7 +3334,7 @@ |
void LCodeGen::DoTypeofIsAndBranch(LTypeofIsAndBranch* instr) { |
- Register input = ToRegister(instr->input()); |
+ Register input = ToRegister(instr->InputAt(0)); |
int true_block = chunk_->LookupDestination(instr->true_block_id()); |
int false_block = chunk_->LookupDestination(instr->false_block_id()); |
Label* true_label = chunk_->GetAssemblyLabel(true_block); |