diff options
author | Calin Juravle <calin@google.com> | 2015-03-18 16:31:28 +0000 |
---|---|---|
committer | Calin Juravle <calin@google.com> | 2015-03-25 13:50:23 +0000 |
commit | 6ae70962089e4af9718cc9b7c2b79a0c501c1844 (patch) | |
tree | 3b7cd46ed7c7bab95dc258a29883297738138f6c /runtime/stack_map.h | |
parent | 2f5904383a7b7ffb741c8839ec3c60762860bad3 (diff) | |
download | art-6ae70962089e4af9718cc9b7c2b79a0c501c1844.tar.gz art-6ae70962089e4af9718cc9b7c2b79a0c501c1844.tar.bz2 art-6ae70962089e4af9718cc9b7c2b79a0c501c1844.zip |
Share dex register maps between stack maps when possible.
If two stack maps have the same dex register map then one of them will
reference the register map from the other instead of owning an
independent copy.
This saves around 1.5% of space.
Change-Id: Ic2c2c81210c6c45a5c5f650f7ba82a46ff6f45e4
Diffstat (limited to 'runtime/stack_map.h')
-rw-r--r-- | runtime/stack_map.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/runtime/stack_map.h b/runtime/stack_map.h index 629fc9a34..6ec7cc852 100644 --- a/runtime/stack_map.h +++ b/runtime/stack_map.h @@ -212,6 +212,14 @@ class DexRegisterLocation { // Get the actual kind of the location. Kind GetInternalKind() const { return kind_; } + bool operator==(DexRegisterLocation other) const { + return kind_ == other.kind_ && value_ == other.value_; + } + + bool operator!=(DexRegisterLocation other) const { + return !(*this == other); + } + private: Kind kind_; int32_t value_; |