From 50fac06c51864f293c61ff9d0983b82698cf6dac Mon Sep 17 00:00:00 2001 From: David Srbecky Date: Wed, 13 Jun 2018 18:55:35 +0100 Subject: Add Kind column to stack maps. Add 'Kind' column to stack maps which marks special stack map types, and use it at run-time to add extra sanity checks. It will also allow us to binary search the stack maps. The column increases .oat file by 0.2%. Test: test-art-host-gtest-stack_map_test Change-Id: I2a9143afa0e32bb06174604ca81a64c41fed232f --- compiler/optimizing/stack_map_stream.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'compiler/optimizing/stack_map_stream.h') diff --git a/compiler/optimizing/stack_map_stream.h b/compiler/optimizing/stack_map_stream.h index 02fb6cb434..06868476bc 100644 --- a/compiler/optimizing/stack_map_stream.h +++ b/compiler/optimizing/stack_map_stream.h @@ -27,11 +27,10 @@ #include "dex_register_location.h" #include "method_info.h" #include "nodes.h" +#include "stack_map.h" namespace art { -class CodeInfo; - /** * Collects and builds stack maps for a method. All the stack maps * for a method are placed in a CodeInfo object. @@ -66,7 +65,8 @@ class StackMapStream : public ValueObject { uint32_t register_mask, BitVector* sp_mask, uint32_t num_dex_registers, - uint8_t inlining_depth); + uint8_t inlining_depth, + StackMap::Kind kind = StackMap::Kind::Default); void EndStackMapEntry(); void AddDexRegisterEntry(DexRegisterLocation::Kind kind, int32_t value); @@ -99,6 +99,7 @@ class StackMapStream : public ValueObject { // The fields must be uint32_t and mirror the StackMap accessor in stack_map.h! struct StackMapEntry { + uint32_t kind; uint32_t packed_native_pc; uint32_t dex_pc; uint32_t register_mask_index; -- cgit v1.2.3-59-g8ed1b