| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 4718 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4729 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4729 Register new_map_reg = ToRegister(instr->new_map_temp()); |
| 4730 __ mov(FieldOperand(object_reg, HeapObject::kMapOffset), | 4730 __ mov(FieldOperand(object_reg, HeapObject::kMapOffset), |
| 4731 Immediate(to_map)); | 4731 Immediate(to_map)); |
| 4732 // Write barrier. | 4732 // Write barrier. |
| 4733 ASSERT_NE(instr->temp(), NULL); | 4733 ASSERT_NE(instr->temp(), NULL); |
| 4734 __ RecordWriteForMap(object_reg, to_map, new_map_reg, | 4734 __ RecordWriteForMap(object_reg, to_map, new_map_reg, |
| 4735 ToRegister(instr->temp()), | 4735 ToRegister(instr->temp()), |
| 4736 kDontSaveFPRegs); | 4736 kDontSaveFPRegs); |
| 4737 } else { | 4737 } else { |
| 4738 ASSERT(ToRegister(instr->context()).is(esi)); | 4738 ASSERT(ToRegister(instr->context()).is(esi)); |
| 4739 ASSERT(object_reg.is(eax)); |
| 4739 PushSafepointRegistersScope scope(this); | 4740 PushSafepointRegistersScope scope(this); |
| 4740 if (!object_reg.is(eax)) { | |
| 4741 __ mov(eax, object_reg); | |
| 4742 } | |
| 4743 __ mov(ebx, to_map); | 4741 __ mov(ebx, to_map); |
| 4744 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; | 4742 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; |
| 4745 TransitionElementsKindStub stub(from_kind, to_kind, is_js_array); | 4743 TransitionElementsKindStub stub(from_kind, to_kind, is_js_array); |
| 4746 __ CallStub(&stub); | 4744 __ CallStub(&stub); |
| 4747 RecordSafepointWithRegisters( | 4745 RecordSafepointWithLazyDeopt(instr, |
| 4748 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4746 RECORD_SAFEPOINT_WITH_REGISTERS_AND_NO_ARGUMENTS); |
| 4749 } | 4747 } |
| 4750 __ bind(¬_applicable); | 4748 __ bind(¬_applicable); |
| 4751 } | 4749 } |
| 4752 | 4750 |
| 4753 | 4751 |
| 4754 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { | 4752 void LCodeGen::DoStringCharCodeAt(LStringCharCodeAt* instr) { |
| 4755 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { | 4753 class DeferredStringCharCodeAt V8_FINAL : public LDeferredCode { |
| 4756 public: | 4754 public: |
| 4757 DeferredStringCharCodeAt(LCodeGen* codegen, | 4755 DeferredStringCharCodeAt(LCodeGen* codegen, |
| 4758 LStringCharCodeAt* instr, | 4756 LStringCharCodeAt* instr, |
| (...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6348 FixedArray::kHeaderSize - kPointerSize)); | 6346 FixedArray::kHeaderSize - kPointerSize)); |
| 6349 __ bind(&done); | 6347 __ bind(&done); |
| 6350 } | 6348 } |
| 6351 | 6349 |
| 6352 | 6350 |
| 6353 #undef __ | 6351 #undef __ |
| 6354 | 6352 |
| 6355 } } // namespace v8::internal | 6353 } } // namespace v8::internal |
| 6356 | 6354 |
| 6357 #endif // V8_TARGET_ARCH_IA32 | 6355 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |