OLD | NEW |
---|---|
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 | 92 |
93 void VirtualFrame::Exit() { | 93 void VirtualFrame::Exit() { |
94 Comment cmnt(masm(), "[ Exit JS frame"); | 94 Comment cmnt(masm(), "[ Exit JS frame"); |
95 // Record the location of the JS exit code for patching when setting | 95 // Record the location of the JS exit code for patching when setting |
96 // break point. | 96 // break point. |
97 __ RecordJSReturn(); | 97 __ RecordJSReturn(); |
98 | 98 |
99 // Avoid using the leave instruction here, because it is too | 99 // Avoid using the leave instruction here, because it is too |
100 // short. We need the return sequence to be a least the size of a | 100 // short. We need the return sequence to be a least the size of a |
101 // call instruction to support patching the exit code in the | 101 // call instruction to support patching the exit code in the |
102 // debugger. See VisitReturnStatement for the full return sequence. | 102 // debugger. See VisitReturnStatement for the full return sequence. |
Kevin Millikin (Chromium)
2009/06/16 08:27:03
The return sequence is not in VisitReturnStatement
| |
103 // TODO(X64): A patched call will be very long now. Make sure we | |
104 // have enough room. | |
103 __ movq(rsp, rbp); | 105 __ movq(rsp, rbp); |
104 stack_pointer_ = frame_pointer(); | 106 stack_pointer_ = frame_pointer(); |
105 for (int i = element_count() - 1; i > stack_pointer_; i--) { | 107 for (int i = element_count() - 1; i > stack_pointer_; i--) { |
106 FrameElement last = elements_.RemoveLast(); | 108 FrameElement last = elements_.RemoveLast(); |
107 if (last.is_register()) { | 109 if (last.is_register()) { |
108 Unuse(last.reg()); | 110 Unuse(last.reg()); |
109 } | 111 } |
110 } | 112 } |
111 | 113 |
112 EmitPop(rbp); | 114 EmitPop(rbp); |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
185 } | 187 } |
186 | 188 |
187 void VirtualFrame::SyncRange(int a, int b) { | 189 void VirtualFrame::SyncRange(int a, int b) { |
188 UNIMPLEMENTED(); | 190 UNIMPLEMENTED(); |
189 } | 191 } |
190 | 192 |
191 | 193 |
192 #undef __ | 194 #undef __ |
193 | 195 |
194 } } // namespace v8::internal | 196 } } // namespace v8::internal |
OLD | NEW |