| 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 Smi storing n -- current size of padding |
| 478 * - padding: n words filled with kPaddingValue in form of Smi |
| 479 * - 3 context/type words of a regular InternalFrame |
| 480 * - fp |
| 481 * --- |
| 482 * Topmost JavaScript frame |
| 483 * --- |
| 484 * ... |
| 485 * --- Bottom |
| 486 */ |
| 487 class FramePaddingLayout : public AllStatic { |
| 488 public: |
| 489 // Architecture-specific constant. |
| 490 static const bool kIsSupported; |
| 491 |
| 492 // A size of frame base including fp. Padding words starts right above |
| 493 // the base. |
| 494 static const int kFrameBaseSize = 4; |
| 495 |
| 496 // A number of words that should be reserved on stack for the LiveEdit use. |
| 497 // Normally equals 1. Stored on stack in form of Smi. |
| 498 static const int kInitialSize; |
| 499 // A value that padding words are filled with (in form of Smi). Going |
| 500 // bottom-top, the first word not having this value is a counter word. |
| 501 static const int kPaddingValue; |
| 502 }; |
| 503 |
| 460 private: | 504 private: |
| 461 explicit Debug(Isolate* isolate); | 505 explicit Debug(Isolate* isolate); |
| 462 ~Debug(); | 506 ~Debug(); |
| 463 | 507 |
| 464 static bool CompileDebuggerScript(int index); | 508 static bool CompileDebuggerScript(int index); |
| 465 void ClearOneShot(); | 509 void ClearOneShot(); |
| 466 void ActivateStepIn(StackFrame* frame); | 510 void ActivateStepIn(StackFrame* frame); |
| 467 void ClearStepIn(); | 511 void ClearStepIn(); |
| 468 void ActivateStepOut(StackFrame* frame); | 512 void ActivateStepOut(StackFrame* frame); |
| 469 void ClearStepNext(); | 513 void ClearStepNext(); |
| (...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 985 | 1029 |
| 986 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); | 1030 DISALLOW_COPY_AND_ASSIGN(MessageDispatchHelperThread); |
| 987 }; | 1031 }; |
| 988 | 1032 |
| 989 | 1033 |
| 990 } } // namespace v8::internal | 1034 } } // namespace v8::internal |
| 991 | 1035 |
| 992 #endif // ENABLE_DEBUGGER_SUPPORT | 1036 #endif // ENABLE_DEBUGGER_SUPPORT |
| 993 | 1037 |
| 994 #endif // V8_DEBUG_H_ | 1038 #endif // V8_DEBUG_H_ |
| OLD | NEW |