OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved.7 | 1 // Copyright 2012 the V8 project authors. All rights reserved.7 |
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 4383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4394 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); | 4394 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); |
4395 | 4395 |
4396 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { | 4396 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
4397 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4397 Register new_map_reg = ToRegister(instr->new_map_temp()); |
4398 __ li(new_map_reg, Operand(to_map)); | 4398 __ li(new_map_reg, Operand(to_map)); |
4399 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 4399 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
4400 // Write barrier. | 4400 // Write barrier. |
4401 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, | 4401 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, |
4402 scratch, GetRAState(), kDontSaveFPRegs); | 4402 scratch, GetRAState(), kDontSaveFPRegs); |
4403 } else { | 4403 } else { |
| 4404 ASSERT(object_reg.is(a0)); |
4404 ASSERT(ToRegister(instr->context()).is(cp)); | 4405 ASSERT(ToRegister(instr->context()).is(cp)); |
4405 PushSafepointRegistersScope scope( | 4406 PushSafepointRegistersScope scope( |
4406 this, Safepoint::kWithRegistersAndDoubles); | 4407 this, Safepoint::kWithRegistersAndDoubles); |
4407 __ mov(a0, object_reg); | |
4408 __ li(a1, Operand(to_map)); | 4408 __ li(a1, Operand(to_map)); |
4409 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; | 4409 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; |
4410 TransitionElementsKindStub stub(from_kind, to_kind, is_js_array); | 4410 TransitionElementsKindStub stub(from_kind, to_kind, is_js_array); |
4411 __ CallStub(&stub); | 4411 __ CallStub(&stub); |
4412 RecordSafepointWithRegistersAndDoubles( | 4412 RecordSafepointWithRegistersAndDoubles( |
4413 instr->pointer_map(), 0, Safepoint::kNoLazyDeopt); | 4413 instr->pointer_map(), 0, Safepoint::kLazyDeopt); |
4414 } | 4414 } |
4415 __ bind(¬_applicable); | 4415 __ bind(¬_applicable); |
4416 } | 4416 } |
4417 | 4417 |
4418 | 4418 |
4419 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { | 4419 void LCodeGen::DoTrapAllocationMemento(LTrapAllocationMemento* instr) { |
4420 Register object = ToRegister(instr->object()); | 4420 Register object = ToRegister(instr->object()); |
4421 Register temp = ToRegister(instr->temp()); | 4421 Register temp = ToRegister(instr->temp()); |
4422 Label no_memento_found; | 4422 Label no_memento_found; |
4423 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found, | 4423 __ TestJSArrayForAllocationMemento(object, temp, &no_memento_found, |
(...skipping 1390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5814 __ Subu(scratch, result, scratch); | 5814 __ Subu(scratch, result, scratch); |
5815 __ lw(result, FieldMemOperand(scratch, | 5815 __ lw(result, FieldMemOperand(scratch, |
5816 FixedArray::kHeaderSize - kPointerSize)); | 5816 FixedArray::kHeaderSize - kPointerSize)); |
5817 __ bind(&done); | 5817 __ bind(&done); |
5818 } | 5818 } |
5819 | 5819 |
5820 | 5820 |
5821 #undef __ | 5821 #undef __ |
5822 | 5822 |
5823 } } // namespace v8::internal | 5823 } } // namespace v8::internal |
OLD | NEW |