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

Unified Diff: runtime/vm/code_patcher.h

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_generator.cc ('k') | runtime/vm/code_patcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/code_patcher.h
diff --git a/runtime/vm/code_patcher.h b/runtime/vm/code_patcher.h
index 3c0236d99d3fc2a523f8cba929dc532edc233e3a..57ee46a60bffcf1eaf72b49b6d4b53aabc4f2b34 100644
--- a/runtime/vm/code_patcher.h
+++ b/runtime/vm/code_patcher.h
@@ -18,7 +18,6 @@ class ExternalLabel;
class Function;
class ICData;
class RawArray;
-class RawCode;
class RawFunction;
class RawICData;
class RawObject;
@@ -47,10 +46,15 @@ class CodePatcher : public AllStatic {
// Patch static call before return_address in given code to the new target.
static void PatchStaticCallAt(uword return_address,
const Code& code,
- const Code& new_target);
+ uword new_target_address);
+
+ // Patch instance call before return_address in given code to the new target.
+ static void PatchInstanceCallAt(uword return_address,
+ const Code& code,
+ uword new_target_address);
// Patch entry point with a jump as specified in the code's patch region.
- static void PatchEntry(const Code& code, const Code& new_code);
+ static void PatchEntry(const Code& code);
// Restore entry point with original code (i.e., before patching).
static void RestoreEntry(const Code& code);
@@ -58,16 +62,20 @@ class CodePatcher : public AllStatic {
// Has the entry been patched?
static bool IsEntryPatched(const Code& code);
+ // Returns true if the code can be patched with a jump at beginning (checks
+ // that there are no conflicts with object pointers). Used in ASSERTs.
+ static bool CodeIsPatchable(const Code& code);
+
// Return the target address of the static call before return_address
// in given code.
- static RawCode* GetStaticCallTargetAt(uword return_address, const Code& code);
+ static uword GetStaticCallTargetAt(uword return_address, const Code& code);
// Get instance call information. Returns the call target and sets each
// of the output parameters ic_data and arguments_descriptor if they are
// non-NULL.
- static RawCode* GetInstanceCallAt(uword return_address,
- const Code& code,
- ICData* ic_data);
+ static uword GetInstanceCallAt(uword return_address,
+ const Code& code,
+ ICData* ic_data);
// Return target of an unoptimized static call and its ICData object
// (calls target via a stub).
@@ -77,17 +85,17 @@ class CodePatcher : public AllStatic {
static intptr_t InstanceCallSizeInBytes();
- static void InsertDeoptimizationCallAt(uword start, uword target);
+ static void InsertCallAt(uword start, uword target);
static RawObject* GetEdgeCounterAt(uword pc, const Code& code);
static void PatchPoolPointerCallAt(uword return_address,
const Code& code,
- const Code& new_target);
+ uword new_target);
- static RawCode* GetNativeCallAt(uword return_address,
- const Code& code,
- NativeFunction* target);
+ static uword GetNativeCallAt(uword return_address,
+ const Code& code,
+ NativeFunction* target);
static void PatchNativeCallAt(uword return_address,
const Code& code,
« no previous file with comments | « runtime/vm/code_generator.cc ('k') | runtime/vm/code_patcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698