| Index: src/frames.h
|
| diff --git a/src/frames.h b/src/frames.h
|
| index 1142ed5a82cd9775e06f09bec3db25cd0bd5ab83..397c7b5db9cf7f912d7c3fe53a9392141b913ae2 100644
|
| --- a/src/frames.h
|
| +++ b/src/frames.h
|
| @@ -66,57 +66,34 @@ class InnerPointerToCodeCache {
|
| };
|
|
|
|
|
| +// Every try-block pushes the context register.
|
| +class TryBlockConstant : public AllStatic {
|
| + public:
|
| + static const int kElementCount = 1;
|
| +};
|
| +
|
| +
|
| class StackHandlerConstants : public AllStatic {
|
| public:
|
| - static const int kNextOffset = 0 * kPointerSize;
|
| - static const int kStateOffset = 1 * kPointerSize;
|
| -#if V8_TARGET_LITTLE_ENDIAN || !V8_HOST_ARCH_64_BIT
|
| - static const int kStateIntOffset = kStateOffset;
|
| -#else
|
| - static const int kStateIntOffset = kStateOffset + kIntSize;
|
| -#endif
|
| - static const int kContextOffset = 2 * kPointerSize;
|
| + static const int kNextOffset = 0 * kPointerSize;
|
|
|
| - static const int kSize = kContextOffset + kPointerSize;
|
| + static const int kSize = kNextOffset + kPointerSize;
|
| static const int kSlotCount = kSize >> kPointerSizeLog2;
|
| };
|
|
|
|
|
| class StackHandler BASE_EMBEDDED {
|
| public:
|
| - enum Kind {
|
| - JS_ENTRY,
|
| - CATCH,
|
| - FINALLY,
|
| - };
|
| -
|
| // Get the address of this stack handler.
|
| inline Address address() const;
|
|
|
| // Get the next stack handler in the chain.
|
| inline StackHandler* next() const;
|
|
|
| - // Tells whether the given address is inside this handler.
|
| - inline bool includes(Address address) const;
|
| -
|
| - // Garbage collection support.
|
| - inline void Iterate(ObjectVisitor* v, Code* holder) const;
|
| -
|
| // Conversion support.
|
| static inline StackHandler* FromAddress(Address address);
|
|
|
| - // Accessors.
|
| - inline Context* context() const;
|
| - inline int index() const;
|
| -
|
| - // Generator support to preserve stack handlers.
|
| - void Unwind(Isolate* isolate, FixedArray* array, int offset,
|
| - int previous_handler_offset) const;
|
| - int Rewind(Isolate* isolate, FixedArray* array, int offset, Address fp);
|
| -
|
| private:
|
| - inline Object** context_address() const;
|
| -
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(StackHandler);
|
| };
|
|
|
| @@ -256,9 +233,6 @@ class StackFrame BASE_EMBEDDED {
|
| // Get the id of this stack frame.
|
| Id id() const { return static_cast<Id>(OffsetFrom(caller_sp())); }
|
|
|
| - // Checks if this frame includes any stack handlers.
|
| - bool HasHandler() const;
|
| -
|
| // Get the top handler from the current stack iterator.
|
| inline StackHandler* top_handler() const;
|
|
|
| @@ -483,10 +457,6 @@ class StandardFrame: public StackFrame {
|
| Address GetExpressionAddress(int n) const;
|
| static Address GetExpressionAddress(Address fp, int n);
|
|
|
| - // Determines if the n'th expression stack element is in a stack
|
| - // handler or not. Requires traversing all handlers in this frame.
|
| - bool IsExpressionInsideHandler(int n) const;
|
| -
|
| // Determines if the standard frame for the given frame pointer is
|
| // an arguments adaptor frame.
|
| static inline bool IsArgumentsAdaptorFrame(Address fp);
|
| @@ -555,9 +525,9 @@ class JavaScriptFrame: public StandardFrame {
|
| inline Object* GetOperand(int index) const;
|
| inline int ComputeOperandsCount() const;
|
|
|
| - // Generator support to preserve operand stack and stack handlers.
|
| - void SaveOperandStack(FixedArray* store, int* stack_handler_index) const;
|
| - void RestoreOperandStack(FixedArray* store, int stack_handler_index);
|
| + // Generator support to preserve operand stack.
|
| + void SaveOperandStack(FixedArray* store) const;
|
| + void RestoreOperandStack(FixedArray* store);
|
|
|
| // Debugger access.
|
| void SetParameterValue(int index, Object* value) const;
|
| @@ -591,6 +561,10 @@ class JavaScriptFrame: public StandardFrame {
|
| // Build a list with summaries for this frame including all inlined frames.
|
| virtual void Summarize(List<FrameSummary>* frames);
|
|
|
| + // Lookup exception handler for current {pc}, returns -1 if none found. Also
|
| + // returns the expected number of stack slots at the handler site.
|
| + virtual int LookupExceptionHandlerInTable(int* stack_slots);
|
| +
|
| // Architecture-specific register description.
|
| static Register fp_register();
|
| static Register context_register();
|
| @@ -663,6 +637,10 @@ class OptimizedFrame : public JavaScriptFrame {
|
|
|
| virtual void Summarize(List<FrameSummary>* frames);
|
|
|
| + // Lookup exception handler for current {pc}, returns -1 if none found. Also
|
| + // returns the expected number of stack slots at the handler site.
|
| + virtual int LookupExceptionHandlerInTable(int* stack_slots);
|
| +
|
| DeoptimizationInputData* GetDeoptimizationData(int* deopt_index);
|
|
|
| protected:
|
|
|