Changeset 162711 in webkit
- Timestamp:
- Jan 24, 2014 11:07:31 AM (10 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r162701 r162711 1 2014-01-24 Mark Lam <mark.lam@apple.com> 2 3 Removing the need for Debugger* and m_shouldPause op_debug check. 4 <https://webkit.org/b/127532> 5 6 Reviewed by Geoffrey Garen. 7 8 This patch replaces the checking of the Debugger::m_shouldPause flag 9 with a procedure to set a SteppingMode flag on all CodeBlocks under 10 the management of the debugger. This simplifies the op_debug checking 11 logic in all the execution engines. 12 13 * bytecode/CodeBlock.cpp: 14 * bytecode/CodeBlock.h: 15 (JSC::CodeBlock::hasDebuggerRequests): 16 (JSC::CodeBlock::debuggerRequestsAddress): 17 (JSC::CodeBlock::setSteppingMode): 18 (JSC::CodeBlock::clearDebuggerRequests): 19 - CodeBlock::m_debuggerRequests is a union of m_numBreakpoints and the 20 new m_steppingMode. The debugger can add/remove breakpoints to the 21 CodeBlock as well as set the stepping mode. By having 22 m_debuggerRequests as a union of the 2 bit fields, the op_debug code 23 can now check if any of the 2 requests made on the CodeBlock is still 24 in effect just by testing a single int. 25 26 * debugger/Debugger.cpp: 27 (JSC::Debugger::Debugger): 28 (JSC::Debugger::detach): 29 - This was bug from before where I forgot to clear the CodeBlock 30 breakpoints before detaching. We now take care of it by clearing all 31 debugger requests made to the CodeBlock. 32 33 (JSC::Debugger::SetSteppingModeFunctor::SetSteppingModeFunctor): 34 (JSC::Debugger::SetSteppingModeFunctor::operator()): 35 (JSC::Debugger::setSteppingMode): 36 (JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::ClearCodeBlockDebuggerRequestsFunctor): 37 (JSC::Debugger::ClearCodeBlockDebuggerRequestsFunctor::operator()): 38 (JSC::Debugger::clearBreakpoints): 39 40 (JSC::Debugger::ClearDebuggerRequestsFunctor::ClearDebuggerRequestsFunctor): 41 (JSC::Debugger::ClearDebuggerRequestsFunctor::operator()): 42 (JSC::Debugger::clearDebuggerRequests): 43 - We need a distinct clearDebuggerRequests() from clearBreakpoints() 44 because: 45 1. When we detach a globalObject, we only want to clear the debugger 46 requests in CodeBlocks from that global. 47 2. Clearing the debugger requests in the CodeBlocks is not the same 48 as clearing the breakpoints. The breakpoints are still in effect 49 for the next time a globalObject is attached, or for other 50 globalObjects that are still attached. 51 52 (JSC::Debugger::setPauseOnNextStatement): 53 (JSC::Debugger::breakProgram): 54 (JSC::Debugger::stepIntoStatement): 55 (JSC::Debugger::updateCallFrameAndPauseIfNeeded): 56 (JSC::Debugger::pauseIfNeeded): 57 (JSC::Debugger::exception): 58 (JSC::Debugger::willExecuteProgram): 59 (JSC::Debugger::didReachBreakpoint): 60 * debugger/Debugger.h: 61 - We're always going to support the debugger. So, there's no longer 62 a need to check ENABLE(JAVASCRIPT_DEBUGGER). Removed the unneeded code. 63 64 * dfg/DFGSpeculativeJIT32_64.cpp: 65 (JSC::DFG::SpeculativeJIT::compile): 66 * dfg/DFGSpeculativeJIT64.cpp: 67 (JSC::DFG::SpeculativeJIT::compile): 68 * interpreter/Interpreter.cpp: 69 (JSC::Interpreter::debug): 70 * jit/JITOpcodes.cpp: 71 (JSC::JIT::emit_op_debug): 72 * jit/JITOpcodes32_64.cpp: 73 (JSC::JIT::emit_op_debug): 74 * llint/LowLevelInterpreter.asm: 75 * runtime/JSGlobalObject.h: 76 (JSC::JSGlobalObject::setDebugger): 77 1 78 2014-01-24 Michael Saboff <msaboff@apple.com> 2 79 -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r162598 r162711 1470 1470 , m_didFailFTLCompilation(false) 1471 1471 , m_unlinkedCode(*other.m_vm, other.m_ownerExecutable.get(), other.m_unlinkedCode.get()) 1472 , m_steppingMode(SteppingModeDisabled) 1472 1473 , m_numBreakpoints(0) 1473 1474 , m_ownerExecutable(*other.m_vm, other.m_ownerExecutable.get(), other.m_ownerExecutable.get()) … … 1525 1526 , m_didFailFTLCompilation(false) 1526 1527 , m_unlinkedCode(m_globalObject->vm(), ownerExecutable, unlinkedCodeBlock) 1528 , m_steppingMode(SteppingModeDisabled) 1527 1529 , m_numBreakpoints(0) 1528 1530 , m_ownerExecutable(m_globalObject->vm(), ownerExecutable, ownerExecutable) -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r162652 r162711 872 872 bool hasOpDebugForLineAndColumn(unsigned line, unsigned column); 873 873 874 int numBreakpoints() const { return m_numBreakpoints; }875 static ptrdiff_t numBreakpointsOffset() { return OBJECT_OFFSETOF(CodeBlock, m_numBreakpoints); }876 void* numBreakpointsAddress() { return &m_numBreakpoints; } 877 878 void addBreakpoint(int numBreakpoints) { m_numBreakpoints += numBreakpoints; }879 void removeBreakpoint(int numBreakpoints)880 {874 int hasDebuggerRequests() const { return !!m_debuggerRequests; } 875 void* debuggerRequestsAddress() { return &m_debuggerRequests; } 876 877 void addBreakpoint(unsigned numBreakpoints) { m_numBreakpoints += numBreakpoints; } 878 void removeBreakpoint(unsigned numBreakpoints) 879 { 880 ASSERT(m_numBreakpoints > numBreakpoints); 881 881 m_numBreakpoints -= numBreakpoints; 882 ASSERT(m_numBreakpoints >= 0); 883 } 884 void clearAllBreakpoints() { m_numBreakpoints = 0; } 882 } 883 884 enum SteppingMode { 885 SteppingModeDisabled, 886 SteppingModeEnabled 887 }; 888 void setSteppingMode(SteppingMode mode) { m_steppingMode = mode; } 889 890 void clearDebuggerRequests() { m_debuggerRequests = 0; } 885 891 886 892 // FIXME: Make these remaining members private. … … 1020 1026 WriteBarrier<UnlinkedCodeBlock> m_unlinkedCode; 1021 1027 int m_numParameters; 1022 int m_numBreakpoints; 1028 union { 1029 unsigned m_debuggerRequests; 1030 struct { 1031 unsigned m_steppingMode : 1; 1032 unsigned m_numBreakpoints : 31; 1033 }; 1034 }; 1023 1035 WriteBarrier<ScriptExecutable> m_ownerExecutable; 1024 1036 VM* m_vm; -
trunk/Source/JavaScriptCore/debugger/Debugger.cpp
r162652 r162711 149 149 , m_hasHandlerForExceptionCallback(false) 150 150 , m_isInWorkerThread(isInWorkerThread) 151 , m_steppingMode(SteppingModeDisabled) 151 152 , m_reasonForPause(NotPaused) 152 153 , m_pauseOnCallFrame(0) … … 155 156 , m_lastExecutedSourceID(noSourceID) 156 157 , m_topBreakpointID(noBreakpointID) 157 , m_shouldPause(false)158 158 { 159 159 } … … 190 190 ASSERT(m_globalObjects.contains(globalObject)); 191 191 m_globalObjects.remove(globalObject); 192 193 clearDebuggerRequests(globalObject); 192 194 globalObject->setDebugger(0); 193 195 if (!m_globalObjects.size()) … … 195 197 } 196 198 197 void Debugger::setShouldPause(bool value) 198 { 199 m_shouldPause = value; 199 class Debugger::SetSteppingModeFunctor { 200 public: 201 SetSteppingModeFunctor(Debugger* debugger, SteppingMode mode) 202 : m_debugger(debugger) 203 , m_mode(mode) 204 { 205 } 206 207 bool operator()(CodeBlock* codeBlock) 208 { 209 if (m_debugger == codeBlock->globalObject()->debugger()) { 210 if (m_mode == SteppingModeEnabled) 211 codeBlock->setSteppingMode(CodeBlock::SteppingModeEnabled); 212 else 213 codeBlock->setSteppingMode(CodeBlock::SteppingModeDisabled); 214 } 215 return false; 216 } 217 218 private: 219 Debugger* m_debugger; 220 SteppingMode m_mode; 221 }; 222 223 void Debugger::setSteppingMode(SteppingMode mode) 224 { 225 if (mode == m_steppingMode) 226 return; 227 m_steppingMode = mode; 228 229 if (!m_vm) 230 return; 231 HeapIterationScope iterationScope(m_vm->heap); 232 SetSteppingModeFunctor functor(this, mode); 233 m_vm->heap.forEachCodeBlock(functor); 200 234 } 201 235 … … 203 237 { 204 238 applyBreakpoints(codeBlock); 205 } 206 207 void Debugger::unregisterCodeBlock(CodeBlock* codeBlock) 208 { 209 codeBlock->clearAllBreakpoints(); 239 if (isStepping()) 240 codeBlock->setSteppingMode(CodeBlock::SteppingModeEnabled); 210 241 } 211 242 … … 436 467 } 437 468 438 class Debugger::Clear BreakpointsFunctor {469 class Debugger::ClearCodeBlockDebuggerRequestsFunctor { 439 470 public: 440 Clear BreakpointsFunctor(Debugger* debugger)471 ClearCodeBlockDebuggerRequestsFunctor(Debugger* debugger) 441 472 : m_debugger(debugger) 442 473 { … … 445 476 bool operator()(CodeBlock* codeBlock) 446 477 { 447 if (codeBlock-> numBreakpoints() && m_debugger == codeBlock->globalObject()->debugger())448 codeBlock->clear AllBreakpoints();478 if (codeBlock->hasDebuggerRequests() && m_debugger == codeBlock->globalObject()->debugger()) 479 codeBlock->clearDebuggerRequests(); 449 480 return false; 450 481 } … … 463 494 return; 464 495 HeapIterationScope iterationScope(m_vm->heap); 465 ClearBreakpointsFunctor functor(this); 496 ClearCodeBlockDebuggerRequestsFunctor functor(this); 497 m_vm->heap.forEachCodeBlock(functor); 498 } 499 500 class Debugger::ClearDebuggerRequestsFunctor { 501 public: 502 ClearDebuggerRequestsFunctor(JSGlobalObject* globalObject) 503 : m_globalObject(globalObject) 504 { 505 } 506 507 bool operator()(CodeBlock* codeBlock) 508 { 509 if (codeBlock->hasDebuggerRequests() && m_globalObject == codeBlock->globalObject()) 510 codeBlock->clearDebuggerRequests(); 511 return false; 512 } 513 514 private: 515 JSGlobalObject* m_globalObject; 516 }; 517 518 void Debugger::clearDebuggerRequests(JSGlobalObject* globalObject) 519 { 520 ASSERT(m_vm); 521 HeapIterationScope iterationScope(m_vm->heap); 522 ClearDebuggerRequestsFunctor functor(globalObject); 466 523 m_vm->heap.forEachCodeBlock(functor); 467 524 } … … 481 538 m_pauseOnNextStatement = pause; 482 539 if (pause) 483 setS houldPause(true);540 setSteppingMode(SteppingModeEnabled); 484 541 } 485 542 … … 490 547 491 548 m_pauseOnNextStatement = true; 492 setS houldPause(true);549 setSteppingMode(SteppingModeEnabled); 493 550 m_currentCallFrame = m_vm->topCallFrame; 494 551 ASSERT(m_currentCallFrame); … … 511 568 512 569 m_pauseOnNextStatement = true; 513 setS houldPause(true);570 setSteppingMode(SteppingModeEnabled); 514 571 notifyDoneProcessingDebuggerEvents(); 515 572 } … … 547 604 updateCallFrame(callFrame); 548 605 pauseIfNeeded(callFrame); 549 if (! shouldPause())606 if (!isStepping()) 550 607 m_currentCallFrame = 0; 551 608 } … … 591 648 592 649 if (!m_pauseOnNextStatement && !m_pauseOnCallFrame) { 593 setS houldPause(false);650 setSteppingMode(SteppingModeDisabled); 594 651 m_currentCallFrame = nullptr; 595 652 } … … 604 661 if (m_pauseOnExceptionsState == PauseOnAllExceptions || (m_pauseOnExceptionsState == PauseOnUncaughtExceptions && !hasHandler)) { 605 662 m_pauseOnNextStatement = true; 606 setS houldPause(true);663 setSteppingMode(SteppingModeEnabled); 607 664 } 608 665 … … 662 719 if (!m_isInWorkerThread) 663 720 updateCallFrameAndPauseIfNeeded(callFrame); 664 else if ( shouldPause())721 else if (isStepping()) 665 722 updateCallFrame(callFrame); 666 723 } … … 692 749 PauseReasonDeclaration reason(*this, PausedForBreakpoint); 693 750 m_pauseOnNextStatement = true; 694 setS houldPause(true);751 setSteppingMode(SteppingModeEnabled); 695 752 updateCallFrameAndPauseIfNeeded(callFrame); 696 753 } -
trunk/Source/JavaScriptCore/debugger/Debugger.h
r162652 r162711 42 42 typedef ExecState CallFrame; 43 43 44 #if ENABLE(JAVASCRIPT_DEBUGGER)45 46 44 class JS_EXPORT_PRIVATE Debugger { 47 45 public: 48 46 Debugger(bool isInWorkerThread = false); 49 47 virtual ~Debugger(); 50 51 bool shouldPause() const { return m_shouldPause; }52 static ptrdiff_t shouldPauseOffset() { return OBJECT_OFFSETOF(Debugger, m_shouldPause); }53 void* shouldPauseAddress() { return &m_shouldPause; }54 48 55 49 JSC::DebuggerCallFrame* currentDebuggerCallFrame() const; … … 107 101 108 102 void registerCodeBlock(CodeBlock*); 109 void unregisterCodeBlock(CodeBlock*);110 103 111 104 protected: … … 135 128 typedef HashMap<SourceID, LineToBreakpointsMap, WTF::IntHash<SourceID>, WTF::UnsignedWithZeroKeyHashTraits<SourceID>> SourceIDToBreakpointsMap; 136 129 130 class ClearCodeBlockDebuggerRequestsFunctor; 131 class ClearDebuggerRequestsFunctor; 132 class SetSteppingModeFunctor; 137 133 class ToggleBreakpointFunctor; 138 class ClearBreakpointsFunctor;139 134 140 135 class PauseReasonDeclaration { … … 156 151 bool hasBreakpoint(SourceID, const TextPosition&, Breakpoint* hitBreakpoint); 157 152 158 void setShouldPause(bool);159 153 void updateNeedForOpDebugCallbacks(); 160 154 … … 168 162 void pauseIfNeeded(JSC::CallFrame*); 169 163 164 enum SteppingMode { 165 SteppingModeDisabled, 166 SteppingModeEnabled 167 }; 168 void setSteppingMode(SteppingMode); 169 bool isStepping() const { return m_steppingMode == SteppingModeEnabled; } 170 170 171 enum BreakpointState { 171 172 BreakpointDisabled, … … 175 176 void applyBreakpoints(CodeBlock*); 176 177 void toggleBreakpoint(Breakpoint&, BreakpointState); 178 179 void clearDebuggerRequests(JSGlobalObject*); 177 180 178 181 VM* m_vm; … … 185 188 bool m_hasHandlerForExceptionCallback : 1; 186 189 bool m_isInWorkerThread : 1; 190 SteppingMode m_steppingMode : 1; 187 191 188 192 ReasonForPause m_reasonForPause; … … 197 201 SourceIDToBreakpointsMap m_sourceIDToBreakpoints; 198 202 199 bool m_shouldPause;200 201 203 RefPtr<JSC::DebuggerCallFrame> m_currentDebuggerCallFrame; 202 204 … … 206 208 }; 207 209 208 #else // ENABLE(JAVASCRIPT_DEBUGGER)209 210 class Debugger {211 public:212 Debugger(bool = false)213 : m_shouldPause(false)214 {215 }216 bool shouldPause() const { return false; }217 bool needsExceptionCallbacks() const { return false; }218 void detach(JSGlobalObject*) { }219 void sourceParsed(ExecState*, SourceProvider*, int, const WTF::String&) { }220 void exception(CallFrame*, JSValue, bool) { }221 void atStatement(CallFrame*) { }222 void callEvent(CallFrame*) { }223 void returnEvent(CallFrame*) { }224 void willExecuteProgram(CallFrame*) { }225 void didExecuteProgram(CallFrame*) { }226 void didReachBreakpoint(CallFrame*) { }227 228 private:229 bool m_shouldPause;230 };231 232 #endif // ENABLE(JAVASCRIPT_DEBUGGER)233 234 210 } // namespace JSC 235 211 -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT32_64.cpp
r162652 r162711 4234 4234 4235 4235 case Breakpoint: { 4236 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(m_currentNode->codeOrigin);4237 4236 GPRTemporary temp(this); 4238 m_jit.loadPtr(globalObject->debuggerAddress(), temp.gpr()); 4237 GPRReg debuggerRequestsGPR = temp.gpr(); 4238 m_jit.load32(m_jit.codeBlock()->debuggerRequestsAddress(), debuggerRequestsGPR); 4239 4239 speculationCheck( 4240 4240 DebuggerEvent, JSValueRegs(), 0, 4241 m_jit.branchTestPtr(JITCompiler::Zero, temp.gpr())); 4242 4243 ASSERT(globalObject->hasDebugger()); 4244 speculationCheck( 4245 DebuggerEvent, JSValueRegs(), 0, 4246 m_jit.branchTest8( 4247 JITCompiler::NonZero, 4248 JITCompiler::AbsoluteAddress(globalObject->debugger()->shouldPauseAddress()))); 4249 4250 GPRReg numBreakpointsGPR = temp.gpr(); 4251 m_jit.load32(m_jit.codeBlock()->numBreakpointsAddress(), numBreakpointsGPR); 4252 speculationCheck( 4253 DebuggerEvent, JSValueRegs(), 0, 4254 m_jit.branchTest32(JITCompiler::NonZero, numBreakpointsGPR)); 4255 break; 4256 } 4257 4241 m_jit.branchTest32(JITCompiler::NonZero, debuggerRequestsGPR)); 4242 break; 4243 } 4244 4258 4245 case ProfileWillCall: { 4259 4246 JSValueOperand profile(this, node->child1()); -
trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp
r162652 r162711 4511 4511 4512 4512 case Breakpoint: { 4513 JSGlobalObject* globalObject = m_jit.graph().globalObjectFor(m_currentNode->codeOrigin); 4513 GPRTemporary temp(this); 4514 GPRReg debuggerRequestsGPR = temp.gpr(); 4515 m_jit.load32(m_jit.codeBlock()->debuggerRequestsAddress(), debuggerRequestsGPR); 4514 4516 speculationCheck( 4515 4517 DebuggerEvent, JSValueRegs(), 0, 4516 m_jit.branchTestPtr( 4517 JITCompiler::Zero, 4518 JITCompiler::AbsoluteAddress(globalObject->debuggerAddress()))); 4519 4520 ASSERT(globalObject->hasDebugger()); 4521 speculationCheck( 4522 DebuggerEvent, JSValueRegs(), 0, 4523 m_jit.branchTest8( 4524 JITCompiler::NonZero, 4525 JITCompiler::AbsoluteAddress(globalObject->debugger()->shouldPauseAddress()))); 4526 4527 GPRTemporary temp(this); 4528 GPRReg numBreakpointsGPR = temp.gpr(); 4529 m_jit.load32(m_jit.codeBlock()->numBreakpointsAddress(), numBreakpointsGPR); 4530 speculationCheck( 4531 DebuggerEvent, JSValueRegs(), 0, 4532 m_jit.branchTest32(JITCompiler::NonZero, numBreakpointsGPR)); 4533 break; 4534 } 4535 4518 m_jit.branchTest32(JITCompiler::NonZero, debuggerRequestsGPR)); 4519 break; 4520 } 4521 4536 4522 case ProfileWillCall: { 4537 4523 JSValueOperand profile(this, node->child1()); -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r162598 r162711 1208 1208 if (!debugger) 1209 1209 return; 1210 ASSERT( debugger->shouldPause() || callFrame->codeBlock()->numBreakpoints() || callFrame->hadException());1210 ASSERT(callFrame->codeBlock()->hasDebuggerRequests() || callFrame->hadException()); 1211 1211 1212 1212 switch (debugHookID) { -
trunk/Source/JavaScriptCore/jit/JITOpcodes.cpp
r162598 r162711 711 711 void JIT::emit_op_debug(Instruction* currentInstruction) 712 712 { 713 #if ENABLE(DEBUG_WITH_BREAKPOINT) 714 UNUSED_PARAM(currentInstruction); 715 breakpoint(); 716 #elif ENABLE(JAVASCRIPT_DEBUGGER) 717 JSGlobalObject* globalObject = codeBlock()->globalObject(); 718 char* debuggerAddress = reinterpret_cast<char*>(globalObject) + JSGlobalObject::debuggerOffset(); 719 Jump noDebugger = branchTestPtr(Zero, AbsoluteAddress(debuggerAddress)); 720 721 Debugger* debugger = globalObject->debugger(); 722 char* shouldPauseAddress = reinterpret_cast<char*>(debugger) + Debugger::shouldPauseOffset(); 723 Jump callbackNeeded = branchTest8(NonZero, AbsoluteAddress(shouldPauseAddress)); 724 725 char* numBreakpointsAddress = reinterpret_cast<char*>(codeBlock()) + CodeBlock::numBreakpointsOffset(); 726 load32(numBreakpointsAddress, regT0); 727 Jump noBreakpointSet = branchTest32(Zero, regT0); 728 729 callbackNeeded.link(this); 713 load32(codeBlock()->debuggerRequestsAddress(), regT0); 714 Jump noDebuggerRequests = branchTest32(Zero, regT0); 730 715 callOperation(operationDebug, currentInstruction[1].u.operand); 731 732 noBreakpointSet.link(this); 733 noDebugger.link(this); 734 #else 735 UNUSED_PARAM(currentInstruction); 736 #endif 716 noDebuggerRequests.link(this); 737 717 } 738 718 -
trunk/Source/JavaScriptCore/jit/JITOpcodes32_64.cpp
r162598 r162711 993 993 void JIT::emit_op_debug(Instruction* currentInstruction) 994 994 { 995 #if ENABLE(DEBUG_WITH_BREAKPOINT) 996 UNUSED_PARAM(currentInstruction); 997 breakpoint(); 998 #elif ENABLE(JAVASCRIPT_DEBUGGER) 999 JSGlobalObject* globalObject = codeBlock()->globalObject(); 1000 char* debuggerAddress = reinterpret_cast<char*>(globalObject) + JSGlobalObject::debuggerOffset(); 1001 loadPtr(debuggerAddress, regT0); 1002 Jump noDebugger = branchTestPtr(Zero, regT0); 1003 1004 Debugger* debugger = globalObject->debugger(); 1005 char* shouldPauseAddress = reinterpret_cast<char*>(debugger) + Debugger::shouldPauseOffset(); 1006 Jump callbackNeeded = branchTest8(NonZero, AbsoluteAddress(shouldPauseAddress)); 1007 1008 char* numBreakpointsAddress = reinterpret_cast<char*>(codeBlock()) + CodeBlock::numBreakpointsOffset(); 1009 load32(numBreakpointsAddress, regT0); 1010 Jump noBreakpointSet = branchTest32(Zero, regT0); 1011 1012 callbackNeeded.link(this); 995 load32(codeBlock()->debuggerRequestsAddress(), regT0); 996 Jump noDebuggerRequests = branchTest32(Zero, regT0); 1013 997 callOperation(operationDebug, currentInstruction[1].u.operand); 1014 1015 noBreakpointSet.link(this); 1016 noDebugger.link(this); 1017 #else 1018 UNUSED_PARAM(currentInstruction); 1019 #endif 998 noDebuggerRequests.link(this); 1020 999 } 1021 1000 -
trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm
r162598 r162711 836 836 _llint_op_debug: 837 837 traceExecution() 838 loadp CodeBlock[cfr], t1 839 loadp CodeBlock::m_globalObject[t1], t0 840 loadp JSGlobalObject::m_debugger[t0], t0 838 loadp CodeBlock[cfr], t0 839 loadi CodeBlock::m_debuggerRequests[t0], t0 841 840 btiz t0, .opDebugDone 842 843 loadb Debugger::m_shouldPause[t0], t0844 btbnz t0, .opDebugDoCallback845 846 loadi CodeBlock::m_numBreakpoints[t1], t0847 btiz t0, .opDebugDone848 849 .opDebugDoCallback:850 841 callSlowPath(_llint_slow_path_debug) 851 842 .opDebugDone: -
trunk/Source/JavaScriptCore/runtime/JSGlobalObject.h
r162652 r162711 473 473 Debugger* debugger() const { return m_debugger; } 474 474 void setDebugger(Debugger* debugger) { m_debugger = debugger; } 475 static ptrdiff_t debuggerOffset() { return OBJECT_OFFSETOF(JSGlobalObject, m_debugger); }476 void* debuggerAddress() { return &m_debugger; }477 475 478 476 const GlobalObjectMethodTable* globalObjectMethodTable() const { return m_globalObjectMethodTable; }
Note: See TracChangeset
for help on using the changeset viewer.