diff options
author | Konstantin Baladurin <k.baladurin@partner.samsung.com> | 2018-04-26 17:34:58 +0300 |
---|---|---|
committer | Vladislav Andresov <v.andresov@partner.samsung.com> | 2018-04-26 20:04:15 +0300 |
commit | 371df401e4d8c9639035d164710d1246e0cb8548 (patch) | |
tree | b550f3433a68c80a1ff952413b7b7a0e3ab97995 /packaging/0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch | |
parent | 5e7a310b1a251937154d05cd52637ac62b6d5edc (diff) | |
download | coreclr-accepted/tizen_4.0_unified.tar.gz coreclr-accepted/tizen_4.0_unified.tar.bz2 coreclr-accepted/tizen_4.0_unified.zip |
Add memory optimization patches from upstreamsubmit/tizen_4.0/20180427.011218accepted/tizen/4.0/unified/20180427.062437accepted/tizen_4.0_unified
Change-Id: Ie8ea75fa60184b77135289c8fdc0f49d40b49d87
Diffstat (limited to 'packaging/0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch')
-rw-r--r-- | packaging/0020-Add-FixupPlainOrRelativePointerField-for-MethodDesc-.patch | 49 |
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 0000000000..91b0639ea9 --- /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 + |