diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-07-10 10:56:40 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-07-13 09:24:30 +0000 |
commit | dbda04fc786d29382b712a26a8ee47e0ace13c25 (patch) | |
tree | b7f00537a9e45ea37a7e04b94c4bcf2c26318e0a /runtime/stack_map.h | |
parent | ccbbda2b716bcc0dd9ad7b6c7bf9079efa3fca23 (diff) | |
download | art-dbda04fc786d29382b712a26a8ee47e0ace13c25.zip art-dbda04fc786d29382b712a26a8ee47e0ace13c25.tar.gz art-dbda04fc786d29382b712a26a8ee47e0ace13c25.tar.bz2 |
Return an invalid StackMap when none can be found.
bug:22389275
Partial cherry-pick of:
https://android-review.googlesource.com/#/c/151853
(commit e12997fbce8e22431be58cac9db2535f7b4a7ac3)
Change-Id: Ia30b817be1b50d97243ba32967eeee359ed679c4
Diffstat (limited to 'runtime/stack_map.h')
-rw-r--r-- | runtime/stack_map.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/stack_map.h b/runtime/stack_map.h index 6cc1709..71e38ff 100644 --- a/runtime/stack_map.h +++ b/runtime/stack_map.h @@ -681,8 +681,12 @@ class DexRegisterMap { */ class StackMap { public: + StackMap() {} + explicit StackMap(MemoryRegion region) : region_(region) {} + bool IsValid() const { return region_.pointer() != nullptr; } + uint32_t GetDexPc(const CodeInfo& info) const; void SetDexPc(const CodeInfo& info, uint32_t dex_pc); @@ -975,8 +979,7 @@ class CodeInfo { return stack_map; } } - LOG(FATAL) << "Unreachable"; - UNREACHABLE(); + return StackMap(); } StackMap GetStackMapForNativePcOffset(uint32_t native_pc_offset) const { @@ -987,8 +990,7 @@ class CodeInfo { return stack_map; } } - LOG(FATAL) << "Unreachable"; - UNREACHABLE(); + return StackMap(); } void Dump(std::ostream& os, uint16_t number_of_dex_registers) const; |