| Index: src/liveedit.h
|
| diff --git a/src/liveedit.h b/src/liveedit.h
|
| index b22d01ae4a2c8dbc6b13a4daccf9ac66f3aefe94..fed4b4d105320c4a9fe24986139f45265a9d1ffb 100644
|
| --- a/src/liveedit.h
|
| +++ b/src/liveedit.h
|
| @@ -122,6 +122,63 @@ class LiveEdit : AllStatic {
|
| // of diff chunks.
|
| static Handle<JSArray> CompareStrings(Handle<String> s1,
|
| Handle<String> s2);
|
| +
|
| + // 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 Smi storing n -- current size of padding
|
| + * - padding: n words filled with kPaddingValue in form of Smi
|
| + * - 3 context/type words of a regular InternalFrame
|
| + * - fp
|
| + * ---
|
| + * Topmost JavaScript frame
|
| + * ---
|
| + * ...
|
| + * --- Bottom
|
| + */
|
| + // A size of frame base including fp. Padding words starts right above
|
| + // the base.
|
| + static const int kFrameDropperFrameSize = 4;
|
| + // A number of words that should be reserved on stack for the LiveEdit use.
|
| + // Stored on stack in form of Smi.
|
| + static const int kFramePaddingInitialSize = 1;
|
| + // A value that padding words are filled with (in form of Smi). Going
|
| + // bottom-top, the first word not having this value is a counter word.
|
| + static const int kFramePaddingValue = kFramePaddingInitialSize + 1;
|
| +
|
| +
|
| + // Describes how exactly a frame has been dropped from stack.
|
| + enum FrameDropMode {
|
| + // No frame has been dropped.
|
| + FRAMES_UNTOUCHED,
|
| + // The top JS frame had been calling IC stub. IC stub mustn't be called now.
|
| + FRAME_DROPPED_IN_IC_CALL,
|
| + // The top JS frame had been calling debug break slot stub. Patch the
|
| + // address this stub jumps to in the end.
|
| + FRAME_DROPPED_IN_DEBUG_SLOT_CALL,
|
| + // The top JS frame had been calling some C++ function. The return address
|
| + // gets patched automatically.
|
| + FRAME_DROPPED_IN_DIRECT_CALL,
|
| + FRAME_DROPPED_IN_RETURN_CALL,
|
| + CURRENTLY_SET_MODE
|
| + };
|
| };
|
|
|
|
|
|
|