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 1450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1461 frame_has_padding = Debug::FramePaddingLayout::kIsSupported; | 1461 frame_has_padding = Debug::FramePaddingLayout::kIsSupported; |
1462 } else if (pre_top_frame_code == | 1462 } else if (pre_top_frame_code == |
1463 isolate->debug()->debug_break_slot()) { | 1463 isolate->debug()->debug_break_slot()) { |
1464 // OK, we can drop debug break slot. | 1464 // OK, we can drop debug break slot. |
1465 *mode = Debug::FRAME_DROPPED_IN_DEBUG_SLOT_CALL; | 1465 *mode = Debug::FRAME_DROPPED_IN_DEBUG_SLOT_CALL; |
1466 frame_has_padding = Debug::FramePaddingLayout::kIsSupported; | 1466 frame_has_padding = Debug::FramePaddingLayout::kIsSupported; |
1467 } else if (pre_top_frame_code == | 1467 } else if (pre_top_frame_code == |
1468 isolate->builtins()->builtin( | 1468 isolate->builtins()->builtin( |
1469 Builtins::kFrameDropper_LiveEdit)) { | 1469 Builtins::kFrameDropper_LiveEdit)) { |
1470 // OK, we can drop our own code. | 1470 // OK, we can drop our own code. |
1471 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; | 1471 pre_top_frame = frames[top_frame_index - 2]; |
| 1472 top_frame = frames[top_frame_index - 1]; |
| 1473 *mode = Debug::CURRENTLY_SET_MODE; |
1472 frame_has_padding = false; | 1474 frame_has_padding = false; |
1473 } else if (pre_top_frame_code == | 1475 } else if (pre_top_frame_code == |
1474 isolate->builtins()->builtin(Builtins::kReturn_DebugBreak)) { | 1476 isolate->builtins()->builtin(Builtins::kReturn_DebugBreak)) { |
1475 *mode = Debug::FRAME_DROPPED_IN_RETURN_CALL; | 1477 *mode = Debug::FRAME_DROPPED_IN_RETURN_CALL; |
1476 frame_has_padding = Debug::FramePaddingLayout::kIsSupported; | 1478 frame_has_padding = Debug::FramePaddingLayout::kIsSupported; |
1477 } else if (pre_top_frame_code->kind() == Code::STUB && | 1479 } else if (pre_top_frame_code->kind() == Code::STUB && |
1478 pre_top_frame_code->major_key() == CodeStub::CEntry) { | 1480 pre_top_frame_code->major_key() == CodeStub::CEntry) { |
1479 // Entry from our unit tests on 'debugger' statement. | 1481 // Entry from our unit tests on 'debugger' statement. |
1480 // It's fine, we support this case. | 1482 // It's fine, we support this case. |
1481 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; | 1483 *mode = Debug::FRAME_DROPPED_IN_DIRECT_CALL; |
1482 // We don't have a padding from 'debugger' statement call. | 1484 // We don't have a padding from 'debugger' statement call. |
1483 // Here the stub is CEntry, it's not debug-only and can't be padded. | 1485 // Here the stub is CEntry, it's not debug-only and can't be padded. |
1484 // If anyone would complain, a proxy padded stub could be added. | 1486 // If anyone would complain, a proxy padded stub could be added. |
1485 frame_has_padding = false; | 1487 frame_has_padding = false; |
| 1488 } else if (pre_top_frame->type() == StackFrame::ARGUMENTS_ADAPTOR) { |
| 1489 // This must be adaptor that remain from the frame dropping that |
| 1490 // is still on stack. A frame dropper frame must be above it. |
| 1491 ASSERT(frames[top_frame_index - 2]->LookupCode() == |
| 1492 isolate->builtins()->builtin(Builtins::kFrameDropper_LiveEdit)); |
| 1493 pre_top_frame = frames[top_frame_index - 3]; |
| 1494 top_frame = frames[top_frame_index - 2]; |
| 1495 *mode = Debug::CURRENTLY_SET_MODE; |
| 1496 frame_has_padding = false; |
1486 } else { | 1497 } else { |
1487 return "Unknown structure of stack above changing function"; | 1498 return "Unknown structure of stack above changing function"; |
1488 } | 1499 } |
1489 | 1500 |
1490 Address unused_stack_top = top_frame->sp(); | 1501 Address unused_stack_top = top_frame->sp(); |
1491 Address unused_stack_bottom = bottom_js_frame->fp() | 1502 Address unused_stack_bottom = bottom_js_frame->fp() |
1492 - Debug::kFrameDropperFrameSize * kPointerSize // Size of the new frame. | 1503 - Debug::kFrameDropperFrameSize * kPointerSize // Size of the new frame. |
1493 + kPointerSize; // Bigger address end is exclusive. | 1504 + kPointerSize; // Bigger address end is exclusive. |
1494 | 1505 |
1495 Address* top_frame_pc_address = top_frame->pc_address(); | 1506 Address* top_frame_pc_address = top_frame->pc_address(); |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1868 | 1879 |
1869 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { | 1880 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { |
1870 return false; | 1881 return false; |
1871 } | 1882 } |
1872 | 1883 |
1873 #endif // ENABLE_DEBUGGER_SUPPORT | 1884 #endif // ENABLE_DEBUGGER_SUPPORT |
1874 | 1885 |
1875 | 1886 |
1876 | 1887 |
1877 } } // namespace v8::internal | 1888 } } // namespace v8::internal |
OLD | NEW |