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

Unified Diff: runtime/vm/code_patcher_mips.cc

Issue 1192103004: VM: New calling convention for generated code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fixed 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_ia32.cc ('k') | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher_mips.cc
diff --git a/runtime/vm/code_patcher_mips.cc b/runtime/vm/code_patcher_mips.cc
index 1014aed299cf07341f58e4e1392548f621027fbb..aad4413603ba5e61c4f22e56a15febdd2b6ece07 100644
--- a/runtime/vm/code_patcher_mips.cc
+++ b/runtime/vm/code_patcher_mips.cc
@@ -12,48 +12,39 @@
namespace dart {
-uword CodePatcher::GetStaticCallTargetAt(uword return_address,
- const Code& code) {
+RawCode* CodePatcher::GetStaticCallTargetAt(uword return_address,
+ const Code& code) {
ASSERT(code.ContainsInstructionAt(return_address));
CallPattern call(return_address, code);
- return call.TargetAddress();
+ return call.TargetCode();
}
void CodePatcher::PatchStaticCallAt(uword return_address,
const Code& code,
- uword new_target) {
+ const Code& new_target) {
ASSERT(code.ContainsInstructionAt(return_address));
CallPattern call(return_address, code);
- call.SetTargetAddress(new_target);
+ call.SetTargetCode(new_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) {
+void CodePatcher::InsertDeoptimizationCallAt(uword start, uword target) {
// The inserted call should not overlap the lazy deopt jump code.
- ASSERT(start + CallPattern::kFixedLengthInBytes <= target);
- CallPattern::InsertAt(start, target);
+ ASSERT(start + CallPattern::kDeoptCallLengthInBytes <= target);
+ CallPattern::InsertDeoptCallAt(start, target);
}
-uword CodePatcher::GetInstanceCallAt(uword return_address,
- const Code& code,
- ICData* ic_data) {
+RawCode* 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.TargetAddress();
+ return call.TargetCode();
}
@@ -83,14 +74,14 @@ void CodePatcher::PatchNativeCallAt(uword return_address,
const Code& trampoline) {
ASSERT(code.ContainsInstructionAt(return_address));
NativeCallPattern call(return_address, code);
- call.set_target(trampoline.EntryPoint());
+ call.set_target(trampoline);
call.set_native_function(target);
}
-uword CodePatcher::GetNativeCallAt(uword return_address,
- const Code& code,
- NativeFunction* target) {
+RawCode* 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_ia32.cc ('k') | runtime/vm/code_patcher_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698