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

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

Issue 6580038: [Isolates] Merge from bleeding_edge, revisions 5934-6100. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/isolates/
Patch Set: '' Created 9 years, 10 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/x64/builtins-x64.cc ('k') | src/x64/full-codegen-x64.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 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 6765 matching lines...) Expand 10 before | Expand all | Expand 10 after
6776 // Check the object's elements are in fast case and writable. 6776 // Check the object's elements are in fast case and writable.
6777 __ movq(tmp1.reg(), FieldOperand(object.reg(), JSObject::kElementsOffset)); 6777 __ movq(tmp1.reg(), FieldOperand(object.reg(), JSObject::kElementsOffset));
6778 __ CompareRoot(FieldOperand(tmp1.reg(), HeapObject::kMapOffset), 6778 __ CompareRoot(FieldOperand(tmp1.reg(), HeapObject::kMapOffset),
6779 Heap::kFixedArrayMapRootIndex); 6779 Heap::kFixedArrayMapRootIndex);
6780 deferred->Branch(not_equal); 6780 deferred->Branch(not_equal);
6781 6781
6782 // Check that both indices are smis. 6782 // Check that both indices are smis.
6783 Condition both_smi = masm()->CheckBothSmi(index1.reg(), index2.reg()); 6783 Condition both_smi = masm()->CheckBothSmi(index1.reg(), index2.reg());
6784 deferred->Branch(NegateCondition(both_smi)); 6784 deferred->Branch(NegateCondition(both_smi));
6785 6785
6786 // Check that both indices are valid.
6787 __ movq(tmp2.reg(), FieldOperand(object.reg(), JSArray::kLengthOffset));
6788 __ SmiCompare(tmp2.reg(), index1.reg());
6789 deferred->Branch(below_equal);
6790 __ SmiCompare(tmp2.reg(), index2.reg());
6791 deferred->Branch(below_equal);
6792
6786 // Bring addresses into index1 and index2. 6793 // Bring addresses into index1 and index2.
6787 __ SmiToInteger32(index1.reg(), index1.reg()); 6794 __ SmiToInteger32(index1.reg(), index1.reg());
6788 __ lea(index1.reg(), FieldOperand(tmp1.reg(), 6795 __ lea(index1.reg(), FieldOperand(tmp1.reg(),
6789 index1.reg(), 6796 index1.reg(),
6790 times_pointer_size, 6797 times_pointer_size,
6791 FixedArray::kHeaderSize)); 6798 FixedArray::kHeaderSize));
6792 __ SmiToInteger32(index2.reg(), index2.reg()); 6799 __ SmiToInteger32(index2.reg(), index2.reg());
6793 __ lea(index2.reg(), FieldOperand(tmp1.reg(), 6800 __ lea(index2.reg(), FieldOperand(tmp1.reg(),
6794 index2.reg(), 6801 index2.reg(),
6795 times_pointer_size, 6802 times_pointer_size,
(...skipping 1065 matching lines...) Expand 10 before | Expand all | Expand 10 after
7861 case Token::IN: { 7868 case Token::IN: {
7862 Load(left); 7869 Load(left);
7863 Load(right); 7870 Load(right);
7864 Result answer = frame_->InvokeBuiltin(Builtins::IN, CALL_FUNCTION, 2); 7871 Result answer = frame_->InvokeBuiltin(Builtins::IN, CALL_FUNCTION, 2);
7865 frame_->Push(&answer); // push the result 7872 frame_->Push(&answer); // push the result
7866 return; 7873 return;
7867 } 7874 }
7868 case Token::INSTANCEOF: { 7875 case Token::INSTANCEOF: {
7869 Load(left); 7876 Load(left);
7870 Load(right); 7877 Load(right);
7871 InstanceofStub stub; 7878 InstanceofStub stub(InstanceofStub::kNoFlags);
7872 Result answer = frame_->CallStub(&stub, 2); 7879 Result answer = frame_->CallStub(&stub, 2);
7873 answer.ToRegister(); 7880 answer.ToRegister();
7874 __ testq(answer.reg(), answer.reg()); 7881 __ testq(answer.reg(), answer.reg());
7875 answer.Unuse(); 7882 answer.Unuse();
7876 destination()->Split(zero); 7883 destination()->Split(zero);
7877 return; 7884 return;
7878 } 7885 }
7879 default: 7886 default:
7880 UNREACHABLE(); 7887 UNREACHABLE();
7881 } 7888 }
(...skipping 928 matching lines...) Expand 10 before | Expand all | Expand 10 after
8810 #undef __ 8817 #undef __
8811 8818
8812 void RecordWriteStub::Generate(MacroAssembler* masm) { 8819 void RecordWriteStub::Generate(MacroAssembler* masm) {
8813 masm->RecordWriteHelper(object_, addr_, scratch_); 8820 masm->RecordWriteHelper(object_, addr_, scratch_);
8814 masm->ret(0); 8821 masm->ret(0);
8815 } 8822 }
8816 8823
8817 } } // namespace v8::internal 8824 } } // namespace v8::internal
8818 8825
8819 #endif // V8_TARGET_ARCH_X64 8826 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/builtins-x64.cc ('k') | src/x64/full-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698