| 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 3920 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3931 ElementsKind from_kind = from_map->elements_kind(); | 3931 ElementsKind from_kind = from_map->elements_kind(); |
| 3932 ElementsKind to_kind = to_map->elements_kind(); | 3932 ElementsKind to_kind = to_map->elements_kind(); |
| 3933 | 3933 |
| 3934 __ mov(ToRegister(instr->result()), object_reg); | 3934 __ mov(ToRegister(instr->result()), object_reg); |
| 3935 | 3935 |
| 3936 Label not_applicable; | 3936 Label not_applicable; |
| 3937 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 3937 __ lw(scratch, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| 3938 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); | 3938 __ Branch(¬_applicable, ne, scratch, Operand(from_map)); |
| 3939 | 3939 |
| 3940 __ li(new_map_reg, Operand(to_map)); | 3940 __ li(new_map_reg, Operand(to_map)); |
| 3941 if (IsFastSmiElementsKind(from_kind) && IsFastObjectElementsKind(to_kind)) { | 3941 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
| 3942 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); | 3942 __ sw(new_map_reg, FieldMemOperand(object_reg, HeapObject::kMapOffset)); |
| 3943 // Write barrier. | 3943 // Write barrier. |
| 3944 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, | 3944 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, |
| 3945 scratch, kRAHasBeenSaved, kDontSaveFPRegs); | 3945 scratch, kRAHasBeenSaved, kDontSaveFPRegs); |
| 3946 } else if (IsFastSmiElementsKind(from_kind) && | 3946 } else if (IsFastSmiElementsKind(from_kind) && |
| 3947 IsFastDoubleElementsKind(to_kind)) { | 3947 IsFastDoubleElementsKind(to_kind)) { |
| 3948 Register fixed_object_reg = ToRegister(instr->temp()); | 3948 Register fixed_object_reg = ToRegister(instr->temp()); |
| 3949 ASSERT(fixed_object_reg.is(a2)); | 3949 ASSERT(fixed_object_reg.is(a2)); |
| 3950 ASSERT(new_map_reg.is(a3)); | 3950 ASSERT(new_map_reg.is(a3)); |
| 3951 __ mov(fixed_object_reg, object_reg); | 3951 __ mov(fixed_object_reg, object_reg); |
| (...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5439 __ Subu(scratch, result, scratch); | 5439 __ Subu(scratch, result, scratch); |
| 5440 __ lw(result, FieldMemOperand(scratch, | 5440 __ lw(result, FieldMemOperand(scratch, |
| 5441 FixedArray::kHeaderSize - kPointerSize)); | 5441 FixedArray::kHeaderSize - kPointerSize)); |
| 5442 __ bind(&done); | 5442 __ bind(&done); |
| 5443 } | 5443 } |
| 5444 | 5444 |
| 5445 | 5445 |
| 5446 #undef __ | 5446 #undef __ |
| 5447 | 5447 |
| 5448 } } // namespace v8::internal | 5448 } } // namespace v8::internal |
| OLD | NEW |