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

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

Issue 7015043: Fix the GC branch so it compiles and runs on 64 bit. (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: '' Created 9 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/x64/code-stubs-x64.cc ('k') | src/x64/lithium-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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 // Check if we have the correct context pointer. 686 // Check if we have the correct context pointer.
687 __ movq(rbx, ContextOperand(rsi, Context::FCONTEXT_INDEX)); 687 __ movq(rbx, ContextOperand(rsi, Context::FCONTEXT_INDEX));
688 __ cmpq(rbx, rsi); 688 __ cmpq(rbx, rsi);
689 __ Check(equal, "Unexpected declaration in current context."); 689 __ Check(equal, "Unexpected declaration in current context.");
690 } 690 }
691 if (mode == Variable::CONST) { 691 if (mode == Variable::CONST) {
692 __ LoadRoot(kScratchRegister, Heap::kTheHoleValueRootIndex); 692 __ LoadRoot(kScratchRegister, Heap::kTheHoleValueRootIndex);
693 __ movq(ContextOperand(rsi, slot->index()), kScratchRegister); 693 __ movq(ContextOperand(rsi, slot->index()), kScratchRegister);
694 // No write barrier since the hole value is in old space. 694 // No write barrier since the hole value is in old space.
695 } else if (function != NULL) { 695 } else if (function != NULL) {
696 // We know that we have written a function, which is not a smi.
696 VisitForAccumulatorValue(function); 697 VisitForAccumulatorValue(function);
697 __ movq(ContextOperand(rsi, slot->index()), result_register()); 698 __ movq(ContextOperand(rsi, slot->index()), result_register());
698 int offset = Context::SlotOffset(slot->index()); 699 int offset = Context::SlotOffset(slot->index());
699 __ movq(rbx, rsi); 700 __ movq(rbx, rsi);
700 __ RecordWrite(rbx, offset, result_register(), rcx, kDontSaveFPRegs); 701 __ RecordWrite(rbx,
702 offset,
703 result_register(),
704 rcx,
705 kDontSaveFPRegs,
706 EMIT_REMEMBERED_SET,
707 OMIT_SMI_CHECK);
701 } 708 }
702 break; 709 break;
703 710
704 case Slot::LOOKUP: { 711 case Slot::LOOKUP: {
705 __ push(rsi); 712 __ push(rsi);
706 __ Push(variable->name()); 713 __ Push(variable->name());
707 // Declaration nodes are always introduced in one of two modes. 714 // Declaration nodes are always introduced in one of two modes.
708 ASSERT(mode == Variable::VAR || mode == Variable::CONST); 715 ASSERT(mode == Variable::VAR || mode == Variable::CONST);
709 PropertyAttributes attr = (mode == Variable::VAR) ? NONE : READ_ONLY; 716 PropertyAttributes attr = (mode == Variable::VAR) ? NONE : READ_ONLY;
710 __ Push(Smi::FromInt(attr)); 717 __ Push(Smi::FromInt(attr));
(...skipping 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1839 __ movq(Operand(rbp, SlotOffset(slot)), rax); 1846 __ movq(Operand(rbp, SlotOffset(slot)), rax);
1840 break; 1847 break;
1841 case Slot::CONTEXT: { 1848 case Slot::CONTEXT: {
1842 __ movq(rcx, ContextOperand(rsi, Context::FCONTEXT_INDEX)); 1849 __ movq(rcx, ContextOperand(rsi, Context::FCONTEXT_INDEX));
1843 __ movq(rdx, ContextOperand(rcx, slot->index())); 1850 __ movq(rdx, ContextOperand(rcx, slot->index()));
1844 __ CompareRoot(rdx, Heap::kTheHoleValueRootIndex); 1851 __ CompareRoot(rdx, Heap::kTheHoleValueRootIndex);
1845 __ j(not_equal, &skip); 1852 __ j(not_equal, &skip);
1846 __ movq(ContextOperand(rcx, slot->index()), rax); 1853 __ movq(ContextOperand(rcx, slot->index()), rax);
1847 int offset = Context::SlotOffset(slot->index()); 1854 int offset = Context::SlotOffset(slot->index());
1848 __ movq(rdx, rax); // Preserve the stored value in eax. 1855 __ movq(rdx, rax); // Preserve the stored value in eax.
1849 __ RecordWrite(rcx, offset, rdx, rbx); 1856 __ RecordWrite(rcx, offset, rdx, rbx, kDontSaveFPRegs);
1850 break; 1857 break;
1851 } 1858 }
1852 case Slot::LOOKUP: 1859 case Slot::LOOKUP:
1853 __ push(rax); 1860 __ push(rax);
1854 __ push(rsi); 1861 __ push(rsi);
1855 __ Push(var->name()); 1862 __ Push(var->name());
1856 __ CallRuntime(Runtime::kInitializeConstContextSlot, 3); 1863 __ CallRuntime(Runtime::kInitializeConstContextSlot, 3);
1857 break; 1864 break;
1858 } 1865 }
1859 __ bind(&skip); 1866 __ bind(&skip);
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
3132 // Swap elements. Use object and temp as scratch registers. 3139 // Swap elements. Use object and temp as scratch registers.
3133 __ movq(object, Operand(index_1, 0)); 3140 __ movq(object, Operand(index_1, 0));
3134 __ movq(temp, Operand(index_2, 0)); 3141 __ movq(temp, Operand(index_2, 0));
3135 __ movq(Operand(index_2, 0), object); 3142 __ movq(Operand(index_2, 0), object);
3136 __ movq(Operand(index_1, 0), temp); 3143 __ movq(Operand(index_1, 0), temp);
3137 3144
3138 Label new_space; 3145 Label new_space;
3139 __ InNewSpace(elements, temp, equal, &new_space); 3146 __ InNewSpace(elements, temp, equal, &new_space);
3140 3147
3141 __ movq(object, elements); 3148 __ movq(object, elements);
3142 __ RecordWriteHelper(object, index_1, temp); 3149 __ RecordWriteHelper(object, index_1, temp, kDontSaveFPRegs);
3143 __ RecordWriteHelper(elements, index_2, temp); 3150 __ RecordWriteHelper(elements, index_2, temp, kDontSaveFPRegs);
3144 3151
3145 __ bind(&new_space); 3152 __ bind(&new_space);
3146 // We are done. Drop elements from the stack, and return undefined. 3153 // We are done. Drop elements from the stack, and return undefined.
3147 __ addq(rsp, Immediate(3 * kPointerSize)); 3154 __ addq(rsp, Immediate(3 * kPointerSize));
3148 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex); 3155 __ LoadRoot(rax, Heap::kUndefinedValueRootIndex);
3149 __ jmp(&done); 3156 __ jmp(&done);
3150 3157
3151 __ bind(&slow_case); 3158 __ bind(&slow_case);
3152 __ CallRuntime(Runtime::kSwapElements, 3); 3159 __ CallRuntime(Runtime::kSwapElements, 3);
3153 3160
(...skipping 1150 matching lines...) Expand 10 before | Expand all | Expand 10 after
4304 __ ret(0); 4311 __ ret(0);
4305 } 4312 }
4306 4313
4307 4314
4308 #undef __ 4315 #undef __
4309 4316
4310 4317
4311 } } // namespace v8::internal 4318 } } // namespace v8::internal
4312 4319
4313 #endif // V8_TARGET_ARCH_X64 4320 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/x64/code-stubs-x64.cc ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698