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

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

Issue 1358773002: Load the native call wrapper via Thread. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/native_entry.h » ('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 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 if (!function().HasOptionalParameters()) { 779 if (!function().HasOptionalParameters()) {
780 __ leaq(RAX, Address(RBP, (kParamEndSlotFromFp + 780 __ leaq(RAX, Address(RBP, (kParamEndSlotFromFp +
781 function().NumParameters()) * kWordSize)); 781 function().NumParameters()) * kWordSize));
782 } else { 782 } else {
783 __ leaq(RAX, Address(RBP, kFirstLocalSlotFromFp * kWordSize)); 783 __ leaq(RAX, Address(RBP, kFirstLocalSlotFromFp * kWordSize));
784 } 784 }
785 __ LoadImmediate(R10, Immediate(argc_tag)); 785 __ LoadImmediate(R10, Immediate(argc_tag));
786 const StubEntry* stub_entry; 786 const StubEntry* stub_entry;
787 if (link_lazily()) { 787 if (link_lazily()) {
788 stub_entry = StubCode::CallBootstrapCFunction_entry(); 788 stub_entry = StubCode::CallBootstrapCFunction_entry();
789 __ LoadNativeEntry( 789 ExternalLabel label(NativeEntry::LinkNativeCallEntry());
790 RBX, &NativeEntry::LinkNativeCallLabel(), kPatchable); 790 __ LoadNativeEntry(RBX, &label, kPatchable);
791 } else { 791 } else {
792 stub_entry = (is_bootstrap_native() || is_leaf_call) 792 stub_entry = (is_bootstrap_native() || is_leaf_call)
793 ? StubCode::CallBootstrapCFunction_entry() 793 ? StubCode::CallBootstrapCFunction_entry()
794 : StubCode::CallNativeCFunction_entry(); 794 : StubCode::CallNativeCFunction_entry();
795 const ExternalLabel label(reinterpret_cast<uword>(native_c_function())); 795 const ExternalLabel label(reinterpret_cast<uword>(native_c_function()));
796 __ LoadNativeEntry(RBX, &label, kNotPatchable); 796 __ LoadNativeEntry(RBX, &label, kNotPatchable);
797 } 797 }
798 compiler->GenerateCall(token_pos(), 798 compiler->GenerateCall(token_pos(),
799 *stub_entry, 799 *stub_entry,
800 RawPcDescriptors::kOther, 800 RawPcDescriptors::kOther,
(...skipping 5650 matching lines...) Expand 10 before | Expand all | Expand 10 after
6451 __ Drop(1); 6451 __ Drop(1);
6452 __ popq(result); 6452 __ popq(result);
6453 } 6453 }
6454 6454
6455 6455
6456 } // namespace dart 6456 } // namespace dart
6457 6457
6458 #undef __ 6458 #undef __
6459 6459
6460 #endif // defined TARGET_ARCH_X64 6460 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_mips.cc ('k') | runtime/vm/native_entry.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698