summaryrefslogtreecommitdiff
path: root/runtime/dex/standard_dex_file.h
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/dex/standard_dex_file.h')
-rw-r--r--runtime/dex/standard_dex_file.h22
1 files changed, 21 insertions, 1 deletions
diff --git a/runtime/dex/standard_dex_file.h b/runtime/dex/standard_dex_file.h
index 819b721ce9..6437def4f5 100644
--- a/runtime/dex/standard_dex_file.h
+++ b/runtime/dex/standard_dex_file.h
@@ -36,7 +36,27 @@ class StandardDexFile : public DexFile {
static constexpr size_t kAlignment = 4;
private:
- // TODO: Insert standard dex specific fields here.
+ CodeItem() = default;
+
+ uint16_t registers_size_; // the number of registers used by this code
+ // (locals + parameters)
+ uint16_t ins_size_; // the number of words of incoming arguments to the method
+ // that this code is for
+ uint16_t outs_size_; // the number of words of outgoing argument space required
+ // by this code for method invocation
+ uint16_t tries_size_; // the number of try_items for this instance. If non-zero,
+ // then these appear as the tries array just after the
+ // insns in this instance.
+ uint32_t debug_info_off_; // Holds file offset to debug info stream.
+
+ uint32_t insns_size_in_code_units_; // size of the insns array, in 2 byte code units
+ uint16_t insns_[1]; // actual array of bytecode.
+
+ ART_FRIEND_TEST(CodeItemAccessorsTest, TestDexInstructionsAccessor);
+ friend class CodeItemDataAccessor;
+ friend class CodeItemDebugInfoAccessor;
+ friend class CodeItemInstructionAccessor;
+ friend class DexWriter;
friend class StandardDexFile;
DISALLOW_COPY_AND_ASSIGN(CodeItem);
};