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

Unified Diff: runtime/vm/native_entry.cc

Issue 1858283002: Initial SIMDBC interpreter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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 a5c79d3731a4d6c63153b04bc5f34e0c02157606..e1e7e45e7f78115690dba43a1edf37a98905303c 100644
--- a/runtime/vm/native_entry.cc
+++ b/runtime/vm/native_entry.cc
@@ -90,7 +90,8 @@ const uint8_t* NativeEntry::ResolveSymbol(uword pc) {
uword NativeEntry::NativeCallWrapperEntry() {
uword entry = reinterpret_cast<uword>(NativeEntry::NativeCallWrapper);
-#if defined(USING_SIMULATOR)
+#if defined(USING_SIMULATOR) && !defined(TARGET_ARCH_DBC)
+ // DBC does not use redirections unlike other simulators.
entry = Simulator::RedirectExternalReference(
entry, Simulator::kNativeCall, NativeEntry::kNumCallWrapperArguments);
#endif
@@ -177,6 +178,8 @@ void NativeEntry::NativeCallWrapperNoStackCheck(Dart_NativeArguments args,
}
+// DBC does not support lazy native call linking.
+#if !defined(TARGET_ARCH_DBC)
static NativeFunction ResolveNativeFunction(Zone* zone,
const Function& func,
bool* is_bootstrap_native) {
@@ -260,9 +263,10 @@ void NativeEntry::LinkNativeCall(Dart_NativeArguments args) {
#endif
call_through_wrapper = !is_bootstrap_native;
- const Code& trampoline = Code::Handle(call_through_wrapper ?
- StubCode::CallNativeCFunction_entry()->code() :
- StubCode::CallBootstrapCFunction_entry()->code());
+ const Code& trampoline =
+ Code::Handle(call_through_wrapper ?
+ StubCode::CallNativeCFunction_entry()->code() :
+ StubCode::CallBootstrapCFunction_entry()->code());
NativeFunction patch_target_function = target_function;
#if defined(USING_SIMULATOR)
@@ -295,6 +299,7 @@ void NativeEntry::LinkNativeCall(Dart_NativeArguments args) {
target_function(arguments);
}
}
+#endif // !defined(TARGET_ARCH_DBC)
} // namespace dart
« 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