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

Unified Diff: runtime/vm/code_patcher_arm.cc

Issue 1343373003: Revert "VM: New calling convention for generated code." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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.cc ('k') | runtime/vm/code_patcher_arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_arm.cc
diff --git a/runtime/vm/code_patcher_arm.cc b/runtime/vm/code_patcher_arm.cc
index 6c31af98759db3fa2e429107940c677bce08fac3..49477c9deba013a791b3a6f1c6a19bedcc0cdb6c 100644
--- a/runtime/vm/code_patcher_arm.cc
+++ b/runtime/vm/code_patcher_arm.cc
@@ -13,39 +13,48 @@
namespace dart {
-RawCode* CodePatcher::GetStaticCallTargetAt(uword return_address,
- const Code& code) {
+uword CodePatcher::GetStaticCallTargetAt(uword return_address,
+ const Code& code) {
ASSERT(code.ContainsInstructionAt(return_address));
CallPattern call(return_address, code);
- return call.TargetCode();
+ return call.TargetAddress();
}
void CodePatcher::PatchStaticCallAt(uword return_address,
const Code& code,
- const Code& new_target) {
+ uword new_target) {
ASSERT(code.ContainsInstructionAt(return_address));
CallPattern call(return_address, code);
- call.SetTargetCode(new_target);
+ call.SetTargetAddress(new_target);
}
-void CodePatcher::InsertDeoptimizationCallAt(uword start, uword target) {
+void CodePatcher::PatchInstanceCallAt(uword return_address,
+ const Code& code,
+ uword new_target) {
+ ASSERT(code.ContainsInstructionAt(return_address));
+ CallPattern call(return_address, code);
+ call.SetTargetAddress(new_target);
+}
+
+
+void CodePatcher::InsertCallAt(uword start, uword target) {
// The inserted call should not overlap the lazy deopt jump code.
- ASSERT(start + CallPattern::DeoptCallPatternLengthInBytes() <= target);
- CallPattern::InsertDeoptCallAt(start, target);
+ ASSERT(start + CallPattern::LengthInBytes() <= target);
+ CallPattern::InsertAt(start, target);
}
-RawCode* CodePatcher::GetInstanceCallAt(uword return_address,
- const Code& code,
- ICData* ic_data) {
+uword CodePatcher::GetInstanceCallAt(uword return_address,
+ const Code& code,
+ ICData* ic_data) {
ASSERT(code.ContainsInstructionAt(return_address));
CallPattern call(return_address, code);
if (ic_data != NULL) {
*ic_data = call.IcData();
}
- return call.TargetCode();
+ return call.TargetAddress();
}
@@ -75,14 +84,14 @@ void CodePatcher::PatchNativeCallAt(uword return_address,
const Code& trampoline) {
ASSERT(code.ContainsInstructionAt(return_address));
NativeCallPattern call(return_address, code);
- call.set_target(trampoline);
+ call.set_target(trampoline.EntryPoint());
call.set_native_function(target);
}
-RawCode* CodePatcher::GetNativeCallAt(uword return_address,
- const Code& code,
- NativeFunction* target) {
+uword CodePatcher::GetNativeCallAt(uword return_address,
+ const Code& code,
+ NativeFunction* target) {
ASSERT(code.ContainsInstructionAt(return_address));
NativeCallPattern call(return_address, code);
*target = call.native_function();
« no previous file with comments | « runtime/vm/code_patcher.cc ('k') | runtime/vm/code_patcher_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698