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

Unified Diff: runtime/vm/intermediate_language_arm.cc

Issue 22303002: Auto create ApiLocalScope before calling native functions, this ensures that (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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
Index: runtime/vm/intermediate_language_arm.cc
===================================================================
--- runtime/vm/intermediate_language_arm.cc (revision 25778)
+++ runtime/vm/intermediate_language_arm.cc (working copy)
@@ -1000,15 +1000,20 @@
// this is a redirection address that forces the simulator to call
// into the runtime system.
uword entry = reinterpret_cast<uword>(native_c_function());
+ const ExternalLabel* stub_entry;
+ if (is_bootstrap_native()) {
+ stub_entry = &StubCode::CallBootstrapCFunctionLabel();
#if defined(USING_SIMULATOR)
- entry = Simulator::RedirectExternalReference(entry,
- Simulator::kNativeCall,
- function().NumParameters());
+ entry = Simulator::RedirectExternalReference(
+ entry, Simulator::kBootstrapNativeCall, function().NumParameters());
#endif
+ } else {
regis 2013/08/06 17:01:22 For clarity, I would add a comment explaining that
siva 2013/08/06 19:04:26 Done.
+ stub_entry = &StubCode::CallNativeCFunctionLabel();
+ }
__ LoadImmediate(R5, entry);
__ LoadImmediate(R1, NativeArguments::ComputeArgcTag(function()));
compiler->GenerateCall(token_pos(),
- &StubCode::CallNativeCFunctionLabel(),
+ stub_entry,
PcDescriptors::kOther,
locs());
__ Pop(result);

Powered by Google App Engine
This is Rietveld 408576698