Changeset 215854 in webkit for trunk/Source/JavaScriptCore/interpreter
- Timestamp:
- Apr 26, 2017, 8:38:12 PM (8 years ago)
- Location:
- trunk/Source/JavaScriptCore/interpreter
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r215779 r215854 480 480 481 481 if (m_remainingCapacityForFrameCapture) { 482 if (visitor->isWasmFrame()) 483 m_results.append(StackFrame::wasm()); 484 else if (!!visitor->codeBlock() && !visitor->codeBlock()->unlinkedCodeBlock()->isBuiltinFunction()) { 482 if (visitor->isWasmFrame()) { 483 std::optional<unsigned> wasmFunctionIndex = visitor->wasmFunctionIndex(); 484 m_results.append(StackFrame::wasm(wasmFunctionIndex ? *wasmFunctionIndex : StackFrame::invalidWasmIndex)); 485 } else if (!!visitor->codeBlock() && !visitor->codeBlock()->unlinkedCodeBlock()->isBuiltinFunction()) { 485 486 m_results.append( 486 487 StackFrame(m_vm, visitor->callee().asCell(), visitor->codeBlock(), visitor->bytecodeOffset())); -
trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp
r214905 r215854 164 164 m_frame.m_codeBlock = nullptr; 165 165 m_frame.m_bytecodeOffset = 0; 166 #if ENABLE(WEBASSEMBLY) 167 CalleeBits bits = callFrame->callee(); 168 if (bits.isWasm()) 169 m_frame.m_wasmFunctionIndex = bits.asWasmCallee()->index(); 170 #endif 166 171 } else { 167 172 m_frame.m_codeBlock = callFrame->codeBlock(); … … 279 284 switch (codeType()) { 280 285 case CodeType::Wasm: 281 traceLine = ASCIILiteral("wasm code"); 286 if (m_wasmFunctionIndex) 287 traceLine = makeString("wasm function index: ", String::number(*m_wasmFunctionIndex)); 288 else 289 traceLine = ASCIILiteral("wasm function"); 282 290 break; 283 291 case CodeType::Eval: -
trunk/Source/JavaScriptCore/interpreter/StackVisitor.h
r214905 r215854 78 78 bool isInlinedFrame() const { return !!inlineCallFrame(); } 79 79 bool isWasmFrame() const; 80 std::optional<unsigned> const wasmFunctionIndex() 81 { 82 ASSERT(isWasmFrame()); 83 return m_wasmFunctionIndex; 84 } 80 85 81 86 JS_EXPORT_PRIVATE String functionName() const; … … 117 122 size_t m_argumentCountIncludingThis; 118 123 unsigned m_bytecodeOffset; 124 std::optional<unsigned> m_wasmFunctionIndex; 119 125 bool m_callerIsVMEntryFrame : 1; 120 126 bool m_isWasmFrame : 1;
Note:
See TracChangeset
for help on using the changeset viewer.