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

Unified Diff: runtime/vm/dart_entry.cc

Issue 1587293002: Prevent clang from doing tail-call elimination in DartEntry::InvokeClosure. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_entry.cc
diff --git a/runtime/vm/dart_entry.cc b/runtime/vm/dart_entry.cc
index abb3e5db371e4c8dd5b4433b7c0aff9c9f6e7fab..3a53dcc641ba59fc60df6f3b45f19d76a8f7887f 100644
--- a/runtime/vm/dart_entry.cc
+++ b/runtime/vm/dart_entry.cc
@@ -192,7 +192,12 @@ RawObject* DartEntry::InvokeClosure(const Array& arguments,
ASSERT(getter_result.IsNull() || getter_result.IsInstance());
arguments.SetAt(0, getter_result);
- return InvokeClosure(arguments, arguments_descriptor);
+ // This otherwise unnecessary handle is used to prevent clang from
Florian Schneider 2016/01/15 00:46:46 Should we only do this in simulator builds? i.e. #
rmacnak 2016/01/15 01:00:07 We need a stack overflow check for all configurati
+ // doing tail call elimination, which would make the stack overflow
+ // check above ineffective.
+ Object& result = Object::Handle(InvokeClosure(arguments,
+ arguments_descriptor));
+ return result.raw();
}
cls = cls.SuperClass();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698