Title: [160082] trunk/Source/_javascript_Core
Revision
160082
Author
[email protected]
Date
2013-12-04 01:57:48 -0800 (Wed, 04 Dec 2013)

Log Message

Fix !ENABLE(_javascript__DEBUGGER) build.
https://bugs.webkit.org/show_bug.cgi?id=125083

Patch by Peter Molnar <[email protected]> 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:

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (160081 => 160082)


--- trunk/Source/_javascript_Core/ChangeLog	2013-12-04 09:56:14 UTC (rev 160081)
+++ trunk/Source/_javascript_Core/ChangeLog	2013-12-04 09:57:48 UTC (rev 160082)
@@ -1,3 +1,32 @@
+2013-12-04  Peter Molnar  <[email protected]>
+
+        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  <[email protected]>
 
         testapi test crashes on Windows in WTF::Vector<wchar_t,64,WTF::UnsafeVectorOverflow>::size().

Modified: trunk/Source/_javascript_Core/debugger/Debugger.cpp (160081 => 160082)


--- trunk/Source/_javascript_Core/debugger/Debugger.cpp	2013-12-04 09:56:14 UTC (rev 160081)
+++ trunk/Source/_javascript_Core/debugger/Debugger.cpp	2013-12-04 09:57:48 UTC (rev 160082)
@@ -20,6 +20,8 @@
  */
 
 #include "config.h"
+#if ENABLE(_javascript__DEBUGGER)
+
 #include "Debugger.h"
 
 #include "DebuggerCallFrame.h"
@@ -587,3 +589,5 @@
 }
 
 } // namespace JSC
+
+#endif // ENABLE(_javascript__DEBUGGER)

Modified: trunk/Source/_javascript_Core/debugger/Debugger.h (160081 => 160082)


--- trunk/Source/_javascript_Core/debugger/Debugger.h	2013-12-04 09:56:14 UTC (rev 160081)
+++ trunk/Source/_javascript_Core/debugger/Debugger.h	2013-12-04 09:57:48 UTC (rev 160082)
@@ -41,6 +41,8 @@
 
 typedef ExecState CallFrame;
 
+#if ENABLE(_javascript__DEBUGGER)
+
 class JS_EXPORT_PRIVATE Debugger {
 public:
     Debugger(bool isInWorkerThread = false);
@@ -189,6 +191,26 @@
     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

Modified: trunk/Source/_javascript_Core/debugger/DebuggerPrimitives.h (160081 => 160082)


--- trunk/Source/_javascript_Core/debugger/DebuggerPrimitives.h	2013-12-04 09:56:14 UTC (rev 160081)
+++ trunk/Source/_javascript_Core/debugger/DebuggerPrimitives.h	2013-12-04 09:57:48 UTC (rev 160082)
@@ -26,8 +26,6 @@
 #ifndef DebuggerPrimitives_h
 #define DebuggerPrimitives_h
 
-#if ENABLE(_javascript__DEBUGGER)
-
 namespace JSC {
 
 typedef size_t SourceID;
@@ -38,6 +36,4 @@
 
 } // namespace JSC
 
-#endif // ENABLE(_javascript__DEBUGGER)
-
 #endif // DebuggerPrimitives_h

Modified: trunk/Source/_javascript_Core/jit/JITOpcodes.cpp (160081 => 160082)


--- trunk/Source/_javascript_Core/jit/JITOpcodes.cpp	2013-12-04 09:56:14 UTC (rev 160081)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes.cpp	2013-12-04 09:57:48 UTC (rev 160082)
@@ -705,7 +705,7 @@
 #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 @@
     callOperation(operationDebug, currentInstruction[1].u.operand);
     skipDebugHook.link(this);
     noDebugger.link(this);
+#else
+    UNUSED_PARAM(currentInstruction);
 #endif
 }
 

Modified: trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp (160081 => 160082)


--- trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp	2013-12-04 09:56:14 UTC (rev 160081)
+++ trunk/Source/_javascript_Core/jit/JITOpcodes32_64.cpp	2013-12-04 09:57:48 UTC (rev 160082)
@@ -986,7 +986,7 @@
 #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 @@
     callOperation(operationDebug, currentInstruction[1].u.operand);
     skipDebugHook.link(this);
     noDebugger.link(this);
+#else
+    UNUSED_PARAM(currentInstruction);
 #endif
 }
 

Modified: trunk/Source/_javascript_Core/llint/LLIntOfflineAsmConfig.h (160081 => 160082)


--- trunk/Source/_javascript_Core/llint/LLIntOfflineAsmConfig.h	2013-12-04 09:56:14 UTC (rev 160081)
+++ trunk/Source/_javascript_Core/llint/LLIntOfflineAsmConfig.h	2013-12-04 09:57:48 UTC (rev 160082)
@@ -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

Modified: trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm (160081 => 160082)


--- trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2013-12-04 09:56:14 UTC (rev 160081)
+++ trunk/Source/_javascript_Core/llint/LowLevelInterpreter.asm	2013-12-04 09:57:48 UTC (rev 160082)
@@ -820,6 +820,7 @@
 
 
 _llint_op_debug:
+if _javascript__DEBUGGER
     traceExecution()
     loadp CodeBlock[cfr], t0
     loadp CodeBlock::m_globalObject[t0], t0
@@ -830,6 +831,7 @@
 
     callSlowPath(_llint_slow_path_debug)
 .opDebugDone:                    
+end
     dispatch(2)
 
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to