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

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

Issue 1420173006: Move resolving of natives to a late stage (during code emission). That eliminates unnecessary nativ… (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: r Created 5 years, 1 month 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 | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/native_entry.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 (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" // 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/intermediate_language.h" 8 #include "vm/intermediate_language.h"
9 9
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 } 765 }
766 766
767 767
768 LocationSummary* NativeCallInstr::MakeLocationSummary(Zone* zone, 768 LocationSummary* NativeCallInstr::MakeLocationSummary(Zone* zone,
769 bool opt) const { 769 bool opt) const {
770 return MakeCallSummary(zone); 770 return MakeCallSummary(zone);
771 } 771 }
772 772
773 773
774 void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { 774 void NativeCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
775 SetupNative();
775 Register result = locs()->out(0).reg(); 776 Register result = locs()->out(0).reg();
776 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); 777 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
777 const bool is_leaf_call = 778 const bool is_leaf_call =
778 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; 779 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
779 780
780 // Push the result place holder initialized to NULL. 781 // Push the result place holder initialized to NULL.
781 __ PushObject(Object::null_object()); 782 __ PushObject(Object::null_object());
782 // Pass a pointer to the first argument in RAX. 783 // Pass a pointer to the first argument in RAX.
783 if (!function().HasOptionalParameters()) { 784 if (!function().HasOptionalParameters()) {
784 __ leaq(RAX, Address(RBP, (kParamEndSlotFromFp + 785 __ leaq(RAX, Address(RBP, (kParamEndSlotFromFp +
785 function().NumParameters()) * kWordSize)); 786 function().NumParameters()) * kWordSize));
786 } else { 787 } else {
787 __ leaq(RAX, Address(RBP, kFirstLocalSlotFromFp * kWordSize)); 788 __ leaq(RAX, Address(RBP, kFirstLocalSlotFromFp * kWordSize));
788 } 789 }
(...skipping 5663 matching lines...) Expand 10 before | Expand all | Expand 10 after
6452 __ Drop(1); 6453 __ Drop(1);
6453 __ popq(result); 6454 __ popq(result);
6454 } 6455 }
6455 6456
6456 6457
6457 } // namespace dart 6458 } // namespace dart
6458 6459
6459 #undef __ 6460 #undef __
6460 6461
6461 #endif // defined TARGET_ARCH_X64 6462 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/native_entry.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698