diff options
author | Dmitry Petrochenko <dmitry.petrochenko@intel.com> | 2014-03-31 09:12:31 +0700 |
---|---|---|
committer | Dmitry Petrochenko <dmitry.petrochenko@intel.com> | 2014-04-01 10:24:51 +0700 |
commit | f0513c591271f93df76c46d672eed4a00cd4184b (patch) | |
tree | f1648f9a920218bb74bdd81b230a0f71055ffa12 /runtime/stack_indirect_reference_table.h | |
parent | 81ed34e686532cebc1e17a273110decf0dd24e81 (diff) | |
download | art-f0513c591271f93df76c46d672eed4a00cd4184b.zip art-f0513c591271f93df76c46d672eed4a00cd4184b.tar.gz art-f0513c591271f93df76c46d672eed4a00cd4184b.tar.bz2 |
art: Make calling convention immune to SIRT structure change
Introduce stack_indirect_reference_table::referencesOffset and
rely on it in calling convention to avoid issues if SIRT structure
change.
Change-Id: Icc0c5c5b1313173df2ee519ab8934183074fdfb6
Signed-off-by: Dmitry Petrochenko <dmitry.petrochenko@intel.com>
Diffstat (limited to 'runtime/stack_indirect_reference_table.h')
-rw-r--r-- | runtime/stack_indirect_reference_table.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/runtime/stack_indirect_reference_table.h b/runtime/stack_indirect_reference_table.h index e6dda85..daef3ff 100644 --- a/runtime/stack_indirect_reference_table.h +++ b/runtime/stack_indirect_reference_table.h @@ -98,14 +98,19 @@ class StackIndirectReferenceTable { && (sirt_entry <= (&references_[number_of_references_ - 1]))); } + // Offset of link within SIRT, used by generated code + static size_t LinkOffset() { + return OFFSETOF_MEMBER(StackIndirectReferenceTable, link_); + } + // Offset of length within SIRT, used by generated code static uint32_t NumberOfReferencesOffset() { return OFFSETOF_MEMBER(StackIndirectReferenceTable, number_of_references_); } // Offset of link within SIRT, used by generated code - static size_t LinkOffset() { - return OFFSETOF_MEMBER(StackIndirectReferenceTable, link_); + static size_t ReferencesOffset() { + return OFFSETOF_MEMBER(StackIndirectReferenceTable, references_); } private: |