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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
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 4369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4380 IsSimpleMapChangeTransition(from_kind, to_kind); | 4380 IsSimpleMapChangeTransition(from_kind, to_kind); |
4381 Label::Distance branch_distance = | 4381 Label::Distance branch_distance = |
4382 is_simple_map_transition ? Label::kNear : Label::kFar; | 4382 is_simple_map_transition ? Label::kNear : Label::kFar; |
4383 __ cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); | 4383 __ cmp(FieldOperand(object_reg, HeapObject::kMapOffset), from_map); |
4384 __ j(not_equal, ¬_applicable, branch_distance); | 4384 __ j(not_equal, ¬_applicable, branch_distance); |
4385 if (is_simple_map_transition) { | 4385 if (is_simple_map_transition) { |
4386 Register new_map_reg = ToRegister(instr->new_map_temp()); | 4386 Register new_map_reg = ToRegister(instr->new_map_temp()); |
4387 __ mov(FieldOperand(object_reg, HeapObject::kMapOffset), | 4387 __ mov(FieldOperand(object_reg, HeapObject::kMapOffset), |
4388 Immediate(to_map)); | 4388 Immediate(to_map)); |
4389 // Write barrier. | 4389 // Write barrier. |
4390 DCHECK_NE(instr->temp(), NULL); | 4390 DCHECK_NOT_NULL(instr->temp()); |
4391 __ RecordWriteForMap(object_reg, to_map, new_map_reg, | 4391 __ RecordWriteForMap(object_reg, to_map, new_map_reg, |
4392 ToRegister(instr->temp()), | 4392 ToRegister(instr->temp()), |
4393 kDontSaveFPRegs); | 4393 kDontSaveFPRegs); |
4394 } else { | 4394 } else { |
4395 DCHECK(ToRegister(instr->context()).is(esi)); | 4395 DCHECK(ToRegister(instr->context()).is(esi)); |
4396 DCHECK(object_reg.is(eax)); | 4396 DCHECK(object_reg.is(eax)); |
4397 PushSafepointRegistersScope scope(this); | 4397 PushSafepointRegistersScope scope(this); |
4398 __ mov(ebx, to_map); | 4398 __ mov(ebx, to_map); |
4399 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; | 4399 bool is_js_array = from_map->instance_type() == JS_ARRAY_TYPE; |
4400 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); | 4400 TransitionElementsKindStub stub(isolate(), from_kind, to_kind, is_js_array); |
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5772 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5772 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
5773 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5773 RecordSafepoint(Safepoint::kNoLazyDeopt); |
5774 } | 5774 } |
5775 | 5775 |
5776 | 5776 |
5777 #undef __ | 5777 #undef __ |
5778 | 5778 |
5779 } } // namespace v8::internal | 5779 } } // namespace v8::internal |
5780 | 5780 |
5781 #endif // V8_TARGET_ARCH_IA32 | 5781 #endif // V8_TARGET_ARCH_IA32 |
OLD | NEW |