Changeset 58907 in webkit for trunk/JavaScriptCore


Ignore:
Timestamp:
May 6, 2010, 1:47:22 PM (15 years ago)
Author:
[email protected]
Message:

Add compile switch to make debugger keyword plant breakpoint instructions.

Reviewed by Oliver Hunt.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::emitDebugHook):

  • jit/JITOpcodes.cpp:

(JSC::JIT::emit_op_debug):

  • wtf/Platform.h:
Location:
trunk/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/ChangeLog

    r58904 r58907  
     12010-05-06  Gavin Barraclough  <[email protected]>
     2
     3        Reviewed by Oliver Hunt.
     4
     5        Add compile switch to make debugger keyword plant breakpoint instructions.
     6
     7        * bytecompiler/BytecodeGenerator.cpp:
     8        (JSC::BytecodeGenerator::emitDebugHook):
     9        * jit/JITOpcodes.cpp:
     10        (JSC::JIT::emit_op_debug):
     11        * wtf/Platform.h:
     12
    1132010-05-06  Oliver Hunt  <[email protected]>
    214
  • trunk/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp

    r58902 r58907  
    16321632void BytecodeGenerator::emitDebugHook(DebugHookID debugHookID, int firstLine, int lastLine)
    16331633{
     1634#if ENABLE(DEBUG_WITH_BREAKPOINT)
     1635    if (debugHookID != DidReachBreakpoint)
     1636        return;
     1637#else
    16341638    if (!m_shouldEmitDebugHooks)
    16351639        return;
     1640#endif
    16361641    emitOpcode(op_debug);
    16371642    instructions().append(debugHookID);
  • trunk/JavaScriptCore/jit/JITOpcodes.cpp

    r58469 r58907  
    14311431void JIT::emit_op_debug(Instruction* currentInstruction)
    14321432{
     1433#if ENABLE(DEBUG_WITH_BREAKPOINT)
     1434    UNUSED_PARAM(currentInstruction);
     1435    breakpoint();
     1436#else
    14331437    JITStubCall stubCall(this, cti_op_debug);
    14341438    stubCall.addArgument(Imm32(currentInstruction[1].u.operand));
     
    14361440    stubCall.addArgument(Imm32(currentInstruction[3].u.operand));
    14371441    stubCall.call();
     1442#endif
    14381443}
    14391444
     
    27222727void JIT::emit_op_debug(Instruction* currentInstruction)
    27232728{
     2729#if ENABLE(DEBUG_WITH_BREAKPOINT)
     2730    UNUSED_PARAM(currentInstruction);
     2731    breakpoint();
     2732#else
    27242733    JITStubCall stubCall(this, cti_op_debug);
    27252734    stubCall.addArgument(Imm32(currentInstruction[1].u.operand));
     
    27272736    stubCall.addArgument(Imm32(currentInstruction[3].u.operand));
    27282737    stubCall.call();
     2738#endif
    27292739}
    27302740
  • trunk/JavaScriptCore/wtf/Platform.h

    r58878 r58907  
    860860#endif
    861861
    862 #define ENABLE_SAMPLING_COUNTERS 0
    863 #define ENABLE_SAMPLING_FLAGS 0
     862#define ENABLE_DEBUG_WITH_BREAKPOINT 0
     863#define ENABLE_SAMPLING_COUNTERS 1
     864#define ENABLE_SAMPLING_FLAGS 1
    864865#define ENABLE_OPCODE_SAMPLING 0
    865866#define ENABLE_CODEBLOCK_SAMPLING 0
Note: See TracChangeset for help on using the changeset viewer.