| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 | 5 |
| 6 #include "src/v8.h" | 6 #include "src/v8.h" |
| 7 | 7 |
| 8 #include "src/liveedit.h" | 8 #include "src/liveedit.h" |
| 9 | 9 |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 isolate->builtins()->builtin(Builtins::kFrameDropper_LiveEdit)) { | 1631 isolate->builtins()->builtin(Builtins::kFrameDropper_LiveEdit)) { |
| 1632 // OK, we can drop our own code. | 1632 // OK, we can drop our own code. |
| 1633 pre_top_frame = frames[top_frame_index - 2]; | 1633 pre_top_frame = frames[top_frame_index - 2]; |
| 1634 top_frame = frames[top_frame_index - 1]; | 1634 top_frame = frames[top_frame_index - 1]; |
| 1635 *mode = LiveEdit::CURRENTLY_SET_MODE; | 1635 *mode = LiveEdit::CURRENTLY_SET_MODE; |
| 1636 frame_has_padding = false; | 1636 frame_has_padding = false; |
| 1637 } else if (pre_top_frame_code == | 1637 } else if (pre_top_frame_code == |
| 1638 isolate->builtins()->builtin(Builtins::kReturn_DebugBreak)) { | 1638 isolate->builtins()->builtin(Builtins::kReturn_DebugBreak)) { |
| 1639 *mode = LiveEdit::FRAME_DROPPED_IN_RETURN_CALL; | 1639 *mode = LiveEdit::FRAME_DROPPED_IN_RETURN_CALL; |
| 1640 } else if (pre_top_frame_code->kind() == Code::STUB && | 1640 } else if (pre_top_frame_code->kind() == Code::STUB && |
| 1641 pre_top_frame_code->major_key() == CodeStub::CEntry) { | 1641 CodeStub::GetMajorKey(pre_top_frame_code) == CodeStub::CEntry) { |
| 1642 // Entry from our unit tests on 'debugger' statement. | 1642 // Entry from our unit tests on 'debugger' statement. |
| 1643 // It's fine, we support this case. | 1643 // It's fine, we support this case. |
| 1644 *mode = LiveEdit::FRAME_DROPPED_IN_DIRECT_CALL; | 1644 *mode = LiveEdit::FRAME_DROPPED_IN_DIRECT_CALL; |
| 1645 // We don't have a padding from 'debugger' statement call. | 1645 // We don't have a padding from 'debugger' statement call. |
| 1646 // Here the stub is CEntry, it's not debug-only and can't be padded. | 1646 // Here the stub is CEntry, it's not debug-only and can't be padded. |
| 1647 // If anyone would complain, a proxy padded stub could be added. | 1647 // If anyone would complain, a proxy padded stub could be added. |
| 1648 frame_has_padding = false; | 1648 frame_has_padding = false; |
| 1649 } else if (pre_top_frame->type() == StackFrame::ARGUMENTS_ADAPTOR) { | 1649 } else if (pre_top_frame->type() == StackFrame::ARGUMENTS_ADAPTOR) { |
| 1650 // This must be adaptor that remain from the frame dropping that | 1650 // This must be adaptor that remain from the frame dropping that |
| 1651 // is still on stack. A frame dropper frame must be above it. | 1651 // is still on stack. A frame dropper frame must be above it. |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2078 void LiveEditFunctionTracker::RecordRootFunctionInfo(Handle<Code> code) { | 2078 void LiveEditFunctionTracker::RecordRootFunctionInfo(Handle<Code> code) { |
| 2079 isolate_->active_function_info_listener()->FunctionCode(code); | 2079 isolate_->active_function_info_listener()->FunctionCode(code); |
| 2080 } | 2080 } |
| 2081 | 2081 |
| 2082 | 2082 |
| 2083 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { | 2083 bool LiveEditFunctionTracker::IsActive(Isolate* isolate) { |
| 2084 return isolate->active_function_info_listener() != NULL; | 2084 return isolate->active_function_info_listener() != NULL; |
| 2085 } | 2085 } |
| 2086 | 2086 |
| 2087 } } // namespace v8::internal | 2087 } } // namespace v8::internal |
| OLD | NEW |