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

Side by Side Diff: src/x64/codegen-x64.cc

Issue 5839002: Merge bleeding edge revision 6020 to 2.4 branch. (Closed)
Patch Set: Update patch-level. Untabify. Created 10 years 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/version.cc ('k') | test/mjsunit/regress/regress-swapelements.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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 6895 matching lines...) Expand 10 before | Expand all | Expand 10 after
6906 // Check the object's elements are in fast case and writable. 6906 // Check the object's elements are in fast case and writable.
6907 __ movq(tmp1.reg(), FieldOperand(object.reg(), JSObject::kElementsOffset)); 6907 __ movq(tmp1.reg(), FieldOperand(object.reg(), JSObject::kElementsOffset));
6908 __ CompareRoot(FieldOperand(tmp1.reg(), HeapObject::kMapOffset), 6908 __ CompareRoot(FieldOperand(tmp1.reg(), HeapObject::kMapOffset),
6909 Heap::kFixedArrayMapRootIndex); 6909 Heap::kFixedArrayMapRootIndex);
6910 deferred->Branch(not_equal); 6910 deferred->Branch(not_equal);
6911 6911
6912 // Check that both indices are smis. 6912 // Check that both indices are smis.
6913 Condition both_smi = masm()->CheckBothSmi(index1.reg(), index2.reg()); 6913 Condition both_smi = masm()->CheckBothSmi(index1.reg(), index2.reg());
6914 deferred->Branch(NegateCondition(both_smi)); 6914 deferred->Branch(NegateCondition(both_smi));
6915 6915
6916 // Check that both indices are valid.
6917 __ movq(tmp2.reg(), FieldOperand(object.reg(), JSArray::kLengthOffset));
6918 __ cmpl(tmp2.reg(), index1.reg());
6919 deferred->Branch(below_equal);
6920 __ cmpl(tmp2.reg(), index2.reg());
6921 deferred->Branch(below_equal);
6922
6916 // Bring addresses into index1 and index2. 6923 // Bring addresses into index1 and index2.
6917 __ SmiToInteger32(index1.reg(), index1.reg()); 6924 __ SmiToInteger32(index1.reg(), index1.reg());
6918 __ lea(index1.reg(), FieldOperand(tmp1.reg(), 6925 __ lea(index1.reg(), FieldOperand(tmp1.reg(),
6919 index1.reg(), 6926 index1.reg(),
6920 times_pointer_size, 6927 times_pointer_size,
6921 FixedArray::kHeaderSize)); 6928 FixedArray::kHeaderSize));
6922 __ SmiToInteger32(index2.reg(), index2.reg()); 6929 __ SmiToInteger32(index2.reg(), index2.reg());
6923 __ lea(index2.reg(), FieldOperand(tmp1.reg(), 6930 __ lea(index2.reg(), FieldOperand(tmp1.reg(),
6924 index2.reg(), 6931 index2.reg(),
6925 times_pointer_size, 6932 times_pointer_size,
(...skipping 1997 matching lines...) Expand 10 before | Expand all | Expand 10 after
8923 #undef __ 8930 #undef __
8924 8931
8925 void RecordWriteStub::Generate(MacroAssembler* masm) { 8932 void RecordWriteStub::Generate(MacroAssembler* masm) {
8926 masm->RecordWriteHelper(object_, addr_, scratch_); 8933 masm->RecordWriteHelper(object_, addr_, scratch_);
8927 masm->ret(0); 8934 masm->ret(0);
8928 } 8935 }
8929 8936
8930 } } // namespace v8::internal 8937 } } // namespace v8::internal
8931 8938
8932 #endif // V8_TARGET_ARCH_X64 8939 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/version.cc ('k') | test/mjsunit/regress/regress-swapelements.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698