| 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 4835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4846 | 4846 |
| 4847 Label not_applicable; | 4847 Label not_applicable; |
| 4848 bool is_simple_map_transition = | 4848 bool is_simple_map_transition = |
| 4849 IsSimpleMapChangeTransition(from_kind, to_kind); | 4849 IsSimpleMapChangeTransition(from_kind, to_kind); |
| 4850 Label::Distance branch_distance = | 4850 Label::Distance branch_distance = |
| 4851 is_simple_map_transition ? Label::kNear : Label::kFar; | 4851 is_simple_map_transition ? Label::kNear : Label::kFar; |
| 4852 __ cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); | 4852 __ cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); |
| 4853 __ j(not_equal, ¬_applicable, branch_distance); | 4853 __ j(not_equal, ¬_applicable, branch_distance); |
| 4854 if (is_simple_map_transition) { | 4854 if (is_simple_map_transition) { |
| 4855 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4855 Register new_map_reg = ToRegister(instr->new_map_temp()); |
| 4856 Handle<Map> map = instr->hydrogen()->transitioned_map(); | |
| 4857 __ mov(FieldOperand(object_reg, HeapObject::kMapOffset), | 4856 __ mov(FieldOperand(object_reg, HeapObject::kMapOffset), |
| 4858 Immediate(map)); | 4857 Immediate(to_map)); |
| 4859 // Write barrier. | 4858 // Write barrier. |
| 4860 ASSERT_NE(instr->temp(), NULL); | 4859 ASSERT_NE(instr->temp(), NULL); |
| 4861 __ RecordWriteForMap(object_reg, to_map, new_map_reg, | 4860 __ RecordWriteForMap(object_reg, to_map, new_map_reg, |
| 4862 ToRegister(instr->temp()), | 4861 ToRegister(instr->temp()), |
| 4863 kDontSaveFPRegs); | 4862 kDontSaveFPRegs); |
| 4864 } else { | 4863 } else { |
| 4865 PushSafepointRegistersScope scope(this); | 4864 PushSafepointRegistersScope scope(this); |
| 4866 if (!object_reg.is(eax)) { | 4865 if (!object_reg.is(eax)) { |
| 4867 __ push(object_reg); | 4866 __ push(object_reg); |
| 4868 } | 4867 } |
| (...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6395 FixedArray::kHeaderSize - kPointerSize)); | 6394 FixedArray::kHeaderSize - kPointerSize)); |
| 6396 __ bind(&done); | 6395 __ bind(&done); |
| 6397 } | 6396 } |
| 6398 | 6397 |
| 6399 | 6398 |
| 6400 #undef __ | 6399 #undef __ |
| 6401 | 6400 |
| 6402 } } // namespace v8::internal | 6401 } } // namespace v8::internal |
| 6403 | 6402 |
| 6404 #endif // V8_TARGET_ARCH_IA32 | 6403 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |