| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 4797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4808 IsSimpleMapChangeTransition(from_kind, to_kind); | 4808 IsSimpleMapChangeTransition(from_kind, to_kind); |
| 4809 Label::Distance branch_distance = | 4809 Label::Distance branch_distance = |
| 4810 is_simple_map_transition ? Label::kNear : Label::kFar; | 4810 is_simple_map_transition ? Label::kNear : Label::kFar; |
| 4811 __ cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); | 4811 __ cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); |
| 4812 __ j(not_equal, ¬_applicable, branch_distance); | 4812 __ j(not_equal, ¬_applicable, branch_distance); |
| 4813 if (is_simple_map_transition) { | 4813 if (is_simple_map_transition) { |
| 4814 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4814 Register new_map_reg = ToRegister(instr->new_map_temp()); |
| 4815 __ mov(FieldOperand(object_reg, HeapObject::kMapOffset), | 4815 __ mov(FieldOperand(object_reg, HeapObject::kMapOffset), |
| 4816 Immediate(to_map)); | 4816 Immediate(to_map)); |
| 4817 // Write barrier. | 4817 // Write barrier. |
| 4818 DCHECK_NE(instr->temp(), NULL); | 4818 DCHECK_NOT_NULL(instr->temp()); |
| 4819 __ RecordWriteForMap(object_reg, to_map, new_map_reg, | 4819 __ RecordWriteForMap(object_reg, to_map, new_map_reg, |
| 4820 ToRegister(instr->temp()), kDontSaveFPRegs); | 4820 ToRegister(instr->temp()), kDontSaveFPRegs); |
| 4821 } else { | 4821 } else { |
| 4822 DCHECK(ToRegister(instr->context()).is(esi)); | 4822 DCHECK(ToRegister(instr->context()).is(esi)); |
| 4823 DCHECK(object_reg.is(eax)); | 4823 DCHECK(object_reg.is(eax)); |
| 4824 PushSafepointRegistersScope scope(this); | 4824 PushSafepointRegistersScope scope(this); |
| 4825 __ mov(ebx, to_map); | 4825 __ mov(ebx, to_map); |
| 4826 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; | 4826 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; |
| 4827 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); | 4827 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); |
| 4828 __ CallStub(&stub); | 4828 __ CallStub(&stub); |
| (...skipping 1529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6358 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 6358 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 6359 RecordSafepoint(Safepoint::kNoLazyDeopt); | 6359 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 6360 } | 6360 } |
| 6361 | 6361 |
| 6362 | 6362 |
| 6363 #undef __ | 6363 #undef __ |
| 6364 | 6364 |
| 6365 } } // namespace v8::internal | 6365 } } // namespace v8::internal |
| 6366 | 6366 |
| 6367 #endif // V8_TARGET_ARCH_X87 | 6367 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |