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

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

Issue 10882055: Put live register bits in stackmaps. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, 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" // Needed here to get TARGET_ARCH_X64. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64.
6 #if defined(TARGET_ARCH_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
9 9
10 #include "lib/error.h" 10 #include "lib/error.h"
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 // RBP : points to previous frame pointer. 795 // RBP : points to previous frame pointer.
796 // RBP + 8 : points to return address. 796 // RBP + 8 : points to return address.
797 // RBP + 16 : address of last argument (arg n-1). 797 // RBP + 16 : address of last argument (arg n-1).
798 // RSP + 16 + 8*(n-1) : address of first argument (arg 0). 798 // RSP + 16 + 8*(n-1) : address of first argument (arg 0).
799 // RBX : ic-data. 799 // RBX : ic-data.
800 // R10 : arguments descriptor array. 800 // R10 : arguments descriptor array.
801 __ call(&StubCode::CallNoSuchMethodFunctionLabel()); 801 __ call(&StubCode::CallNoSuchMethodFunctionLabel());
802 } 802 }
803 if (is_optimizing()) { 803 if (is_optimizing()) {
804 stackmap_table_builder_->AddEntry(assembler()->CodeSize(), 804 stackmap_table_builder_->AddEntry(assembler()->CodeSize(),
805 empty_stack_bitmap); 805 empty_stack_bitmap,
806 0);
Vyacheslav Egorov (Google) 2012/08/27 14:54:51 I wonder if it would not be cleaner to pass Regist
Kevin Millikin (Google) 2012/08/29 12:40:41 At some point we have to unpack it into something
806 } 807 }
807 808
808 if (FLAG_trace_functions) { 809 if (FLAG_trace_functions) {
809 __ pushq(RAX); // Preserve result. 810 __ pushq(RAX); // Preserve result.
810 __ PushObject(Function::ZoneHandle(function.raw())); 811 __ PushObject(Function::ZoneHandle(function.raw()));
811 // We do not use GenerateCallRuntime because of the non-standard (empty) 812 // We do not use GenerateCallRuntime because of the non-standard (empty)
812 // stackmap used here. 813 // stackmap used here.
813 __ CallRuntime(kTraceFunctionExitRuntimeEntry); 814 __ CallRuntime(kTraceFunctionExitRuntimeEntry);
814 AddCurrentDescriptor(PcDescriptors::kOther, 815 AddCurrentDescriptor(PcDescriptors::kOther,
815 Isolate::kNoDeoptId, 816 Isolate::kNoDeoptId,
816 0, // No token position. 817 0, // No token position.
817 CatchClauseNode::kInvalidTryIndex); 818 CatchClauseNode::kInvalidTryIndex);
818 if (is_optimizing()) { 819 if (is_optimizing()) {
819 stackmap_table_builder_->AddEntry(assembler()->CodeSize(), 820 stackmap_table_builder_->AddEntry(assembler()->CodeSize(),
820 empty_stack_bitmap); 821 empty_stack_bitmap,
822 0);
821 } 823 }
822 __ popq(RAX); // Remove argument. 824 __ popq(RAX); // Remove argument.
823 __ popq(RAX); // Restore result. 825 __ popq(RAX); // Restore result.
824 } 826 }
825 __ LeaveFrame(); 827 __ LeaveFrame();
826 __ ret(); 828 __ ret();
827 829
828 __ Bind(&all_arguments_processed); 830 __ Bind(&all_arguments_processed);
829 // Nullify originally passed arguments only after they have been copied and 831 // Nullify originally passed arguments only after they have been copied and
830 // checked, otherwise noSuchMethod would not see their original values. 832 // checked, otherwise noSuchMethod would not see their original values.
(...skipping 469 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) { 1302 void ParallelMoveResolver::Exchange(const Address& mem1, const Address& mem2) {
1301 __ Exchange(mem1, mem2); 1303 __ Exchange(mem1, mem2);
1302 } 1304 }
1303 1305
1304 1306
1305 #undef __ 1307 #undef __
1306 1308
1307 } // namespace dart 1309 } // namespace dart
1308 1310
1309 #endif // defined TARGET_ARCH_X64 1311 #endif // defined TARGET_ARCH_X64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698