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

Unified Diff: runtime/vm/stub_code_arm.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/raw_object_snapshot.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 0851085fbb84f53d2c1d6d87d21f7b60f1a95bc1..6c6f2839517100bc724b957bf4648e2f1a98f7c7 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -192,18 +192,10 @@ void StubCode::GenerateCallNativeCFunctionStub(Assembler* assembler) {
__ mov(R0, Operand(SP)); // Pass the pointer to the NativeArguments.
__ mov(R1, Operand(R5)); // Pass the function entrypoint to call.
+
// Call native function invocation wrapper or redirection via simulator.
-#if defined(USING_SIMULATOR)
- uword entry = reinterpret_cast<uword>(NativeEntry::NativeCallWrapper);
- const ExternalLabel label(Simulator::RedirectExternalReference(
- entry, Simulator::kNativeCall, NativeEntry::kNumCallWrapperArguments));
- __ LoadExternalLabel(R2, &label, kNotPatchable);
- __ blx(R2);
-#else
- __ LoadExternalLabel(
- LR, &NativeEntry::NativeCallWrapperLabel(), kNotPatchable);
+ __ ldr(LR, Address(THR, Thread::native_call_wrapper_entry_point_offset()));
__ blx(LR);
-#endif
// Mark that the isolate is executing Dart code.
__ LoadImmediate(R2, VMTag::kDartTagId);
« no previous file with comments | « runtime/vm/raw_object_snapshot.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698