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

Unified Diff: runtime/vm/code_patcher.cc

Issue 1067383002: VM: Enable collection of unoptimized code for optimized functions. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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 | « runtime/vm/code_generator.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher.cc
===================================================================
--- runtime/vm/code_patcher.cc (revision 44996)
+++ runtime/vm/code_patcher.cc (working copy)
@@ -52,6 +52,7 @@
// The patch code buffer contains the jmp code which will be inserted at
// entry point.
void CodePatcher::PatchEntry(const Code& code) {
+ ASSERT(!IsEntryPatched(code));
const uword patch_addr = code.GetEntryPatchPc();
ASSERT(patch_addr != 0);
JumpPattern jmp_entry(patch_addr, code);
@@ -76,6 +77,7 @@
// The entry point is a jmp instruction, the patch code buffer contains
// original code, the entry point contains the jump instruction.
void CodePatcher::RestoreEntry(const Code& code) {
+ if (!IsEntryPatched(code)) return;
const uword patch_addr = code.GetEntryPatchPc();
ASSERT(patch_addr != 0);
JumpPattern jmp_entry(patch_addr, code);
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698