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

Unified Diff: runtime/vm/code_patcher.cc

Issue 1376963002: Cleanup: we are not patching entries any longer (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review comments Created 5 years, 3 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_patcher.h ('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
diff --git a/runtime/vm/code_patcher.cc b/runtime/vm/code_patcher.cc
index c1fe9f74916b6d11a5a7c75d1325eca184017209..c62be00cb979c8cae6404dcaf90acce78d17251d 100644
--- a/runtime/vm/code_patcher.cc
+++ b/runtime/vm/code_patcher.cc
@@ -34,26 +34,4 @@ WritableInstructionsScope::~WritableInstructionsScope() {
}
}
-
-// The patch code buffer contains the jmp code which will be inserted at
-// entry point.
-void CodePatcher::PatchEntry(const Code& code, const Code& new_code) {
- ASSERT(code.instructions() == code.active_instructions());
- code.set_active_instructions(new_code.instructions());
-}
-
-
-// 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;
- ASSERT(code.instructions() != code.active_instructions());
- code.set_active_instructions(code.instructions());
-}
-
-
-bool CodePatcher::IsEntryPatched(const Code& code) {
- return code.instructions() != code.active_instructions();
-}
-
} // namespace dart
« no previous file with comments | « runtime/vm/code_patcher.h ('k') | runtime/vm/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698