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

Side by Side Diff: runtime/vm/stub_code_x64.cc

Issue 14925005: Remove stack_frame_<arch>.cc files. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/stub_code_mips.cc ('k') | runtime/vm/vm_sources.gypi » ('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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" 5 #include "vm/globals.h"
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
11 #include "vm/flow_graph_compiler.h" 11 #include "vm/flow_graph_compiler.h"
12 #include "vm/heap.h" 12 #include "vm/heap.h"
13 #include "vm/instructions.h" 13 #include "vm/instructions.h"
14 #include "vm/object_store.h" 14 #include "vm/object_store.h"
15 #include "vm/resolver.h" 15 #include "vm/resolver.h"
16 #include "vm/scavenger.h" 16 #include "vm/scavenger.h"
17 #include "vm/stack_frame.h"
17 #include "vm/stub_code.h" 18 #include "vm/stub_code.h"
18 19
19 20
20 #define __ assembler-> 21 #define __ assembler->
21 22
22 namespace dart { 23 namespace dart {
23 24
24 DEFINE_FLAG(bool, inline_alloc, true, "Inline allocation of objects."); 25 DEFINE_FLAG(bool, inline_alloc, true, "Inline allocation of objects.");
25 DEFINE_FLAG(bool, use_slow_path, false, 26 DEFINE_FLAG(bool, use_slow_path, false,
26 "Set to true for debugging & verifying the slow paths."); 27 "Set to true for debugging & verifying the slow paths.");
(...skipping 695 matching lines...) Expand 10 before | Expand all | Expand 10 after
722 // compiled or runtime stub code. 723 // compiled or runtime stub code.
723 724
724 // Cache the new Context pointer into CTX while executing Dart code. 725 // Cache the new Context pointer into CTX while executing Dart code.
725 __ movq(CTX, Address(RCX, VMHandles::kOffsetOfRawPtrInHandle)); 726 __ movq(CTX, Address(RCX, VMHandles::kOffsetOfRawPtrInHandle));
726 727
727 // Load Isolate pointer from Context structure into R8. 728 // Load Isolate pointer from Context structure into R8.
728 __ movq(R8, FieldAddress(CTX, Context::isolate_offset())); 729 __ movq(R8, FieldAddress(CTX, Context::isolate_offset()));
729 730
730 // Save the top exit frame info. Use RAX as a temporary register. 731 // Save the top exit frame info. Use RAX as a temporary register.
731 // StackFrameIterator reads the top exit frame info saved in this frame. 732 // StackFrameIterator reads the top exit frame info saved in this frame.
732 // The constant kExitLinkOffsetInEntryFrame must be kept in sync with the 733 // The constant kExitLinkSlotFromEntryFp must be kept in sync with the
733 // code below: kExitLinkOffsetInEntryFrame = -8 * kWordSize. 734 // code below.
735 ASSERT(kExitLinkSlotFromEntryFp == -8);
734 __ movq(RAX, Address(R8, Isolate::top_exit_frame_info_offset())); 736 __ movq(RAX, Address(R8, Isolate::top_exit_frame_info_offset()));
735 __ pushq(RAX); 737 __ pushq(RAX);
736 __ movq(Address(R8, Isolate::top_exit_frame_info_offset()), Immediate(0)); 738 __ movq(Address(R8, Isolate::top_exit_frame_info_offset()), Immediate(0));
737 739
738 // Save the old Context pointer. Use RAX as a temporary register. 740 // Save the old Context pointer. Use RAX as a temporary register.
739 // Note that VisitObjectPointers will find this saved Context pointer during 741 // Note that VisitObjectPointers will find this saved Context pointer during
740 // GC marking, since it traverses any information between SP and 742 // GC marking, since it traverses any information between SP and
741 // FP - kExitLinkOffsetInEntryFrame. 743 // FP - kExitLinkSlotFromEntryFp * kWordSize.
742 // EntryFrame::SavedContext reads the context saved in this frame. 744 // EntryFrame::SavedContext reads the context saved in this frame.
743 // The constant kSavedContextOffsetInEntryFrame must be kept in sync with 745 // The constant kSavedContextSlotFromEntryFp must be kept in sync with
744 // the code below: kSavedContextOffsetInEntryFrame = -9 * kWordSize. 746 // the code below.
747 ASSERT(kSavedContextSlotFromEntryFp == -9);
745 __ movq(RAX, Address(R8, Isolate::top_context_offset())); 748 __ movq(RAX, Address(R8, Isolate::top_context_offset()));
746 __ pushq(RAX); 749 __ pushq(RAX);
747 750
748 // Load arguments descriptor array into R10, which is passed to Dart code. 751 // Load arguments descriptor array into R10, which is passed to Dart code.
749 __ movq(R10, Address(RSI, VMHandles::kOffsetOfRawPtrInHandle)); 752 __ movq(R10, Address(RSI, VMHandles::kOffsetOfRawPtrInHandle));
750 753
751 // Load number of arguments into RBX. 754 // Load number of arguments into RBX.
752 __ movq(RBX, FieldAddress(R10, ArgumentsDescriptor::count_offset())); 755 __ movq(RBX, FieldAddress(R10, ArgumentsDescriptor::count_offset()));
753 __ SmiUntag(RBX); 756 __ SmiUntag(RBX);
754 757
(...skipping 1311 matching lines...) Expand 10 before | Expand all | Expand 10 after
2066 __ cmpq(left, right); 2069 __ cmpq(left, right);
2067 __ Bind(&done); 2070 __ Bind(&done);
2068 __ popq(right); 2071 __ popq(right);
2069 __ popq(left); 2072 __ popq(left);
2070 __ ret(); 2073 __ ret();
2071 } 2074 }
2072 2075
2073 } // namespace dart 2076 } // namespace dart
2074 2077
2075 #endif // defined TARGET_ARCH_X64 2078 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | runtime/vm/vm_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698