| Index: src/ia32/lithium-codegen-ia32.cc
|
| ===================================================================
|
| --- src/ia32/lithium-codegen-ia32.cc (revision 6288)
|
| +++ src/ia32/lithium-codegen-ia32.cc (working copy)
|
| @@ -832,7 +832,7 @@
|
| LOperand* right = instr->right();
|
|
|
| if (instr->hydrogen()->CheckFlag(HValue::kBailoutOnMinusZero)) {
|
| - __ mov(ToRegister(instr->temp()), left);
|
| + __ mov(ToRegister(instr->TempAt(0)), left);
|
| }
|
|
|
| if (right->IsConstantOperand()) {
|
| @@ -856,7 +856,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);
|
| @@ -1033,7 +1033,7 @@
|
| void LCodeGen::DoValueOf(LValueOf* instr) {
|
| Register input = ToRegister(instr->input());
|
| 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.
|
| @@ -1435,7 +1435,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));
|
| @@ -1476,7 +1476,7 @@
|
| void LCodeGen::DoIsObject(LIsObject* instr) {
|
| Register reg = ToRegister(instr->input());
|
| 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);
|
| @@ -1495,8 +1495,8 @@
|
|
|
| void LCodeGen::DoIsObjectAndBranch(LIsObjectAndBranch* instr) {
|
| Register reg = ToRegister(instr->input());
|
| - Register temp = ToRegister(instr->temp());
|
| - Register temp2 = ToRegister(instr->temp2());
|
| + 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());
|
| @@ -1534,9 +1534,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;
|
| @@ -1544,9 +1544,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;
|
| @@ -1563,8 +1563,8 @@
|
| __ 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);
|
| @@ -1575,7 +1575,7 @@
|
|
|
| void LCodeGen::DoHasInstanceTypeAndBranch(LHasInstanceTypeAndBranch* instr) {
|
| Register input = ToRegister(instr->input());
|
| - Register temp = ToRegister(instr->temp());
|
| + Register temp = ToRegister(instr->TempAt(0));
|
|
|
| int true_block = chunk_->LookupDestination(instr->true_block_id());
|
| int false_block = chunk_->LookupDestination(instr->false_block_id());
|
| @@ -1585,8 +1585,8 @@
|
| __ 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()));
|
| }
|
|
|
|
|
| @@ -1679,7 +1679,7 @@
|
| Register input = ToRegister(instr->input());
|
| 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;
|
| @@ -1700,8 +1700,8 @@
|
|
|
| void LCodeGen::DoClassOfTestAndBranch(LClassOfTestAndBranch* instr) {
|
| Register input = ToRegister(instr->input());
|
| - Register temp = ToRegister(instr->temporary());
|
| - Register temp2 = ToRegister(instr->temporary2());
|
| + Register temp = ToRegister(instr->TempAt(0));
|
| + Register temp2 = ToRegister(instr->TempAt(1));
|
| if (input.is(temp)) {
|
| // Swap.
|
| Register swapper = temp;
|
| @@ -1781,7 +1781,7 @@
|
|
|
| Label done, false_result;
|
| Register object = ToRegister(instr->input());
|
| - Register temp = ToRegister(instr->temp());
|
| + Register temp = ToRegister(instr->TempAt(0));
|
|
|
| // A Smi is not instance of anything.
|
| __ test(object, Immediate(kSmiTagMask));
|
| @@ -1791,7 +1791,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.
|
| @@ -1839,7 +1839,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;
|
| @@ -1973,7 +1973,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.
|
| @@ -2610,12 +2610,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()) {
|
| @@ -2762,7 +2762,7 @@
|
|
|
| XMMRegister input_reg = ToDoubleRegister(instr->input());
|
| 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) {
|
| @@ -2903,7 +2903,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);
|
| @@ -2920,7 +2920,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));
|
| @@ -3011,7 +3011,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
|
| @@ -3099,7 +3099,7 @@
|
|
|
| void LCodeGen::DoCheckInstanceType(LCheckInstanceType* instr) {
|
| Register input = ToRegister(instr->input());
|
| - Register temp = ToRegister(instr->temp());
|
| + Register temp = ToRegister(instr->TempAt(0));
|
| InstanceType first = instr->hydrogen()->first();
|
| InstanceType last = instr->hydrogen()->last();
|
|
|
| @@ -3152,7 +3152,7 @@
|
|
|
|
|
| void LCodeGen::DoCheckPrototypeMaps(LCheckPrototypeMaps* instr) {
|
| - Register reg = ToRegister(instr->temp());
|
| + Register reg = ToRegister(instr->TempAt(0));
|
|
|
| Handle<JSObject> holder = instr->holder();
|
| Handle<Map> receiver_map = instr->receiver_map();
|
|
|