Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(89)

Side by Side Diff: src/ia32/code-stubs-ia32.cc

Issue 2313093002: [stubs] Port StoreTransitionStub and ElementsTransitionAndStoreStub to TurboFan. (Closed)
Patch Set: Addressing comments Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #if V8_TARGET_ARCH_IA32 5 #if V8_TARGET_ARCH_IA32
6 6
7 #include "src/code-stubs.h" 7 #include "src/code-stubs.h"
8 #include "src/api-arguments.h" 8 #include "src/api-arguments.h"
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 3760 matching lines...) Expand 10 before | Expand all | Expand 10 after
3771 __ CompareRoot(cached_map, Heap::kUndefinedValueRootIndex); 3771 __ CompareRoot(cached_map, Heap::kUndefinedValueRootIndex);
3772 __ j(not_equal, &transition_call); 3772 __ j(not_equal, &transition_call);
3773 __ mov(feedback, FieldOperand(feedback, counter, times_half_pointer_size, 3773 __ mov(feedback, FieldOperand(feedback, counter, times_half_pointer_size,
3774 FixedArray::kHeaderSize + 2 * kPointerSize)); 3774 FixedArray::kHeaderSize + 2 * kPointerSize));
3775 __ pop(key); 3775 __ pop(key);
3776 __ pop(vector); 3776 __ pop(vector);
3777 __ pop(receiver); 3777 __ pop(receiver);
3778 __ lea(feedback, FieldOperand(feedback, Code::kHeaderSize)); 3778 __ lea(feedback, FieldOperand(feedback, Code::kHeaderSize));
3779 __ mov(Operand::StaticVariable(virtual_register), feedback); 3779 __ mov(Operand::StaticVariable(virtual_register), feedback);
3780 __ pop(value); 3780 __ pop(value);
3781
3782 // Call store handler using StoreWithVectorDescriptor calling convention.
3781 __ jmp(Operand::StaticVariable(virtual_register)); 3783 __ jmp(Operand::StaticVariable(virtual_register));
3782 3784
3783 __ bind(&transition_call); 3785 __ bind(&transition_call);
3784 // Current stack layout: 3786 // Current stack layout:
3785 // - esp[0] -- key 3787 // - esp[0] -- key
3786 // - esp[4] -- vector 3788 // - esp[4] -- vector
3787 // - esp[8] -- receiver 3789 // - esp[8] -- receiver
3788 // - esp[12] -- value 3790 // - esp[12] -- value
3789 // - esp[16] -- return address 3791 // - esp[16] -- return address
3790 // 3792 //
3791 // Required stack layout for handler call: 3793 // Required stack layout for handler call:
3792 // - esp[0] -- return address 3794 // - esp[0] -- return address
3793 // - receiver, key, value, map, vector in registers. 3795 // - receiver, key, value, map, vector in registers.
3794 // - handler and slot in virtual registers. 3796 // - handler and slot in virtual registers.
3795 __ mov(Operand::StaticVariable(virtual_slot), slot); 3797 __ mov(Operand::StaticVariable(virtual_slot), slot);
3796 __ mov(feedback, FieldOperand(feedback, counter, times_half_pointer_size, 3798 __ mov(feedback, FieldOperand(feedback, counter, times_half_pointer_size,
3797 FixedArray::kHeaderSize + 2 * kPointerSize)); 3799 FixedArray::kHeaderSize + 2 * kPointerSize));
3798 __ lea(feedback, FieldOperand(feedback, Code::kHeaderSize)); 3800 __ lea(feedback, FieldOperand(feedback, Code::kHeaderSize));
3799 __ mov(Operand::StaticVariable(virtual_register), feedback); 3801 __ mov(Operand::StaticVariable(virtual_register), feedback);
3800 3802
3801 __ mov(cached_map, FieldOperand(cached_map, WeakCell::kValueOffset)); 3803 __ mov(cached_map, FieldOperand(cached_map, WeakCell::kValueOffset));
3802 // The weak cell may have been cleared. 3804 // The weak cell may have been cleared.
3803 __ JumpIfSmi(cached_map, &pop_and_miss); 3805 __ JumpIfSmi(cached_map, &pop_and_miss);
3804 DCHECK(!cached_map.is(VectorStoreTransitionDescriptor::MapRegister())); 3806 DCHECK(!cached_map.is(StoreTransitionDescriptor::MapRegister()));
3805 __ mov(VectorStoreTransitionDescriptor::MapRegister(), cached_map); 3807 __ mov(StoreTransitionDescriptor::MapRegister(), cached_map);
3806 3808
3807 // Pop key into place. 3809 // Call store transition handler using StoreTransitionDescriptor calling
3810 // convention.
3808 __ pop(key); 3811 __ pop(key);
3809 __ pop(vector); 3812 __ pop(vector);
3810 __ pop(receiver); 3813 __ pop(receiver);
3811 __ pop(value); 3814 __ pop(value);
3815 {
3816 // Put vector and slot beneath return address.
3817 __ push(vector);
3818 __ push(Operand(esp, 1 * kPointerSize)); // push return address
3819 __ mov(Operand(esp, 2 * kPointerSize), slot);
3820 }
3812 __ jmp(Operand::StaticVariable(virtual_register)); 3821 __ jmp(Operand::StaticVariable(virtual_register));
3813 3822
3814 __ bind(&prepare_next); 3823 __ bind(&prepare_next);
3815 __ add(counter, Immediate(Smi::FromInt(3))); 3824 __ add(counter, Immediate(Smi::FromInt(3)));
3816 __ cmp(counter, FieldOperand(feedback, FixedArray::kLengthOffset)); 3825 __ cmp(counter, FieldOperand(feedback, FixedArray::kLengthOffset));
3817 __ j(less, &next_loop); 3826 __ j(less, &next_loop);
3818 3827
3819 // We exhausted our array of map handler pairs. 3828 // We exhausted our array of map handler pairs.
3820 __ bind(&pop_and_miss); 3829 __ bind(&pop_and_miss);
3821 __ pop(key); 3830 __ pop(key);
(...skipping 1626 matching lines...) Expand 10 before | Expand all | Expand 10 after
5448 kStackUnwindSpace, nullptr, return_value_operand, 5457 kStackUnwindSpace, nullptr, return_value_operand,
5449 NULL); 5458 NULL);
5450 } 5459 }
5451 5460
5452 #undef __ 5461 #undef __
5453 5462
5454 } // namespace internal 5463 } // namespace internal
5455 } // namespace v8 5464 } // namespace v8
5456 5465
5457 #endif // V8_TARGET_ARCH_IA32 5466 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/full-codegen/full-codegen.cc ('k') | src/ia32/interface-descriptors-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698