Index: runtime/vm/code_patcher_x64.cc |
diff --git a/runtime/vm/code_patcher_x64.cc b/runtime/vm/code_patcher_x64.cc |
index 4b79751b10b17ff1a9a3143ad5c349d8dd672b9a..1ce5c5eb6daddd4720b06c52c1c1c599742b7529 100644 |
--- a/runtime/vm/code_patcher_x64.cc |
+++ b/runtime/vm/code_patcher_x64.cc |
@@ -16,7 +16,6 @@ |
namespace dart { |
- |
static bool MatchesPattern(uword addr, int16_t* pattern, intptr_t size) { |
uint8_t* bytes = reinterpret_cast<uint8_t*>(addr); |
for (intptr_t i = 0; i < size; i++) { |
@@ -28,19 +27,16 @@ static bool MatchesPattern(uword addr, int16_t* pattern, intptr_t size) { |
return true; |
} |
- |
intptr_t IndexFromPPLoad(uword start) { |
int32_t offset = *reinterpret_cast<int32_t*>(start); |
return ObjectPool::IndexFromOffset(offset); |
} |
- |
intptr_t IndexFromPPLoadDisp8(uword start) { |
int8_t offset = *reinterpret_cast<int8_t*>(start); |
return ObjectPool::IndexFromOffset(offset); |
} |
- |
class UnoptimizedCall : public ValueObject { |
public: |
UnoptimizedCall(uword return_address, const Code& code) |
@@ -87,7 +83,6 @@ class UnoptimizedCall : public ValueObject { |
DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedCall); |
}; |
- |
class NativeCall : public UnoptimizedCall { |
public: |
NativeCall(uword return_address, const Code& code) |
@@ -106,7 +101,6 @@ class NativeCall : public UnoptimizedCall { |
DISALLOW_IMPLICIT_CONSTRUCTORS(NativeCall); |
}; |
- |
class InstanceCall : public UnoptimizedCall { |
public: |
InstanceCall(uword return_address, const Code& code) |
@@ -122,7 +116,6 @@ class InstanceCall : public UnoptimizedCall { |
DISALLOW_IMPLICIT_CONSTRUCTORS(InstanceCall); |
}; |
- |
class UnoptimizedStaticCall : public UnoptimizedCall { |
public: |
UnoptimizedStaticCall(uword return_address, const Code& code) |
@@ -138,7 +131,6 @@ class UnoptimizedStaticCall : public UnoptimizedCall { |
DISALLOW_IMPLICIT_CONSTRUCTORS(UnoptimizedStaticCall); |
}; |
- |
// The expected pattern of a call where the target is loaded from |
// the object pool. |
class PoolPointerCall : public ValueObject { |
@@ -181,7 +173,6 @@ class PoolPointerCall : public ValueObject { |
DISALLOW_IMPLICIT_CONSTRUCTORS(PoolPointerCall); |
}; |
- |
// Instance call that can switch between a direct monomorphic call, an IC call, |
// and a megamorphic call. |
// load guarded cid load ICData load MegamorphicCache |
@@ -236,7 +227,6 @@ class SwitchableCall : public ValueObject { |
DISALLOW_IMPLICIT_CONSTRUCTORS(SwitchableCall); |
}; |
- |
RawCode* CodePatcher::GetStaticCallTargetAt(uword return_address, |
const Code& code) { |
ASSERT(code.ContainsInstructionAt(return_address)); |
@@ -244,14 +234,12 @@ RawCode* CodePatcher::GetStaticCallTargetAt(uword return_address, |
return call.Target(); |
} |
- |
void CodePatcher::PatchStaticCallAt(uword return_address, |
const Code& code, |
const Code& new_target) { |
PatchPoolPointerCallAt(return_address, code, new_target); |
} |
- |
void CodePatcher::PatchPoolPointerCallAt(uword return_address, |
const Code& code, |
const Code& new_target) { |
@@ -260,7 +248,6 @@ void CodePatcher::PatchPoolPointerCallAt(uword return_address, |
call.SetTarget(new_target); |
} |
- |
RawCode* CodePatcher::GetInstanceCallAt(uword return_address, |
const Code& code, |
ICData* ic_data) { |
@@ -272,17 +259,14 @@ RawCode* CodePatcher::GetInstanceCallAt(uword return_address, |
return call.target(); |
} |
- |
intptr_t CodePatcher::InstanceCallSizeInBytes() { |
return InstanceCall::kCallPatternSize; |
} |
- |
void CodePatcher::InsertDeoptimizationCallAt(uword start) { |
UNREACHABLE(); |
} |
- |
RawFunction* CodePatcher::GetUnoptimizedStaticCallAt(uword return_address, |
const Code& code, |
ICData* ic_data_result) { |
@@ -296,7 +280,6 @@ RawFunction* CodePatcher::GetUnoptimizedStaticCallAt(uword return_address, |
return ic_data.GetTargetAt(0); |
} |
- |
void CodePatcher::PatchSwitchableCallAt(uword return_address, |
const Code& caller_code, |
const Object& data, |
@@ -307,7 +290,6 @@ void CodePatcher::PatchSwitchableCallAt(uword return_address, |
call.SetTarget(target); |
} |
- |
RawCode* CodePatcher::GetSwitchableCallTargetAt(uword return_address, |
const Code& caller_code) { |
ASSERT(caller_code.ContainsInstructionAt(return_address)); |
@@ -315,7 +297,6 @@ RawCode* CodePatcher::GetSwitchableCallTargetAt(uword return_address, |
return call.target(); |
} |
- |
RawObject* CodePatcher::GetSwitchableCallDataAt(uword return_address, |
const Code& caller_code) { |
ASSERT(caller_code.ContainsInstructionAt(return_address)); |
@@ -323,7 +304,6 @@ RawObject* CodePatcher::GetSwitchableCallDataAt(uword return_address, |
return call.data(); |
} |
- |
void CodePatcher::PatchNativeCallAt(uword return_address, |
const Code& code, |
NativeFunction target, |
@@ -334,7 +314,6 @@ void CodePatcher::PatchNativeCallAt(uword return_address, |
call.set_native_function(target); |
} |
- |
RawCode* CodePatcher::GetNativeCallAt(uword return_address, |
const Code& code, |
NativeFunction* target) { |