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

Unified Diff: src/frames.h

Issue 20680002: Rebase of partial ia32 implementation of optimized try/catch (started by Kevin Millikin, continued … (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix detection of CATCH frames (fixes debuger exception reporting anf breaks another assertion...). Created 7 years, 5 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 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;
« 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