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

Unified Diff: runtime/vm/native_entry.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/native_entry.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/native_entry.cc
diff --git a/runtime/vm/native_entry.cc b/runtime/vm/native_entry.cc
index 51c4a463e454cf05d8f1a5f3e3b53b46bb3719b6..29cb8d7145b9d8f89ca9eb40747cdc8071bbd104 100644
--- a/runtime/vm/native_entry.cc
+++ b/runtime/vm/native_entry.cc
@@ -23,14 +23,6 @@ DEFINE_FLAG(bool, trace_natives, false,
"Trace invocation of natives (debug mode only)");
-static ExternalLabel native_call_label(
- reinterpret_cast<uword>(&NativeEntry::NativeCallWrapper));
-
-
-static ExternalLabel link_native_call_label(
- reinterpret_cast<uword>(&NativeEntry::LinkNativeCall));
-
-
NativeFunction NativeEntry::ResolveNative(const Library& library,
const String& function_name,
int number_of_arguments,
@@ -84,8 +76,13 @@ const uint8_t* NativeEntry::ResolveSymbol(uword pc) {
}
-const ExternalLabel& NativeEntry::NativeCallWrapperLabel() {
- return native_call_label;
+uword NativeEntry::NativeCallWrapperEntry() {
+ uword entry = reinterpret_cast<uword>(NativeEntry::NativeCallWrapper);
+#if defined(USING_SIMULATOR)
+ entry = Simulator::RedirectExternalReference(
+ entry, Simulator::kNativeCall, NativeEntry::kNumCallWrapperArguments);
+#endif
+ return entry;
}
@@ -167,8 +164,13 @@ static NativeFunction ResolveNativeFunction(Isolate *isolate,
}
-const ExternalLabel& NativeEntry::LinkNativeCallLabel() {
- return link_native_call_label;
+uword NativeEntry::LinkNativeCallEntry() {
+ uword entry = reinterpret_cast<uword>(NativeEntry::LinkNativeCall);
+#if defined(USING_SIMULATOR)
+ entry = Simulator::RedirectExternalReference(
+ entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
+#endif
+ return entry;
}
« no previous file with comments | « runtime/vm/native_entry.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698