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

Unified Diff: runtime/vm/object.cc

Issue 217483008: Fix code invalidation for deferred code (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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
« 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/object.cc
===================================================================
--- runtime/vm/object.cc (revision 34526)
+++ runtime/vm/object.cc (working copy)
@@ -2448,13 +2448,12 @@
function ^= code.function();
// If function uses dependent code switch it to unoptimized.
- if (function.CurrentCode() == code.raw()) {
+ if (code.is_optimized() && (function.CurrentCode() == code.raw())) {
ReportSwitchingCode(code);
- if (code.is_optimized()) {
- function.SwitchToUnoptimizedCode();
- } else {
- function.ClearCode();
- }
+ function.SwitchToUnoptimizedCode();
+ } else if (function.unoptimized_code() == code.raw()) {
+ ReportSwitchingCode(code);
+ function.ClearCode();
}
}
}
@@ -9287,8 +9286,9 @@
virtual void ReportSwitchingCode(const Code& code) {
if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
- OS::PrintErr("Prefix '%s': deleting code for function '%s'\n",
+ OS::PrintErr("Prefix '%s': deleting %s code for function '%s'\n",
String::Handle(prefix_.name()).ToCString(),
+ code.is_optimized() ? "optimized" : "unoptimized",
Function::Handle(code.function()).ToCString());
}
}
« 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