| Index: src/frames.h
|
| diff --git a/src/frames.h b/src/frames.h
|
| index 5c3acf2b861af6209c647e35b123df8dc39258f3..428445bc48369ae068a0b241d6819ed11b06ab21 100644
|
| --- a/src/frames.h
|
| +++ b/src/frames.h
|
| @@ -99,14 +99,19 @@ class StackHandlerConstants : public AllStatic {
|
|
|
| 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> {};
|
| @@ -118,6 +123,9 @@ class StackHandler BASE_EMBEDDED {
|
| // Get the next stack handler in the chain.
|
| inline StackHandler* next() const;
|
|
|
| + inline Code* code() const;
|
| + inline unsigned index() const;
|
| +
|
| // Tells whether the given address is inside this handler.
|
| inline bool includes(Address address) const;
|
|
|
| @@ -131,6 +139,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;
|
|
|
| // Generator support to preserve stack handlers.
|
| void Unwind(Isolate* isolate, FixedArray* array, int offset,
|
| @@ -140,7 +149,6 @@ class StackHandler BASE_EMBEDDED {
|
| private:
|
| // Accessors.
|
| inline Kind kind() const;
|
| - inline unsigned index() const;
|
|
|
| inline Object** context_address() const;
|
| inline Object** code_address() const;
|
|
|