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

Side by Side Diff: runtime/vm/intermediate_language_mips.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_ia32.cc ('k') | runtime/vm/intermediate_language_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 (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_MIPS. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS.
6 #if defined(TARGET_ARCH_MIPS) 6 #if defined(TARGET_ARCH_MIPS)
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 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 // Compute the effective address. When running under the simulator, 990 // Compute the effective address. When running under the simulator,
991 // this is a redirection address that forces the simulator to call 991 // this is a redirection address that forces the simulator to call
992 // into the runtime system. 992 // into the runtime system.
993 uword entry; 993 uword entry;
994 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function()); 994 const intptr_t argc_tag = NativeArguments::ComputeArgcTag(function());
995 const bool is_leaf_call = 995 const bool is_leaf_call =
996 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0; 996 (argc_tag & NativeArguments::AutoSetupScopeMask()) == 0;
997 const StubEntry* stub_entry; 997 const StubEntry* stub_entry;
998 if (link_lazily()) { 998 if (link_lazily()) {
999 stub_entry = StubCode::CallBootstrapCFunction_entry(); 999 stub_entry = StubCode::CallBootstrapCFunction_entry();
1000 entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall); 1000 entry = NativeEntry::LinkNativeCallEntry();
1001 #if defined(USING_SIMULATOR)
1002 entry = Simulator::RedirectExternalReference(
1003 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
1004 #endif
1005 } else { 1001 } else {
1006 entry = reinterpret_cast<uword>(native_c_function()); 1002 entry = reinterpret_cast<uword>(native_c_function());
1007 if (is_bootstrap_native() || is_leaf_call) { 1003 if (is_bootstrap_native() || is_leaf_call) {
1008 stub_entry = StubCode::CallBootstrapCFunction_entry(); 1004 stub_entry = StubCode::CallBootstrapCFunction_entry();
1009 #if defined(USING_SIMULATOR) 1005 #if defined(USING_SIMULATOR)
1010 entry = Simulator::RedirectExternalReference( 1006 entry = Simulator::RedirectExternalReference(
1011 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments); 1007 entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
1012 #endif 1008 #endif
1013 } else { 1009 } else {
1014 // In the case of non bootstrap native methods the CallNativeCFunction 1010 // In the case of non bootstrap native methods the CallNativeCFunction
(...skipping 4588 matching lines...) Expand 10 before | Expand all | Expand 10 after
5603 1, 5599 1,
5604 locs()); 5600 locs());
5605 __ lw(result, Address(SP, 1 * kWordSize)); 5601 __ lw(result, Address(SP, 1 * kWordSize));
5606 __ addiu(SP, SP, Immediate(2 * kWordSize)); 5602 __ addiu(SP, SP, Immediate(2 * kWordSize));
5607 } 5603 }
5608 5604
5609 5605
5610 } // namespace dart 5606 } // namespace dart
5611 5607
5612 #endif // defined TARGET_ARCH_MIPS 5608 #endif // defined TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « runtime/vm/intermediate_language_ia32.cc ('k') | runtime/vm/intermediate_language_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698