From 4717175e40a19e79af904dfb7b7dd13f046debd7 Mon Sep 17 00:00:00 2001
From: Nicolas Geoffray <ngeoffray@google.com>
Date: Mon, 31 Aug 2020 15:03:20 +0100
Subject: Move code item to the data pointer and remove code_item_offset.

This saves 4 bytes on 32bit and 8 bytes on 64bit on ArtMethod.

Also update nterp to directly fetch the code item from the data pointer.

Test: test.py
Bug: 112676029

Change-Id: Ic01f43c7ccf2cbce1ec517478e81362232d36371
---
 tools/cpp-define-generator/art_method.def | 4 ++++
 1 file changed, 4 insertions(+)

(limited to 'tools/cpp-define-generator/art_method.def')

diff --git a/tools/cpp-define-generator/art_method.def b/tools/cpp-define-generator/art_method.def
index 75fbab0c28..097d4662e1 100644
--- a/tools/cpp-define-generator/art_method.def
+++ b/tools/cpp-define-generator/art_method.def
@@ -28,6 +28,10 @@ ASM_DEFINE(ART_METHOD_JNI_OFFSET_32,
            art::ArtMethod::EntryPointFromJniOffset(art::PointerSize::k32).Int32Value())
 ASM_DEFINE(ART_METHOD_JNI_OFFSET_64,
            art::ArtMethod::EntryPointFromJniOffset(art::PointerSize::k64).Int32Value())
+ASM_DEFINE(ART_METHOD_DATA_OFFSET_32,
+           art::ArtMethod::DataOffset(art::PointerSize::k32).Int32Value())
+ASM_DEFINE(ART_METHOD_DATA_OFFSET_64,
+           art::ArtMethod::DataOffset(art::PointerSize::k64).Int32Value())
 ASM_DEFINE(ART_METHOD_QUICK_CODE_OFFSET_32,
            art::ArtMethod::EntryPointFromQuickCompiledCodeOffset(art::PointerSize::k32).Int32Value())
 ASM_DEFINE(ART_METHOD_QUICK_CODE_OFFSET_64,
-- 
cgit v1.2.3-59-g8ed1b

