summaryrefslogtreecommitdiff
path: root/compiler/optimizing/stack_map_stream.h
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2018-06-13 18:55:35 +0100
committerDavid Srbecky <dsrbecky@google.com>2018-06-13 19:03:09 +0100
commit50fac06c51864f293c61ff9d0983b82698cf6dac (patch)
tree7f7d09fa8aeacf4b5a255085af02970347a54cd0 /compiler/optimizing/stack_map_stream.h
parent86decb6a3e3ebba8c3c67bfd25c12d9a85794f65 (diff)
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
Diffstat (limited to 'compiler/optimizing/stack_map_stream.h')
-rw-r--r--compiler/optimizing/stack_map_stream.h7
1 files changed, 4 insertions, 3 deletions
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;