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 4363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4374 | 4374 |
4375 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { | 4375 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
4376 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4376 Register new_map_reg = ToRegister(instr->new_map_temp()); |
4377 __ mov(new_map_reg, Operand(to_map)); | 4377 __ mov(new_map_reg, Operand(to_map)); |
4378 __ str(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 4378 __ str(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
4379 // Write barrier. | 4379 // Write barrier. |
4380 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, | 4380 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, |
4381 scratch, GetLinkRegisterState(), kDontSaveFPRegs); | 4381 scratch, GetLinkRegisterState(), kDontSaveFPRegs); |
4382 } else { | 4382 } else { |
4383 ASSERT(ToRegister(instr->context()).is(cp)); | 4383 ASSERT(ToRegister(instr->context()).is(cp)); |
| 4384 ASSERT(object_reg.is(r0)); |
4384 PushSafepointRegistersScope scope( | 4385 PushSafepointRegistersScope scope( |
4385 this, Safepoint::kWithRegistersAndDoubles); | 4386 this, Safepoint::kWithRegistersAndDoubles); |
4386 __ Move(r0, object_reg); | |
4387 __ Move(r1, to_map); | 4387 __ Move(r1, to_map); |
4388 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; | 4388 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; |
4389 TransitionElementsKindStub stub(from_kind, to_kind, is_js_array); | 4389 TransitionElementsKindStub stub(from_kind, to_kind, is_js_array); |
4390 __ CallStub(&stub); | 4390 __ CallStub(&stub); |
4391 RecordSafepointWithRegistersAndDoubles( | 4391 RecordSafepointWithRegistersAndDoubles( |
4392 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4392 instr->pointer_map(), 0, Safepoint::kLazyDeopt); |
4393 } | 4393 } |
4394 __ bind(¬_applicable); | 4394 __ bind(¬_applicable); |
4395 } | 4395 } |
4396 | 4396 |
4397 | 4397 |
4398 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { | 4398 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { |
4399 Register object = ToRegister(instr->object()); | 4399 Register object = ToRegister(instr->object()); |
4400 Register temp = ToRegister(instr->temp()); | 4400 Register temp = ToRegister(instr->temp()); |
4401 Label no_memento_found; | 4401 Label no_memento_found; |
4402 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); | 4402 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found); |
(...skipping 1335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5738 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); | 5738 __ sub(scratch, result, Operand::PointerOffsetFromSmiKey(index)); |
5739 __ ldr(result, FieldMemOperand(scratch, | 5739 __ ldr(result, FieldMemOperand(scratch, |
5740 FixedArray::kHeaderSize - kPointerSize)); | 5740 FixedArray::kHeaderSize - kPointerSize)); |
5741 __ bind(&done); | 5741 __ bind(&done); |
5742 } | 5742 } |
5743 | 5743 |
5744 | 5744 |
5745 #undef __ | 5745 #undef __ |
5746 | 5746 |
5747 } } // namespace v8::internal | 5747 } } // namespace v8::internal |
OLD | NEW |