Fix !ENABLE(JAVASCRIPT_DEBUGGER) build.

https://bugs.webkit.org/show_bug.cgi?id=125083

Patch by Peter Molnar <pmolnar.u-szeged@partner.samsung.com> on 2013-12-04
Reviewed by Mark Lam.

* debugger/Debugger.cpp:
* debugger/Debugger.h:
(JSC::Debugger::Debugger):
(JSC::Debugger::needsOpDebugCallbacks):
(JSC::Debugger::needsExceptionCallbacks):
(JSC::Debugger::detach):
(JSC::Debugger::sourceParsed):
(JSC::Debugger::exception):
(JSC::Debugger::atStatement):
(JSC::Debugger::callEvent):
(JSC::Debugger::returnEvent):
(JSC::Debugger::willExecuteProgram):
(JSC::Debugger::didExecuteProgram):
(JSC::Debugger::didReachBreakpoint):
* debugger/DebuggerPrimitives.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_debug):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_debug):
* llint/LLIntOfflineAsmConfig.h:
* llint/LowLevelInterpreter.asm:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@160082 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 6cf53183
2013-12-04 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Fix !ENABLE(JAVASCRIPT_DEBUGGER) build.
https://bugs.webkit.org/show_bug.cgi?id=125083
Reviewed by Mark Lam.
* debugger/Debugger.cpp:
* debugger/Debugger.h:
(JSC::Debugger::Debugger):
(JSC::Debugger::needsOpDebugCallbacks):
(JSC::Debugger::needsExceptionCallbacks):
(JSC::Debugger::detach):
(JSC::Debugger::sourceParsed):
(JSC::Debugger::exception):
(JSC::Debugger::atStatement):
(JSC::Debugger::callEvent):
(JSC::Debugger::returnEvent):
(JSC::Debugger::willExecuteProgram):
(JSC::Debugger::didExecuteProgram):
(JSC::Debugger::didReachBreakpoint):
* debugger/DebuggerPrimitives.h:
* jit/JITOpcodes.cpp:
(JSC::JIT::emit_op_debug):
* jit/JITOpcodes32_64.cpp:
(JSC::JIT::emit_op_debug):
* llint/LLIntOfflineAsmConfig.h:
* llint/LowLevelInterpreter.asm:
2013-12-03 Mark Lam <mark.lam@apple.com>
testapi test crashes on Windows in WTF::Vector<wchar_t,64,WTF::UnsafeVectorOverflow>::size().
......
......@@ -20,6 +20,8 @@
*/
#include "config.h"
#if ENABLE(JAVASCRIPT_DEBUGGER)
#include "Debugger.h"
#include "DebuggerCallFrame.h"
......@@ -587,3 +589,5 @@ DebuggerCallFrame* Debugger::currentDebuggerCallFrame() const
}
} // namespace JSC
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
......@@ -41,6 +41,8 @@ class VM;
typedef ExecState CallFrame;
#if ENABLE(JAVASCRIPT_DEBUGGER)
class JS_EXPORT_PRIVATE Debugger {
public:
Debugger(bool isInWorkerThread = false);
......@@ -189,6 +191,26 @@ private:
friend class LLIntOffsetsExtractor;
};
#else // ENABLE(JAVASCRIPT_DEBUGGER)
class Debugger {
public:
Debugger(bool = false) { }
bool needsOpDebugCallbacks() const { return false; }
bool needsExceptionCallbacks() const { return false; }
void detach(JSGlobalObject*) { };
void sourceParsed(ExecState*, SourceProvider*, int, const WTF::String&) { };
void exception(CallFrame*, JSValue, bool) { };
void atStatement(CallFrame*) { };
void callEvent(CallFrame*) { };
void returnEvent(CallFrame*) { };
void willExecuteProgram(CallFrame*) { };
void didExecuteProgram(CallFrame*) { };
void didReachBreakpoint(CallFrame*) { };
};
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
} // namespace JSC
#endif // Debugger_h
......@@ -26,8 +26,6 @@
#ifndef DebuggerPrimitives_h
#define DebuggerPrimitives_h
#if ENABLE(JAVASCRIPT_DEBUGGER)
namespace JSC {
typedef size_t SourceID;
......@@ -38,6 +36,4 @@ static const BreakpointID noBreakpointID = 0;
} // namespace JSC
#endif // ENABLE(JAVASCRIPT_DEBUGGER)
#endif // DebuggerPrimitives_h
......@@ -705,7 +705,7 @@ void JIT::emit_op_debug(Instruction* currentInstruction)
#if ENABLE(DEBUG_WITH_BREAKPOINT)
UNUSED_PARAM(currentInstruction);
breakpoint();
#else
#elif ENABLE(JAVASCRIPT_DEBUGGER)
JSGlobalObject* globalObject = codeBlock()->globalObject();
Debugger* debugger = globalObject->debugger();
char* debuggerAddress = reinterpret_cast<char*>(globalObject) + JSGlobalObject::debuggerOffset();
......@@ -715,6 +715,8 @@ void JIT::emit_op_debug(Instruction* currentInstruction)
callOperation(operationDebug, currentInstruction[1].u.operand);
skipDebugHook.link(this);
noDebugger.link(this);
#else
UNUSED_PARAM(currentInstruction);
#endif
}
......
......@@ -986,7 +986,7 @@ void JIT::emit_op_debug(Instruction* currentInstruction)
#if ENABLE(DEBUG_WITH_BREAKPOINT)
UNUSED_PARAM(currentInstruction);
breakpoint();
#else
#elif ENABLE(JAVASCRIPT_DEBUGGER)
JSGlobalObject* globalObject = codeBlock()->globalObject();
Debugger* debugger = globalObject->debugger();
char* debuggerAddress = reinterpret_cast<char*>(globalObject) + JSGlobalObject::debuggerOffset();
......@@ -997,6 +997,8 @@ void JIT::emit_op_debug(Instruction* currentInstruction)
callOperation(operationDebug, currentInstruction[1].u.operand);
skipDebugHook.link(this);
noDebugger.link(this);
#else
UNUSED_PARAM(currentInstruction);
#endif
}
......
......@@ -154,6 +154,12 @@
#define OFFLINE_ASM_ALWAYS_ALLOCATE_SLOW 0
#endif
#if ENABLE(JAVASCRIPT_DEBUGGER)
#define OFFLINE_ASM_JAVASCRIPT_DEBUGGER 1
#else
#define OFFLINE_ASM_JAVASCRIPT_DEBUGGER 0
#endif
#if ENABLE(VALUE_PROFILER)
#define OFFLINE_ASM_VALUE_PROFILER 1
#else
......
......@@ -820,6 +820,7 @@ _llint_op_profile_did_call:
_llint_op_debug:
if JAVASCRIPT_DEBUGGER
traceExecution()
loadp CodeBlock[cfr], t0
loadp CodeBlock::m_globalObject[t0], t0
......@@ -830,6 +831,7 @@ _llint_op_debug:
callSlowPath(_llint_slow_path_debug)
.opDebugDone:
end
dispatch(2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment