OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
450 // at this address (possibly updated by GC) may be used later when preparing | 450 // at this address (possibly updated by GC) may be used later when preparing |
451 // 'step in' operation. | 451 // 'step in' operation. |
452 static Object** SetUpFrameDropperFrame(StackFrame* bottom_js_frame, | 452 static Object** SetUpFrameDropperFrame(StackFrame* bottom_js_frame, |
453 Handle<Code> code); | 453 Handle<Code> code); |
454 | 454 |
455 static const int kFrameDropperFrameSize; | 455 static const int kFrameDropperFrameSize; |
456 | 456 |
457 // Architecture-specific constant. | 457 // Architecture-specific constant. |
458 static const bool kFrameDropperSupported; | 458 static const bool kFrameDropperSupported; |
459 | 459 |
460 /** | |
461 * Defines layout of a stack frame that supports padding. This is a regular | |
462 * internal frame that has a flexible stack structure. LiveEdit can shift | |
463 * its lower part up the stack, taking up the 'padding' space when additional | |
464 * stack memory is required. | |
465 * Such frame is expected immediately above the topmost JavaScript frame. | |
466 * | |
467 * Stack Layout: | |
468 * --- Top | |
469 * LiveEdit routine frames | |
470 * --- | |
471 * C frames of debug handler | |
472 * --- | |
473 * ... | |
474 * --- | |
475 * An internal frame that has n padding words: | |
476 * - any number of words as needed by code -- upper part of frame | |
477 * - padding size: a word storing n*2, n -- current size of padding | |
478 * - padding: n words filled with kPaddingValue | |
479 * - 3 context/type words of a regular InternalFrame | |
480 * - fp | |
481 * --- | |
482 * Topmost JavaScript frame | |
483 * --- | |
484 * ... | |
485 * --- Bottom | |
486 */ | |
487 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.
| |
488 // Architecture-specific constant. | |
489 static const bool kIsSupported; | |
490 | |
491 // A size of frame base including fp. Padding words starts right above | |
492 // the base. | |
493 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
| |
494 | |
495 // A number of words that should be reserved on stack for the LiveEdit use. | |
496 // Normally equals 1. | |
497 static const int kInitialSize; | |
498 // A value that padding words are filled with. Going bottom-top, the first | |
499 // word not having this value is a counter word. | |
500 static const int kPaddingValue; | |
501 }; | |
502 | |
460 private: | 503 private: |
461 explicit Debug(Isolate* isolate); | 504 explicit Debug(Isolate* isolate); |
462 ~Debug(); | 505 ~Debug(); |
463 | 506 |
464 static bool CompileDebuggerScript(int index); | 507 static bool CompileDebuggerScript(int index); |
465 void ClearOneShot(); | 508 void ClearOneShot(); |
466 void ActivateStepIn(StackFrame* frame); | 509 void ActivateStepIn(StackFrame* frame); |
467 void ClearStepIn(); | 510 void ClearStepIn(); |
468 void ActivateStepOut(StackFrame* frame); | 511 void ActivateStepOut(StackFrame* frame); |
469 void ClearStepNext(); | 512 void ClearStepNext(); |
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
985 | 1028 |
986 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1029 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
987 }; | 1030 }; |
988 | 1031 |
989 | 1032 |
990 } } // namespace v8::internal | 1033 } } // namespace v8::internal |
991 | 1034 |
992 #endif // ENABLE_DEBUGGER_SUPPORT | 1035 #endif // ENABLE_DEBUGGER_SUPPORT |
993 | 1036 |
994 #endif // V8_DEBUG_H_ | 1037 #endif // V8_DEBUG_H_ |
OLD | NEW |