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

Unified Diff: runtime/vm/code_patcher.cc

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 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
Index: runtime/vm/code_patcher.cc
diff --git a/runtime/vm/code_patcher.cc b/runtime/vm/code_patcher.cc
index d57957727cbf49525a5cc560f0b0e3c9753bb513..b05611d20854b33c24bfc45eac8d4dd39f0a3ae1 100644
--- a/runtime/vm/code_patcher.cc
+++ b/runtime/vm/code_patcher.cc
@@ -61,7 +61,7 @@ void CodePatcher::PatchEntry(const Code& code) {
ASSERT(patch_buffer != 0);
JumpPattern jmp_patch(patch_buffer, code);
ASSERT(jmp_patch.IsValid());
- const uword jump_target = jmp_patch.TargetAddress();
+ const Code& jump_target = Code::Handle(jmp_patch.TargetCode());
intptr_t length = jmp_patch.pattern_length_in_bytes();
{
WritableInstructionsScope writable_code(patch_addr, length);
@@ -69,7 +69,7 @@ void CodePatcher::PatchEntry(const Code& code) {
SwapCode(jmp_patch.pattern_length_in_bytes(),
reinterpret_cast<char*>(patch_addr),
reinterpret_cast<char*>(patch_buffer));
- jmp_entry.SetTargetAddress(jump_target);
+ jmp_entry.SetTargetCode(jump_target);
}
}
@@ -82,7 +82,7 @@ void CodePatcher::RestoreEntry(const Code& code) {
ASSERT(patch_addr != 0);
JumpPattern jmp_entry(patch_addr, code);
ASSERT(jmp_entry.IsValid());
- const uword jump_target = jmp_entry.TargetAddress();
+ const Code& jump_target = Code::Handle(jmp_entry.TargetCode());
const uword patch_buffer = code.GetPatchCodePc();
ASSERT(patch_buffer != 0);
// 'patch_buffer' contains original entry code.
@@ -96,7 +96,7 @@ void CodePatcher::RestoreEntry(const Code& code) {
reinterpret_cast<char*>(patch_addr),
reinterpret_cast<char*>(patch_buffer));
ASSERT(jmp_patch.IsValid());
- jmp_patch.SetTargetAddress(jump_target);
+ jmp_patch.SetTargetCode(jump_target);
}
}

Powered by Google App Engine
This is Rietveld 408576698