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 4114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4125 CallCode(ic, RelocInfo::CODE_TARGET, instr); | 4125 CallCode(ic, RelocInfo::CODE_TARGET, instr); |
4126 } | 4126 } |
4127 | 4127 |
4128 | 4128 |
4129 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { | 4129 void LCodeGen::DoTransitionElementsKind(LTransitionElementsKind* instr) { |
4130 Register object_reg = ToRegister(instr->object()); | 4130 Register object_reg = ToRegister(instr->object()); |
4131 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4131 Register new_map_reg = ToRegister(instr->new_map_temp()); |
4132 | 4132 |
4133 Handle<Map> from_map = instr->original_map(); | 4133 Handle<Map> from_map = instr->original_map(); |
4134 Handle<Map> to_map = instr->transitioned_map(); | 4134 Handle<Map> to_map = instr->transitioned_map(); |
4135 ElementsKind from_kind = from_map->elements_kind(); | 4135 ElementsKind from_kind = instr->from_kind(); |
4136 ElementsKind to_kind = to_map->elements_kind(); | 4136 ElementsKind to_kind = instr->to_kind(); |
4137 | 4137 |
4138 Label not_applicable; | 4138 Label not_applicable; |
4139 __ Cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); | 4139 __ Cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); |
4140 __ j(not_equal, ¬_applicable); | 4140 __ j(not_equal, ¬_applicable); |
4141 __ movq(new_map_reg, to_map, RelocInfo::EMBEDDED_OBJECT); | 4141 __ movq(new_map_reg, to_map, RelocInfo::EMBEDDED_OBJECT); |
4142 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { | 4142 if (IsSimpleMapChangeTransition(from_kind, to_kind)) { |
4143 __ movq(FieldOperand(object_reg, HeapObject::kMapOffset), new_map_reg); | 4143 __ movq(FieldOperand(object_reg, HeapObject::kMapOffset), new_map_reg); |
4144 // Write barrier. | 4144 // Write barrier. |
4145 ASSERT_NE(instr->temp(), NULL); | 4145 ASSERT_NE(instr->temp(), NULL); |
4146 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, | 4146 __ RecordWriteField(object_reg, HeapObject::kMapOffset, new_map_reg, |
(...skipping 1420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5567 FixedArray::kHeaderSize - kPointerSize)); | 5567 FixedArray::kHeaderSize - kPointerSize)); |
5568 __ bind(&done); | 5568 __ bind(&done); |
5569 } | 5569 } |
5570 | 5570 |
5571 | 5571 |
5572 #undef __ | 5572 #undef __ |
5573 | 5573 |
5574 } } // namespace v8::internal | 5574 } } // namespace v8::internal |
5575 | 5575 |
5576 #endif // V8_TARGET_ARCH_X64 | 5576 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |