summaryrefslogtreecommitdiff
path: root/packaging/0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch')
-rw-r--r--packaging/0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/packaging/0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch b/packaging/0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch
new file mode 100644
index 0000000..91b0639
--- /dev/null
+++ b/packaging/0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch
@@ -0,0 +1,49 @@
+From 0d08b9471178521765ea41dff5f95ea49f5e10c5 Mon Sep 17 00:00:00 2001
+From: Gleb Balykov <g.balykov@samsung.com>
+Date: Wed, 21 Jun 2017 20:53:41 +0300
+Subject: [PATCH 20/32] Add FixupPlainOrRelativePointerField for MethodDesc
+ fields
+
+---
+ src/vm/method.cpp | 18 ++----------------
+ 1 file changed, 2 insertions(+), 16 deletions(-)
+
+diff --git a/src/vm/method.cpp b/src/vm/method.cpp
+index 1407264..6bd49fb 100644
+--- a/src/vm/method.cpp
++++ b/src/vm/method.cpp
+@@ -3651,14 +3651,7 @@ MethodDesc::Fixup(
+ }
+ }
+
+- if (decltype(InstantiatedMethodDesc::m_pPerInstInfo)::isRelative)
+- {
+- image->FixupRelativePointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo));
+- }
+- else
+- {
+- image->FixupPointerField(this, offsetof(InstantiatedMethodDesc, m_pPerInstInfo));
+- }
++ image->FixupPlainOrRelativePointerField((InstantiatedMethodDesc*) this, &InstantiatedMethodDesc::m_pPerInstInfo);
+
+ // Generic methods are dealt with specially to avoid encoding the formal method type parameters
+ if (IsTypicalMethodDefinition())
+@@ -3737,14 +3730,7 @@ MethodDesc::Fixup(
+
+ NDirectMethodDesc *pNMD = (NDirectMethodDesc *)this;
+
+- if (decltype(NDirectMethodDesc::ndirect.m_pWriteableData)::isRelative)
+- {
+- image->FixupRelativePointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData));
+- }
+- else
+- {
+- image->FixupPointerField(this, offsetof(NDirectMethodDesc, ndirect.m_pWriteableData));
+- }
++ image->FixupPlainOrRelativePointerField(pNMD, &NDirectMethodDesc::ndirect, &decltype(NDirectMethodDesc::ndirect)::m_pWriteableData);
+
+ NDirectWriteableData *pWriteableData = pNMD->GetWriteableData();
+ NDirectImportThunkGlue *pImportThunkGlue = pNMD->GetNDirectImportThunkGlue();
+--
+2.7.4
+