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

Unified Diff: runtime/vm/object.cc

Issue 326703003: Simplify code disabling logic in WeakCodeReferences. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 6 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 37108)
+++ runtime/vm/object.cc (working copy)
@@ -2523,12 +2523,13 @@
if (!CodePatcher::IsEntryPatched(code)) {
CodePatcher::PatchEntry(code);
}
- } else if (!function.HasCode() && (code.GetEntryPatchPc() != 0)) {
- // The code has already been disconnected, make it invalid. Do not
- // bother with OSR compiled code that has no valid entry-patch.
- ReportSwitchingCode(code);
- if (!CodePatcher::IsEntryPatched(code)) {
- CodePatcher::PatchEntry(code);
+ } else {
+ // Make non-OSR code non-entrant.
+ if (code.GetEntryPatchPc() != 0) {
+ if (!CodePatcher::IsEntryPatched(code)) {
+ ReportSwitchingCode(code);
+ CodePatcher::PatchEntry(code);
+ }
}
}
}
@@ -9647,7 +9648,7 @@
virtual void ReportSwitchingCode(const Code& code) {
if (FLAG_trace_deoptimization || FLAG_trace_deoptimization_verbose) {
- OS::PrintErr("Prefix '%s': deleting %s code for %s function '%s'\n",
+ OS::PrintErr("Prefix '%s': disabling %s code for %s function '%s'\n",
String::Handle(prefix_.name()).ToCString(),
code.is_optimized() ? "optimized" : "unoptimized",
CodePatcher::IsEntryPatched(code) ? "patched" : "unpatched",
« 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