Index: src/frames.h |
diff --git a/src/frames.h b/src/frames.h |
index 678191b950a0172a37f62a78fb9533f977502613..7b34bac49ba2c4bbe7a80fbd74720c78e1fbe560 100644 |
--- a/src/frames.h |
+++ b/src/frames.h |
@@ -107,7 +107,7 @@ class StackHandler BASE_EMBEDDED { |
static const int kKindWidth = 2; |
STATIC_ASSERT(LAST_KIND < (1 << kKindWidth)); |
- static const int kIndexWidth = 32 - kKindWidth; |
+ static const int kIndexWidth = 32 - kSmiTagSize - kKindWidth; |
class KindField: public BitField<StackHandler::Kind, 0, kKindWidth> {}; |
class IndexField: public BitField<unsigned, kKindWidth, kIndexWidth> {}; |
@@ -131,6 +131,13 @@ class StackHandler BASE_EMBEDDED { |
inline bool is_catch() const; |
inline bool is_finally() const; |
+ // Helpers to allow generators to capture and restore an activation's stack |
+ // handlers. |
Michael Starzinger
2013/05/07 09:55:44
nit: How about shortening the comment to just "Gen
|
+ void Unwind(Isolate* isolate, FixedArray* array, int offset, |
+ Object *data) const; |
Michael Starzinger
2013/05/07 09:55:44
Can we make "data" to be of type Smi? That would b
|
+ Object* Rewind(Isolate* isolate, FixedArray* array, int offset, |
+ Address fp); |
Michael Starzinger
2013/05/07 09:55:44
nit: Should fit into one line.
|
+ |
private: |
// Accessors. |
inline Kind kind() const; |
@@ -541,6 +548,9 @@ class JavaScriptFrame: public StandardFrame { |
inline Object* GetOperand(int index) const; |
inline int ComputeOperandsCount() const; |
+ void SaveOperandStack(FixedArray* store, int* stack_handler_index) const; |
Michael Starzinger
2013/05/07 09:55:44
nit: Maybe add a one-liner comment "Generator supp
|
+ void RestoreOperandStack(FixedArray* store, int stack_handler_index); |
+ |
// Debugger access. |
void SetParameterValue(int index, Object* value) const; |