oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 1 | /* |
jfbastien@apple.com | d9f999e | 2017-10-20 02:23:29 +0000 | [diff] [blame] | 2 | * Copyright (C) 2013, 2015-2017 Apple Inc. All rights reserved. |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 3 | * |
| 4 | * Redistribution and use in source and binary forms, with or without |
| 5 | * modification, are permitted provided that the following conditions |
| 6 | * are met: |
| 7 | * 1. Redistributions of source code must retain the above copyright |
| 8 | * notice, this list of conditions and the following disclaimer. |
| 9 | * 2. Redistributions in binary form must reproduce the above copyright |
| 10 | * notice, this list of conditions and the following disclaimer in the |
| 11 | * documentation and/or other materials provided with the distribution. |
| 12 | * |
| 13 | * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
| 14 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 15 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 16 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| 17 | * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 18 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 19 | * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 20 | * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 21 | * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 22 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 23 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 24 | */ |
| 25 | |
| 26 | #include "config.h" |
mark.lam@apple.com | fa2a142 | 2013-09-05 00:40:15 +0000 | [diff] [blame] | 27 | #include "StackVisitor.h" |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 28 | |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 29 | #include "ClonedArguments.h" |
commit-queue@webkit.org | 1cb2227 | 2016-04-22 00:50:09 +0000 | [diff] [blame] | 30 | #include "DebuggerPrimitives.h" |
ggaren@apple.com | 21cd702 | 2015-08-18 18:28:54 +0000 | [diff] [blame] | 31 | #include "InlineCallFrame.h" |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 32 | #include "Interpreter.h" |
fpizlo@apple.com | fb7eff2 | 2014-02-11 01:45:50 +0000 | [diff] [blame] | 33 | #include "JSCInlines.h" |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 34 | #include "WasmCallee.h" |
jfbastien@apple.com | 381e333 | 2017-05-10 18:15:17 +0000 | [diff] [blame] | 35 | #include "WasmIndexOrName.h" |
joepeck@webkit.org | 7e07f39 | 2016-09-22 18:59:47 +0000 | [diff] [blame] | 36 | #include <wtf/text/StringBuilder.h> |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 37 | |
| 38 | namespace JSC { |
| 39 | |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 40 | StackVisitor::StackVisitor(CallFrame* startFrame, VM* vm) |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 41 | { |
mark.lam@apple.com | fa2a142 | 2013-09-05 00:40:15 +0000 | [diff] [blame] | 42 | m_frame.m_index = 0; |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 43 | m_frame.m_isWasmFrame = false; |
msaboff@apple.com | 4298408 | 2014-08-20 20:28:24 +0000 | [diff] [blame] | 44 | CallFrame* topFrame; |
| 45 | if (startFrame) { |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 46 | ASSERT(vm); |
jfbastien@apple.com | d9f999e | 2017-10-20 02:23:29 +0000 | [diff] [blame] | 47 | m_frame.m_entryFrame = vm->topEntryFrame; |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 48 | topFrame = vm->topCallFrame; |
fpizlo@apple.com | 75dcea9 | 2016-08-02 05:38:58 +0000 | [diff] [blame] | 49 | |
jfbastien@apple.com | d9f999e | 2017-10-20 02:23:29 +0000 | [diff] [blame] | 50 | if (topFrame && static_cast<void*>(m_frame.m_entryFrame) == static_cast<void*>(topFrame)) { |
| 51 | topFrame = vmEntryRecord(m_frame.m_entryFrame)->m_prevTopCallFrame; |
| 52 | m_frame.m_entryFrame = vmEntryRecord(m_frame.m_entryFrame)->m_prevTopEntryFrame; |
fpizlo@apple.com | 75dcea9 | 2016-08-02 05:38:58 +0000 | [diff] [blame] | 53 | } |
msaboff@apple.com | 4298408 | 2014-08-20 20:28:24 +0000 | [diff] [blame] | 54 | } else { |
jfbastien@apple.com | d9f999e | 2017-10-20 02:23:29 +0000 | [diff] [blame] | 55 | m_frame.m_entryFrame = 0; |
msaboff@apple.com | 4298408 | 2014-08-20 20:28:24 +0000 | [diff] [blame] | 56 | topFrame = 0; |
| 57 | } |
jfbastien@apple.com | d9f999e | 2017-10-20 02:23:29 +0000 | [diff] [blame] | 58 | m_frame.m_callerIsEntryFrame = false; |
msaboff@apple.com | 4298408 | 2014-08-20 20:28:24 +0000 | [diff] [blame] | 59 | readFrame(topFrame); |
| 60 | |
| 61 | // Find the frame the caller wants to start unwinding from. |
| 62 | while (m_frame.callFrame() && m_frame.callFrame() != startFrame) |
| 63 | gotoNextFrame(); |
mark.lam@apple.com | 304d597 | 2013-08-08 16:57:07 +0000 | [diff] [blame] | 64 | } |
| 65 | |
mark.lam@apple.com | fa2a142 | 2013-09-05 00:40:15 +0000 | [diff] [blame] | 66 | void StackVisitor::gotoNextFrame() |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 67 | { |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 68 | m_frame.m_index++; |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 69 | #if ENABLE(DFG_JIT) |
| 70 | if (m_frame.isInlinedFrame()) { |
| 71 | InlineCallFrame* inlineCallFrame = m_frame.inlineCallFrame(); |
msaboff@apple.com | cde665e | 2015-11-03 20:02:02 +0000 | [diff] [blame] | 72 | CodeOrigin* callerCodeOrigin = inlineCallFrame->getCallerSkippingTailCalls(); |
msaboff@apple.com | a3dc753 | 2015-09-24 21:42:59 +0000 | [diff] [blame] | 73 | if (!callerCodeOrigin) { |
| 74 | while (inlineCallFrame) { |
| 75 | readInlinedFrame(m_frame.callFrame(), &inlineCallFrame->directCaller); |
| 76 | inlineCallFrame = m_frame.inlineCallFrame(); |
| 77 | } |
jfbastien@apple.com | d9f999e | 2017-10-20 02:23:29 +0000 | [diff] [blame] | 78 | m_frame.m_entryFrame = m_frame.m_callerEntryFrame; |
msaboff@apple.com | a3dc753 | 2015-09-24 21:42:59 +0000 | [diff] [blame] | 79 | readFrame(m_frame.callerFrame()); |
| 80 | } else |
| 81 | readInlinedFrame(m_frame.callFrame(), callerCodeOrigin); |
msaboff@apple.com | 0576b24 | 2014-08-22 19:54:30 +0000 | [diff] [blame] | 82 | return; |
| 83 | } |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 84 | #endif // ENABLE(DFG_JIT) |
jfbastien@apple.com | d9f999e | 2017-10-20 02:23:29 +0000 | [diff] [blame] | 85 | m_frame.m_entryFrame = m_frame.m_callerEntryFrame; |
msaboff@apple.com | 0576b24 | 2014-08-22 19:54:30 +0000 | [diff] [blame] | 86 | readFrame(m_frame.callerFrame()); |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 87 | } |
| 88 | |
sbarati@apple.com | 36c1340 | 2015-09-18 23:37:42 +0000 | [diff] [blame] | 89 | void StackVisitor::unwindToMachineCodeBlockFrame() |
| 90 | { |
| 91 | #if ENABLE(DFG_JIT) |
sbarati@apple.com | 36808c8 | 2016-07-06 05:25:06 +0000 | [diff] [blame] | 92 | if (m_frame.isInlinedFrame()) { |
| 93 | CodeOrigin codeOrigin = m_frame.inlineCallFrame()->directCaller; |
| 94 | while (codeOrigin.inlineCallFrame) |
| 95 | codeOrigin = codeOrigin.inlineCallFrame->directCaller; |
| 96 | readNonInlinedFrame(m_frame.callFrame(), &codeOrigin); |
| 97 | } |
sbarati@apple.com | 36c1340 | 2015-09-18 23:37:42 +0000 | [diff] [blame] | 98 | #endif |
| 99 | } |
| 100 | |
mark.lam@apple.com | fa2a142 | 2013-09-05 00:40:15 +0000 | [diff] [blame] | 101 | void StackVisitor::readFrame(CallFrame* callFrame) |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 102 | { |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 103 | if (!callFrame) { |
| 104 | m_frame.setToEnd(); |
| 105 | return; |
| 106 | } |
| 107 | |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 108 | if (callFrame->isAnyWasmCallee()) { |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 109 | readNonInlinedFrame(callFrame); |
| 110 | return; |
| 111 | } |
| 112 | |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 113 | #if !ENABLE(DFG_JIT) |
| 114 | readNonInlinedFrame(callFrame); |
| 115 | |
| 116 | #else // !ENABLE(DFG_JIT) |
| 117 | // If the frame doesn't have a code block, then it's not a DFG frame. |
| 118 | // Hence, we're not at an inlined frame. |
| 119 | CodeBlock* codeBlock = callFrame->codeBlock(); |
| 120 | if (!codeBlock) { |
| 121 | readNonInlinedFrame(callFrame); |
| 122 | return; |
| 123 | } |
| 124 | |
| 125 | // If the code block does not have any code origins, then there's no |
| 126 | // inlining. Hence, we're not at an inlined frame. |
| 127 | if (!codeBlock->hasCodeOrigins()) { |
| 128 | readNonInlinedFrame(callFrame); |
| 129 | return; |
| 130 | } |
| 131 | |
saambarati1@gmail.com | 9137c0b | 2015-08-25 19:40:46 +0000 | [diff] [blame] | 132 | CallSiteIndex index = callFrame->callSiteIndex(); |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 133 | ASSERT(codeBlock->canGetCodeOrigin(index)); |
| 134 | if (!codeBlock->canGetCodeOrigin(index)) { |
| 135 | // See assertion above. In release builds, we try to protect ourselves |
| 136 | // from crashing even though stack walking will be goofed up. |
| 137 | m_frame.setToEnd(); |
| 138 | return; |
| 139 | } |
| 140 | |
| 141 | CodeOrigin codeOrigin = codeBlock->codeOrigin(index); |
| 142 | if (!codeOrigin.inlineCallFrame) { |
| 143 | readNonInlinedFrame(callFrame, &codeOrigin); |
| 144 | return; |
| 145 | } |
| 146 | |
| 147 | readInlinedFrame(callFrame, &codeOrigin); |
| 148 | #endif // !ENABLE(DFG_JIT) |
| 149 | } |
| 150 | |
mark.lam@apple.com | fa2a142 | 2013-09-05 00:40:15 +0000 | [diff] [blame] | 151 | void StackVisitor::readNonInlinedFrame(CallFrame* callFrame, CodeOrigin* codeOrigin) |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 152 | { |
| 153 | m_frame.m_callFrame = callFrame; |
| 154 | m_frame.m_argumentCountIncludingThis = callFrame->argumentCountIncludingThis(); |
jfbastien@apple.com | d9f999e | 2017-10-20 02:23:29 +0000 | [diff] [blame] | 155 | m_frame.m_callerEntryFrame = m_frame.m_entryFrame; |
| 156 | m_frame.m_callerFrame = callFrame->callerFrame(m_frame.m_callerEntryFrame); |
| 157 | m_frame.m_callerIsEntryFrame = m_frame.m_callerEntryFrame != m_frame.m_entryFrame; |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 158 | m_frame.m_isWasmFrame = false; |
| 159 | |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 160 | CalleeBits callee = callFrame->callee(); |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 161 | m_frame.m_callee = callee; |
| 162 | |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 163 | if (callFrame->isAnyWasmCallee()) { |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 164 | m_frame.m_isWasmFrame = true; |
| 165 | m_frame.m_codeBlock = nullptr; |
| 166 | m_frame.m_bytecodeOffset = 0; |
sbarati@apple.com | 58e6034 | 2017-04-27 03:38:12 +0000 | [diff] [blame] | 167 | #if ENABLE(WEBASSEMBLY) |
| 168 | CalleeBits bits = callFrame->callee(); |
| 169 | if (bits.isWasm()) |
jfbastien@apple.com | 381e333 | 2017-05-10 18:15:17 +0000 | [diff] [blame] | 170 | m_frame.m_wasmFunctionIndexOrName = bits.asWasmCallee()->indexOrName(); |
sbarati@apple.com | 58e6034 | 2017-04-27 03:38:12 +0000 | [diff] [blame] | 171 | #endif |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 172 | } else { |
| 173 | m_frame.m_codeBlock = callFrame->codeBlock(); |
| 174 | m_frame.m_bytecodeOffset = !m_frame.codeBlock() ? 0 |
| 175 | : codeOrigin ? codeOrigin->bytecodeIndex |
| 176 | : callFrame->bytecodeOffset(); |
| 177 | |
| 178 | } |
| 179 | |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 180 | #if ENABLE(DFG_JIT) |
| 181 | m_frame.m_inlineCallFrame = 0; |
| 182 | #endif |
| 183 | } |
| 184 | |
| 185 | #if ENABLE(DFG_JIT) |
msaboff@apple.com | b70e41b | 2013-09-13 18:03:55 +0000 | [diff] [blame] | 186 | static int inlinedFrameOffset(CodeOrigin* codeOrigin) |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 187 | { |
| 188 | InlineCallFrame* inlineCallFrame = codeOrigin->inlineCallFrame; |
msaboff@apple.com | b70e41b | 2013-09-13 18:03:55 +0000 | [diff] [blame] | 189 | int frameOffset = inlineCallFrame ? inlineCallFrame->stackOffset : 0; |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 190 | return frameOffset; |
| 191 | } |
| 192 | |
mark.lam@apple.com | fa2a142 | 2013-09-05 00:40:15 +0000 | [diff] [blame] | 193 | void StackVisitor::readInlinedFrame(CallFrame* callFrame, CodeOrigin* codeOrigin) |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 194 | { |
| 195 | ASSERT(codeOrigin); |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 196 | m_frame.m_isWasmFrame = false; |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 197 | |
msaboff@apple.com | b70e41b | 2013-09-13 18:03:55 +0000 | [diff] [blame] | 198 | int frameOffset = inlinedFrameOffset(codeOrigin); |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 199 | bool isInlined = !!frameOffset; |
| 200 | if (isInlined) { |
| 201 | InlineCallFrame* inlineCallFrame = codeOrigin->inlineCallFrame; |
| 202 | |
| 203 | m_frame.m_callFrame = callFrame; |
| 204 | m_frame.m_inlineCallFrame = inlineCallFrame; |
fpizlo@apple.com | 8fefdd3 | 2015-02-18 19:55:47 +0000 | [diff] [blame] | 205 | if (inlineCallFrame->argumentCountRegister.isValid()) |
| 206 | m_frame.m_argumentCountIncludingThis = callFrame->r(inlineCallFrame->argumentCountRegister.offset()).unboxedInt32(); |
| 207 | else |
utatane.tea@gmail.com | 0c7cd0b | 2017-09-02 08:35:46 +0000 | [diff] [blame] | 208 | m_frame.m_argumentCountIncludingThis = inlineCallFrame->argumentCountIncludingThis; |
ggaren@apple.com | 81def5f | 2015-10-09 23:10:16 +0000 | [diff] [blame] | 209 | m_frame.m_codeBlock = inlineCallFrame->baselineCodeBlock.get(); |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 210 | m_frame.m_bytecodeOffset = codeOrigin->bytecodeIndex; |
| 211 | |
fpizlo@apple.com | a62d482 | 2013-10-06 04:22:43 +0000 | [diff] [blame] | 212 | JSFunction* callee = inlineCallFrame->calleeForCallFrame(callFrame); |
fpizlo@apple.com | a62d482 | 2013-10-06 04:22:43 +0000 | [diff] [blame] | 213 | m_frame.m_callee = callee; |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 214 | ASSERT(!!m_frame.callee().rawPtr()); |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 215 | |
| 216 | // The callerFrame just needs to be non-null to indicate that we |
| 217 | // haven't reached the last frame yet. Setting it to the root |
| 218 | // frame (i.e. the callFrame that this inlined frame is called from) |
| 219 | // would work just fine. |
| 220 | m_frame.m_callerFrame = callFrame; |
| 221 | return; |
| 222 | } |
| 223 | |
| 224 | readNonInlinedFrame(callFrame, codeOrigin); |
| 225 | } |
| 226 | #endif // ENABLE(DFG_JIT) |
| 227 | |
mark.lam@apple.com | fa2a142 | 2013-09-05 00:40:15 +0000 | [diff] [blame] | 228 | StackVisitor::Frame::CodeType StackVisitor::Frame::codeType() const |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 229 | { |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 230 | if (isWasmFrame()) |
| 231 | return CodeType::Wasm; |
| 232 | |
| 233 | if (!codeBlock()) |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 234 | return CodeType::Native; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 235 | |
| 236 | switch (codeBlock()->codeType()) { |
| 237 | case EvalCode: |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 238 | return CodeType::Eval; |
utatane.tea@gmail.com | a8309d9 | 2015-09-01 02:05:30 +0000 | [diff] [blame] | 239 | case ModuleCode: |
| 240 | return CodeType::Module; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 241 | case FunctionCode: |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 242 | return CodeType::Function; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 243 | case GlobalCode: |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 244 | return CodeType::Global; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 245 | } |
| 246 | RELEASE_ASSERT_NOT_REACHED(); |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 247 | return CodeType::Global; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 248 | } |
| 249 | |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 250 | RegisterAtOffsetList* StackVisitor::Frame::calleeSaveRegisters() |
| 251 | { |
| 252 | if (isInlinedFrame()) |
| 253 | return nullptr; |
| 254 | |
sbarati@apple.com | 02a8f69 | 2016-12-12 20:55:23 +0000 | [diff] [blame] | 255 | #if ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 |
| 256 | |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 257 | #if ENABLE(WEBASSEMBLY) |
| 258 | if (isWasmFrame()) { |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 259 | if (callee().isCell()) { |
| 260 | RELEASE_ASSERT(isWebAssemblyToJSCallee(callee().asCell())); |
| 261 | return nullptr; |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 262 | } |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 263 | Wasm::Callee* wasmCallee = callee().asWasmCallee(); |
| 264 | return wasmCallee->calleeSaveRegisters(); |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 265 | } |
sbarati@apple.com | 02a8f69 | 2016-12-12 20:55:23 +0000 | [diff] [blame] | 266 | #endif // ENABLE(WEBASSEMBLY) |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 267 | |
| 268 | if (CodeBlock* codeBlock = this->codeBlock()) |
| 269 | return codeBlock->calleeSaveRegisters(); |
| 270 | |
sbarati@apple.com | 02a8f69 | 2016-12-12 20:55:23 +0000 | [diff] [blame] | 271 | #endif // ENABLE(JIT) && NUMBER_OF_CALLEE_SAVES_REGISTERS > 0 |
| 272 | |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 273 | return nullptr; |
| 274 | } |
| 275 | |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 276 | String StackVisitor::Frame::functionName() const |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 277 | { |
| 278 | String traceLine; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 279 | |
| 280 | switch (codeType()) { |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 281 | case CodeType::Wasm: |
jfbastien@apple.com | c139985 | 2017-12-01 02:41:10 +0000 | [diff] [blame] | 282 | traceLine = makeString(m_wasmFunctionIndexOrName); |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 283 | break; |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 284 | case CodeType::Eval: |
commit-queue@webkit.org | 29e710c | 2014-08-29 21:33:30 +0000 | [diff] [blame] | 285 | traceLine = ASCIILiteral("eval code"); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 286 | break; |
utatane.tea@gmail.com | a8309d9 | 2015-09-01 02:05:30 +0000 | [diff] [blame] | 287 | case CodeType::Module: |
| 288 | traceLine = ASCIILiteral("module code"); |
| 289 | break; |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 290 | case CodeType::Native: { |
| 291 | JSCell* callee = this->callee().asCell(); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 292 | if (callee) |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 293 | traceLine = getCalculatedDisplayName(callFrame()->vm(), jsCast<JSObject*>(callee)).impl(); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 294 | break; |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 295 | } |
| 296 | case CodeType::Function: |
| 297 | traceLine = getCalculatedDisplayName(callFrame()->vm(), jsCast<JSObject*>(this->callee().asCell())).impl(); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 298 | break; |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 299 | case CodeType::Global: |
commit-queue@webkit.org | 29e710c | 2014-08-29 21:33:30 +0000 | [diff] [blame] | 300 | traceLine = ASCIILiteral("global code"); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 301 | break; |
| 302 | } |
| 303 | return traceLine.isNull() ? emptyString() : traceLine; |
| 304 | } |
| 305 | |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 306 | String StackVisitor::Frame::sourceURL() const |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 307 | { |
| 308 | String traceLine; |
| 309 | |
| 310 | switch (codeType()) { |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 311 | case CodeType::Eval: |
utatane.tea@gmail.com | a8309d9 | 2015-09-01 02:05:30 +0000 | [diff] [blame] | 312 | case CodeType::Module: |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 313 | case CodeType::Function: |
| 314 | case CodeType::Global: { |
commit-queue@webkit.org | fa19663 | 2015-08-28 21:07:22 +0000 | [diff] [blame] | 315 | String sourceURL = codeBlock()->ownerScriptExecutable()->sourceURL(); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 316 | if (!sourceURL.isEmpty()) |
| 317 | traceLine = sourceURL.impl(); |
| 318 | break; |
| 319 | } |
ossy@webkit.org | 0bf30c5 | 2013-09-12 15:28:14 +0000 | [diff] [blame] | 320 | case CodeType::Native: |
commit-queue@webkit.org | 29e710c | 2014-08-29 21:33:30 +0000 | [diff] [blame] | 321 | traceLine = ASCIILiteral("[native code]"); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 322 | break; |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 323 | case CodeType::Wasm: |
| 324 | traceLine = ASCIILiteral("[wasm code]"); |
| 325 | break; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 326 | } |
| 327 | return traceLine.isNull() ? emptyString() : traceLine; |
| 328 | } |
| 329 | |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 330 | String StackVisitor::Frame::toString() const |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 331 | { |
| 332 | StringBuilder traceBuild; |
| 333 | String functionName = this->functionName(); |
| 334 | String sourceURL = this->sourceURL(); |
| 335 | traceBuild.append(functionName); |
| 336 | if (!sourceURL.isEmpty()) { |
| 337 | if (!functionName.isEmpty()) |
| 338 | traceBuild.append('@'); |
| 339 | traceBuild.append(sourceURL); |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 340 | if (hasLineAndColumnInfo()) { |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 341 | unsigned line = 0; |
| 342 | unsigned column = 0; |
| 343 | computeLineAndColumn(line, column); |
| 344 | traceBuild.append(':'); |
| 345 | traceBuild.appendNumber(line); |
| 346 | traceBuild.append(':'); |
| 347 | traceBuild.appendNumber(column); |
| 348 | } |
| 349 | } |
| 350 | return traceBuild.toString().impl(); |
| 351 | } |
| 352 | |
commit-queue@webkit.org | 1cb2227 | 2016-04-22 00:50:09 +0000 | [diff] [blame] | 353 | intptr_t StackVisitor::Frame::sourceID() |
| 354 | { |
| 355 | if (CodeBlock* codeBlock = this->codeBlock()) |
| 356 | return codeBlock->ownerScriptExecutable()->sourceID(); |
| 357 | return noSourceID; |
| 358 | } |
| 359 | |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 360 | ClonedArguments* StackVisitor::Frame::createArguments() |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 361 | { |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 362 | ASSERT(m_callFrame); |
| 363 | CallFrame* physicalFrame = m_callFrame; |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 364 | ClonedArguments* arguments; |
fpizlo@apple.com | 9bb773c | 2014-09-27 20:27:59 +0000 | [diff] [blame] | 365 | ArgumentsMode mode; |
mark.lam@apple.com | ee3c410 | 2015-10-14 18:57:07 +0000 | [diff] [blame] | 366 | if (Options::useFunctionDotArguments()) |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 367 | mode = ArgumentsMode::Cloned; |
fpizlo@apple.com | 9bb773c | 2014-09-27 20:27:59 +0000 | [diff] [blame] | 368 | else |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 369 | mode = ArgumentsMode::FakeValues; |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 370 | #if ENABLE(DFG_JIT) |
| 371 | if (isInlinedFrame()) { |
| 372 | ASSERT(m_inlineCallFrame); |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 373 | arguments = ClonedArguments::createWithInlineFrame(physicalFrame, physicalFrame, m_inlineCallFrame, mode); |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 374 | } else |
| 375 | #endif |
fpizlo@apple.com | da834ae | 2015-03-26 04:28:43 +0000 | [diff] [blame] | 376 | arguments = ClonedArguments::createWithMachineFrame(physicalFrame, physicalFrame, mode); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 377 | return arguments; |
| 378 | } |
| 379 | |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 380 | bool StackVisitor::Frame::hasLineAndColumnInfo() const |
| 381 | { |
| 382 | return !!codeBlock(); |
| 383 | } |
| 384 | |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 385 | void StackVisitor::Frame::computeLineAndColumn(unsigned& line, unsigned& column) const |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 386 | { |
| 387 | CodeBlock* codeBlock = this->codeBlock(); |
| 388 | if (!codeBlock) { |
| 389 | line = 0; |
| 390 | column = 0; |
| 391 | return; |
| 392 | } |
| 393 | |
| 394 | int divot = 0; |
| 395 | int unusedStartOffset = 0; |
| 396 | int unusedEndOffset = 0; |
| 397 | unsigned divotLine = 0; |
| 398 | unsigned divotColumn = 0; |
| 399 | retrieveExpressionInfo(divot, unusedStartOffset, unusedEndOffset, divotLine, divotColumn); |
| 400 | |
commit-queue@webkit.org | fa19663 | 2015-08-28 21:07:22 +0000 | [diff] [blame] | 401 | line = divotLine + codeBlock->ownerScriptExecutable()->firstLine(); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 402 | column = divotColumn + (divotLine ? 1 : codeBlock->firstLineColumnOffset()); |
ggaren@apple.com | 7a6a0f6 | 2015-03-26 23:12:39 +0000 | [diff] [blame] | 403 | |
commit-queue@webkit.org | fa19663 | 2015-08-28 21:07:22 +0000 | [diff] [blame] | 404 | if (codeBlock->ownerScriptExecutable()->hasOverrideLineNumber()) |
| 405 | line = codeBlock->ownerScriptExecutable()->overrideLineNumber(); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 406 | } |
| 407 | |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 408 | void StackVisitor::Frame::retrieveExpressionInfo(int& divot, int& startOffset, int& endOffset, unsigned& line, unsigned& column) const |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 409 | { |
| 410 | CodeBlock* codeBlock = this->codeBlock(); |
| 411 | codeBlock->unlinkedCodeBlock()->expressionRangeForBytecodeOffset(bytecodeOffset(), divot, startOffset, endOffset, line, column); |
| 412 | divot += codeBlock->sourceOffset(); |
| 413 | } |
| 414 | |
mark.lam@apple.com | fa2a142 | 2013-09-05 00:40:15 +0000 | [diff] [blame] | 415 | void StackVisitor::Frame::setToEnd() |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 416 | { |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 417 | m_callFrame = 0; |
| 418 | #if ENABLE(DFG_JIT) |
| 419 | m_inlineCallFrame = 0; |
| 420 | #endif |
sbarati@apple.com | 812da91 | 2016-12-12 03:11:18 +0000 | [diff] [blame] | 421 | m_isWasmFrame = false; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 422 | } |
| 423 | |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 424 | void StackVisitor::Frame::dump(PrintStream& out, Indenter indent) const |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 425 | { |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 426 | dump(out, indent, [] (PrintStream&) { }); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 427 | } |
| 428 | |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 429 | void StackVisitor::Frame::dump(PrintStream& out, Indenter indent, std::function<void(PrintStream&)> prefix) const |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 430 | { |
mark.lam@apple.com | bce4c9b | 2013-09-04 00:26:57 +0000 | [diff] [blame] | 431 | if (!this->callFrame()) { |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 432 | out.print(indent, "frame 0x0\n"); |
mark.lam@apple.com | bce4c9b | 2013-09-04 00:26:57 +0000 | [diff] [blame] | 433 | return; |
| 434 | } |
| 435 | |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 436 | CodeBlock* codeBlock = this->codeBlock(); |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 437 | out.print(indent); |
| 438 | prefix(out); |
| 439 | out.print("frame ", RawPointer(this->callFrame()), " {\n"); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 440 | |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 441 | { |
| 442 | indent++; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 443 | |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 444 | CallFrame* callFrame = m_callFrame; |
| 445 | CallFrame* callerFrame = this->callerFrame(); |
| 446 | void* returnPC = callFrame->hasReturnPC() ? callFrame->returnPC().value() : nullptr; |
| 447 | |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 448 | out.print(indent, "name: ", functionName(), "\n"); |
| 449 | out.print(indent, "sourceURL: ", sourceURL(), "\n"); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 450 | |
mark.lam@apple.com | b04e85d | 2015-04-17 01:03:55 +0000 | [diff] [blame] | 451 | bool isInlined = false; |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 452 | #if ENABLE(DFG_JIT) |
mark.lam@apple.com | b04e85d | 2015-04-17 01:03:55 +0000 | [diff] [blame] | 453 | isInlined = isInlinedFrame(); |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 454 | out.print(indent, "isInlinedFrame: ", isInlinedFrame(), "\n"); |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 455 | if (isInlinedFrame()) |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 456 | out.print(indent, "InlineCallFrame: ", RawPointer(m_inlineCallFrame), "\n"); |
mark.lam@apple.com | fd86164 | 2013-08-29 17:41:44 +0000 | [diff] [blame] | 457 | #endif |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 458 | |
sbarati@apple.com | 5db42f8 | 2017-04-04 22:23:37 +0000 | [diff] [blame] | 459 | out.print(indent, "callee: ", RawPointer(callee().rawPtr()), "\n"); |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 460 | out.print(indent, "returnPC: ", RawPointer(returnPC), "\n"); |
| 461 | out.print(indent, "callerFrame: ", RawPointer(callerFrame), "\n"); |
commit-queue@webkit.org | 0cbf4f6 | 2018-01-31 04:47:43 +0000 | [diff] [blame] | 462 | uintptr_t locationRawBits = callFrame->callSiteAsRawBits(); |
| 463 | out.print(indent, "rawLocationBits: ", locationRawBits, |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 464 | " ", RawPointer(reinterpret_cast<void*>(locationRawBits)), "\n"); |
| 465 | out.print(indent, "codeBlock: ", RawPointer(codeBlock)); |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 466 | if (codeBlock) |
mark.lam@apple.com | e849971 | 2016-11-10 21:42:33 +0000 | [diff] [blame] | 467 | out.print(" ", *codeBlock); |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 468 | out.print("\n"); |
mark.lam@apple.com | b04e85d | 2015-04-17 01:03:55 +0000 | [diff] [blame] | 469 | if (codeBlock && !isInlined) { |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 470 | indent++; |
| 471 | |
saambarati1@gmail.com | 9137c0b | 2015-08-25 19:40:46 +0000 | [diff] [blame] | 472 | if (callFrame->callSiteBitsAreBytecodeOffset()) { |
| 473 | unsigned bytecodeOffset = callFrame->bytecodeOffset(); |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 474 | out.print(indent, "bytecodeOffset: ", bytecodeOffset, " of ", codeBlock->instructions().size(), "\n"); |
oliver@apple.com | 0d58791 | 2013-07-25 04:04:39 +0000 | [diff] [blame] | 475 | #if ENABLE(DFG_JIT) |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 476 | } else { |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 477 | out.print(indent, "hasCodeOrigins: ", codeBlock->hasCodeOrigins(), "\n"); |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 478 | if (codeBlock->hasCodeOrigins()) { |
saambarati1@gmail.com | 9137c0b | 2015-08-25 19:40:46 +0000 | [diff] [blame] | 479 | CallSiteIndex callSiteIndex = callFrame->callSiteIndex(); |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 480 | out.print(indent, "callSiteIndex: ", callSiteIndex.bits(), " of ", codeBlock->codeOrigins().size(), "\n"); |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 481 | |
| 482 | JITCode::JITType jitType = codeBlock->jitType(); |
| 483 | if (jitType != JITCode::FTLJIT) { |
| 484 | JITCode* jitCode = codeBlock->jitCode().get(); |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 485 | out.print(indent, "jitCode: ", RawPointer(jitCode), |
| 486 | " start ", RawPointer(jitCode->start()), |
| 487 | " end ", RawPointer(jitCode->end()), "\n"); |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 488 | } |
| 489 | } |
oliver@apple.com | 0d58791 | 2013-07-25 04:04:39 +0000 | [diff] [blame] | 490 | #endif |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 491 | } |
| 492 | unsigned line = 0; |
| 493 | unsigned column = 0; |
| 494 | computeLineAndColumn(line, column); |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 495 | out.print(indent, "line: ", line, "\n"); |
| 496 | out.print(indent, "column: ", column, "\n"); |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 497 | |
| 498 | indent--; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 499 | } |
jfbastien@apple.com | d9f999e | 2017-10-20 02:23:29 +0000 | [diff] [blame] | 500 | out.print(indent, "EntryFrame: ", RawPointer(m_entryFrame), "\n"); |
mark.lam@apple.com | 507b94e | 2015-04-17 00:25:14 +0000 | [diff] [blame] | 501 | indent--; |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 502 | } |
mark.lam@apple.com | 1cfbb24 | 2016-06-03 14:53:16 +0000 | [diff] [blame] | 503 | out.print(indent, "}\n"); |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 504 | } |
| 505 | |
oliver@apple.com | 2b2e132 | 2013-07-25 04:02:28 +0000 | [diff] [blame] | 506 | } // namespace JSC |