Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Unified Diff: src/frames.h

Issue 1009903002: Revert of Remove kind field from StackHandler. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/debug.cc ('k') | src/frames.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/debug.cc ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698