Index: src/frames.h |
diff --git a/src/frames.h b/src/frames.h |
index 674d7daeca2bc27c29081eaff2e8dcff464df4fd..cb3094eb8fd24677a7e85722247dcb6bf31201e2 100644 |
--- a/src/frames.h |
+++ b/src/frames.h |
@@ -183,6 +183,8 @@ class InterpreterFrameConstants : public AllStatic { |
StandardFrameConstants::kFixedFrameSizeFromFp + 2 * kPointerSize; |
// FP-relative. |
+ static const int kBytecodeOffsetFromFp = |
+ -StandardFrameConstants::kFixedFrameSizeFromFp - 2 * kPointerSize; |
static const int kRegisterFilePointerFromFp = |
-StandardFrameConstants::kFixedFrameSizeFromFp - 3 * kPointerSize; |
@@ -249,6 +251,7 @@ class StackFrame BASE_EMBEDDED { |
bool is_entry_construct() const { return type() == ENTRY_CONSTRUCT; } |
bool is_exit() const { return type() == EXIT; } |
bool is_optimized() const { return type() == OPTIMIZED; } |
+ bool is_interpreted() const { return type() == INTERPRETED; } |
bool is_arguments_adaptor() const { return type() == ARGUMENTS_ADAPTOR; } |
bool is_internal() const { return type() == INTERNAL; } |
bool is_stub_failure_trampoline() const { |
@@ -711,8 +714,21 @@ class OptimizedFrame : public JavaScriptFrame { |
class InterpretedFrame : public JavaScriptFrame { |
+ public: |
Type type() const override { return INTERPRETED; } |
+ // Lookup exception handler for current {pc}, returns -1 if none found. Also |
+ // returns the expected number of stack slots at the handler site. |
+ int LookupExceptionHandlerInTable( |
+ int* stack_slots, HandlerTable::CatchPrediction* prediction) override; |
+ |
+ // Returns the current offset into the bytecode stream. |
+ int GetBytecodeOffset() const; |
+ |
+ // Updates the current offset into the bytecode stream, mainly used for stack |
+ // unwinding to continue execution at a different bytecode offset. |
+ void PatchBytecodeOffset(int new_offset); |
+ |
protected: |
inline explicit InterpretedFrame(StackFrameIteratorBase* iterator); |