Index: src/frames.h |
diff --git a/src/frames.h b/src/frames.h |
index 1142ed5a82cd9775e06f09bec3db25cd0bd5ab83..d5ce9b3df83097176d9b633e330c810b3c2ecf9d 100644 |
--- a/src/frames.h |
+++ b/src/frames.h |
@@ -88,7 +88,14 @@ |
JS_ENTRY, |
CATCH, |
FINALLY, |
+ LAST_KIND = FINALLY |
}; |
+ |
+ static const int kKindWidth = 2; |
+ STATIC_ASSERT(LAST_KIND < (1 << kKindWidth)); |
+ static const int kIndexWidth = 32 - kKindWidth; |
+ class KindField: public BitField<StackHandler::Kind, 0, kKindWidth> {}; |
+ class IndexField: public BitField<unsigned, kKindWidth, kIndexWidth> {}; |
// Get the address of this stack handler. |
inline Address address() const; |
@@ -107,7 +114,13 @@ |
// Accessors. |
inline Context* context() const; |
- inline int index() const; |
+ inline Kind kind() const; |
+ inline unsigned index() const; |
+ |
+ // Testers. |
+ inline bool is_js_entry() const; |
+ inline bool is_catch() const; |
+ inline bool is_finally() const; |
// Generator support to preserve stack handlers. |
void Unwind(Isolate* isolate, FixedArray* array, int offset, |