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

Unified Diff: src/frames.h

Issue 10910161: Partial ia32 implementation of optimized try/catch (by Kevin Millikin) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fixed build. Created 8 years, 3 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/flag-definitions.h ('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 30f7e1f00e552575295b074b08d5bb4396461cbb..76d4991a020d45dc3c380b55542b37ea068f76de 100644
--- a/src/frames.h
+++ b/src/frames.h
@@ -86,14 +86,19 @@ class InnerPointerToCodeCache {
class StackHandler BASE_EMBEDDED {
public:
+ // Generated code in MacroAssembler::Throw relies on the bit patterns of
+ // the Kinds. Low-order bit determines if the handler is for optimized
+ // code.
enum Kind {
- JS_ENTRY,
- CATCH,
+ JS_ENTRY, // Non-optimized.
+ CATCH = 2, // Non-optimized,
+ OPTIMIZED_CATCH,
FINALLY,
LAST_KIND = FINALLY
};
+ static const int kIsOptimizedMask = 1;
- static const int kKindWidth = 2;
+ static const int kKindWidth = 3;
STATIC_ASSERT(LAST_KIND < (1 << kKindWidth));
static const int kIndexWidth = 32 - kKindWidth;
class KindField: public BitField<StackHandler::Kind, 0, kKindWidth> {};
@@ -105,6 +110,9 @@ class StackHandler BASE_EMBEDDED {
// Get the next stack handler in the chain.
inline StackHandler* next() const;
+ inline Code* code() const;
+ inline int index() const;
+
// Tells whether the given address is inside this handler.
inline bool includes(Address address) const;
@@ -118,6 +126,7 @@ class StackHandler BASE_EMBEDDED {
inline bool is_js_entry() const;
inline bool is_catch() const;
inline bool is_finally() const;
+ inline bool is_optimized() const;
private:
// Accessors.
« no previous file with comments | « src/flag-definitions.h ('k') | src/frames.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698