Index: src/debug.h |
diff --git a/src/debug.h b/src/debug.h |
index 7ec78015c6d2d65794b8f0f299444ccf570683b2..500fae297d8b77b8a35fa061e7c7d28115964547 100644 |
--- a/src/debug.h |
+++ b/src/debug.h |
@@ -457,6 +457,49 @@ class Debug { |
// Architecture-specific constant. |
static const bool kFrameDropperSupported; |
+ /** |
+ * Defines layout of a stack frame that supports padding. This is a regular |
+ * internal frame that has a flexible stack structure. LiveEdit can shift |
+ * its lower part up the stack, taking up the 'padding' space when additional |
+ * stack memory is required. |
+ * Such frame is expected immediately above the topmost JavaScript frame. |
+ * |
+ * Stack Layout: |
+ * --- Top |
+ * LiveEdit routine frames |
+ * --- |
+ * C frames of debug handler |
+ * --- |
+ * ... |
+ * --- |
+ * An internal frame that has n padding words: |
+ * - any number of words as needed by code -- upper part of frame |
+ * - padding size: a word storing n*2, n -- current size of padding |
+ * - padding: n words filled with kPaddingValue |
+ * - 3 context/type words of a regular InternalFrame |
+ * - fp |
+ * --- |
+ * Topmost JavaScript frame |
+ * --- |
+ * ... |
+ * --- Bottom |
+ */ |
+ struct FramePaddingLayout { |
Yang
2012/05/02 11:38:34
we would typically define this as a class deriving
Peter Rybin
2012/05/02 23:58:20
Done.
|
+ // Architecture-specific constant. |
+ static const bool kIsSupported; |
+ |
+ // A size of frame base including fp. Padding words starts right above |
+ // the base. |
+ static const int kFrameBaseSize = 4; |
Yang
2012/05/02 11:38:34
This coincides with Debug::kFrameDropperFrameSize,
Peter Rybin
2012/05/02 23:58:20
I'm not sure. Both are derived from the fact that
|
+ |
+ // A number of words that should be reserved on stack for the LiveEdit use. |
+ // Normally equals 1. |
+ static const int kInitialSize; |
+ // A value that padding words are filled with. Going bottom-top, the first |
+ // word not having this value is a counter word. |
+ static const int kPaddingValue; |
+ }; |
+ |
private: |
explicit Debug(Isolate* isolate); |
~Debug(); |