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

Side by Side Diff: src/x64/stub-cache-x64.cc

Issue 10310006: Merged r11479, r11483 into 3.9 branch. (Closed) Base URL: https://v8.googlecode.com/svn/branches/3.9
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-125515.js » ('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 // 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 3749 matching lines...) Expand 10 before | Expand all | Expand 10 after
3760 __ Move(FieldOperand(rdi, FixedDoubleArray::kLengthOffset), 3760 __ Move(FieldOperand(rdi, FixedDoubleArray::kLengthOffset),
3761 Smi::FromInt(JSArray::kPreallocatedArrayElements)); 3761 Smi::FromInt(JSArray::kPreallocatedArrayElements));
3762 3762
3763 // Install the new backing store in the JSArray. 3763 // Install the new backing store in the JSArray.
3764 __ movq(FieldOperand(rdx, JSObject::kElementsOffset), rdi); 3764 __ movq(FieldOperand(rdx, JSObject::kElementsOffset), rdi);
3765 __ RecordWriteField(rdx, JSObject::kElementsOffset, rdi, rbx, 3765 __ RecordWriteField(rdx, JSObject::kElementsOffset, rdi, rbx,
3766 kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK); 3766 kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
3767 3767
3768 // Increment the length of the array. 3768 // Increment the length of the array.
3769 __ Move(FieldOperand(rdx, JSArray::kLengthOffset), Smi::FromInt(1)); 3769 __ Move(FieldOperand(rdx, JSArray::kLengthOffset), Smi::FromInt(1));
3770 __ movq(rdi, FieldOperand(rdx, JSObject::kElementsOffset));
3770 __ jmp(&finish_store); 3771 __ jmp(&finish_store);
3771 3772
3772 __ bind(&check_capacity); 3773 __ bind(&check_capacity);
3773 // rax: value 3774 // rax: value
3774 // rcx: key 3775 // rcx: key
3775 // rdx: receiver 3776 // rdx: receiver
3776 // rdi: elements 3777 // rdi: elements
3777 // Make sure that the backing store can hold additional elements. 3778 // Make sure that the backing store can hold additional elements.
3778 __ cmpq(rcx, FieldOperand(rdi, FixedDoubleArray::kLengthOffset)); 3779 __ cmpq(rcx, FieldOperand(rdi, FixedDoubleArray::kLengthOffset));
3779 __ j(above_equal, &slow); 3780 __ j(above_equal, &slow);
3780 3781
3781 // Grow the array and finish the store. 3782 // Grow the array and finish the store.
3782 __ SmiAddConstant(FieldOperand(rdx, JSArray::kLengthOffset), 3783 __ SmiAddConstant(FieldOperand(rdx, JSArray::kLengthOffset),
3783 Smi::FromInt(1)); 3784 Smi::FromInt(1));
3784 __ jmp(&finish_store); 3785 __ jmp(&finish_store);
3785 3786
3786 __ bind(&slow); 3787 __ bind(&slow);
3787 Handle<Code> ic_slow = masm->isolate()->builtins()->KeyedStoreIC_Slow(); 3788 Handle<Code> ic_slow = masm->isolate()->builtins()->KeyedStoreIC_Slow();
3788 __ jmp(ic_slow, RelocInfo::CODE_TARGET); 3789 __ jmp(ic_slow, RelocInfo::CODE_TARGET);
3789 } 3790 }
3790 } 3791 }
3791 3792
3792 3793
3793 #undef __ 3794 #undef __
3794 3795
3795 } } // namespace v8::internal 3796 } } // namespace v8::internal
3796 3797
3797 #endif // V8_TARGET_ARCH_X64 3798 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-125515.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698