diff options
Diffstat (limited to 'runtime/java_frame_root_info.h')
-rw-r--r-- | runtime/java_frame_root_info.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/runtime/java_frame_root_info.h b/runtime/java_frame_root_info.h index 8141ea24fd..c21eee1b32 100644 --- a/runtime/java_frame_root_info.h +++ b/runtime/java_frame_root_info.h @@ -18,6 +18,7 @@ #define ART_RUNTIME_JAVA_FRAME_ROOT_INFO_H_ #include <iosfwd> +#include <limits> #include "base/locks.h" #include "base/macros.h" @@ -29,6 +30,20 @@ class StackVisitor; class JavaFrameRootInfo final : public RootInfo { public: + static_assert(std::numeric_limits<size_t>::max() > std::numeric_limits<uint16_t>::max(), + "No extra space in vreg to store meta-data"); + // Unable to determine what register number the root is from. + static constexpr size_t kUnknownVreg = -1; + // The register number for the root might be determinable but we did not attempt to find that + // information. + static constexpr size_t kImpreciseVreg = -2; + // The root is from the declaring class of the current method. + static constexpr size_t kMethodDeclaringClass = -3; + // The root is from the argument to a Proxy invoke. + static constexpr size_t kProxyReferenceArgument = -4; + // The maximum precise vreg number + static constexpr size_t kMaxVReg = std::numeric_limits<uint16_t>::max(); + JavaFrameRootInfo(uint32_t thread_id, const StackVisitor* stack_visitor, size_t vreg) : RootInfo(kRootJavaFrame, thread_id), stack_visitor_(stack_visitor), vreg_(vreg) { } |