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

Unified Diff: runtime/vm/gc_marker.cc

Issue 203523011: Introduce a lazy-compile stub for functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: rebased & added MIPS code Created 6 years, 9 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/gc_marker.cc
===================================================================
--- runtime/vm/gc_marker.cc (revision 34118)
+++ runtime/vm/gc_marker.cc (working copy)
@@ -249,7 +249,12 @@
// If the code wasn't strongly visited through other references
// after skipping the function's code pointer, then we disconnect the
// code from the function.
- func->ptr()->code_ = Code::null();
+ bool is_closure =
+ Function::KindBits::decode(func->ptr()->kind_tag_) ==
+ RawFunction::kClosureFunction;
+ func->ptr()->code_ = is_closure
+ ? StubCode::LazyCompileClosure_entry()->code()
+ : Code::null();
func->ptr()->unoptimized_code_ = Code::null();
if (FLAG_log_code_drop) {
// NOTE: This code runs while GC is in progress and runs within

Powered by Google App Engine
This is Rietveld 408576698