Rename DebugHookID to DebugHookType
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Oct 2016 15:32:59 +0000 (15:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 1 Oct 2016 15:32:59 +0000 (15:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=162820

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-10-01
Reviewed by Alex Christensen.

* bytecode/CodeBlock.cpp:
(JSC::debugHookName):
(JSC::CodeBlock::dumpBytecode):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::emitDebugHook):
* bytecompiler/BytecodeGenerator.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::debug):
* interpreter/Interpreter.h:
* jit/JITOperations.cpp:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@206707 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/bytecode/CodeBlock.cpp
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp
Source/JavaScriptCore/bytecompiler/BytecodeGenerator.h
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/interpreter/Interpreter.h
Source/JavaScriptCore/jit/JITOperations.cpp
Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

index 562af4d..d2d9be7 100644 (file)
@@ -1,3 +1,23 @@
+2016-10-01  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Rename DebugHookID to DebugHookType
+        https://bugs.webkit.org/show_bug.cgi?id=162820
+
+        Reviewed by Alex Christensen.
+
+        * bytecode/CodeBlock.cpp:
+        (JSC::debugHookName):
+        (JSC::CodeBlock::dumpBytecode):
+        * bytecompiler/BytecodeGenerator.cpp:
+        (JSC::BytecodeGenerator::emitDebugHook):
+        * bytecompiler/BytecodeGenerator.h:
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::debug):
+        * interpreter/Interpreter.h:
+        * jit/JITOperations.cpp:
+        * llint/LLIntSlowPaths.cpp:
+        (JSC::LLInt::LLINT_SLOW_PATH_DECL):
+
 2016-09-30  Joseph Pecoraro  <pecoraro@apple.com>
 
         Web Inspector: Stepping to a line with an autoContinue breakpoint should still pause
index 44a9bd5..8bd9cbc 100644 (file)
@@ -299,9 +299,9 @@ static CString regexpName(int re, RegExp* regexp)
     return toCString(regexpToSourceString(regexp), "(@re", re, ")");
 }
 
-NEVER_INLINE static const char* debugHookName(int debugHookID)
+NEVER_INLINE static const char* debugHookName(int debugHookType)
 {
-    switch (static_cast<DebugHookID>(debugHookID)) {
+    switch (static_cast<DebugHookType>(debugHookType)) {
         case DidEnterCallFrame:
             return "didEnterCallFrame";
         case WillLeaveCallFrame:
@@ -1661,10 +1661,10 @@ void CodeBlock::dumpBytecode(
             break;
         }
         case op_debug: {
-            int debugHookID = (++it)->u.operand;
+            int debugHookType = (++it)->u.operand;
             int hasBreakpointFlag = (++it)->u.operand;
             printLocationAndOp(out, exec, location, it, "debug");
-            out.printf("%s, %d", debugHookName(debugHookID), hasBreakpointFlag);
+            out.printf("%s, %d", debugHookName(debugHookType), hasBreakpointFlag);
             break;
         }
         case op_assert: {
index d96d859..bad5571 100644 (file)
@@ -3459,20 +3459,20 @@ void BytecodeGenerator::emitPopWithScope()
     RELEASE_ASSERT(stackEntry.m_isWithScope);
 }
 
-void BytecodeGenerator::emitDebugHook(DebugHookID debugHookID, const JSTextPosition& divot)
+void BytecodeGenerator::emitDebugHook(DebugHookType debugHookType, const JSTextPosition& divot)
 {
     if (!m_shouldEmitDebugHooks)
         return;
 
     emitExpressionInfo(divot, divot, divot);
     emitOpcode(op_debug);
-    instructions().append(debugHookID);
+    instructions().append(debugHookType);
     instructions().append(false);
 }
 
-void BytecodeGenerator::emitDebugHook(DebugHookID debugHookID, unsigned line, unsigned charOffset, unsigned lineStart)
+void BytecodeGenerator::emitDebugHook(DebugHookType debugHookType, unsigned line, unsigned charOffset, unsigned lineStart)
 {
-    emitDebugHook(debugHookID, JSTextPosition(line, charOffset, lineStart));
+    emitDebugHook(debugHookType, JSTextPosition(line, charOffset, lineStart));
 }
 
 void BytecodeGenerator::emitDebugHook(StatementNode* statement)
@@ -3481,10 +3481,10 @@ void BytecodeGenerator::emitDebugHook(StatementNode* statement)
     emitDebugHook(WillExecuteStatement, statement->position());
 }
 
-void BytecodeGenerator::emitDebugHook(ExpressionNode* expr, DebugHookID debugHookID)
+void BytecodeGenerator::emitDebugHook(ExpressionNode* expr, DebugHookType debugHookType)
 {
     RELEASE_ASSERT(expr->needsDebugHook());
-    emitDebugHook(debugHookID, expr->position());
+    emitDebugHook(debugHookType, expr->position());
 }
 
 void BytecodeGenerator::emitWillLeaveCallFrameDebugHook()
index a9c37d2..3e56ca7 100644 (file)
@@ -676,10 +676,10 @@ namespace JSC {
         void emitPutDerivedConstructorToArrowFunctionContextScope();
         RegisterID* emitLoadDerivedConstructorFromArrowFunctionLexicalEnvironment();
 
-        void emitDebugHook(DebugHookID, const JSTextPosition&);
-        void emitDebugHook(DebugHookID, unsigned line, unsigned charOffset, unsigned lineStart);
+        void emitDebugHook(DebugHookType, const JSTextPosition&);
+        void emitDebugHook(DebugHookType, unsigned line, unsigned charOffset, unsigned lineStart);
         void emitDebugHook(StatementNode*);
-        void emitDebugHook(ExpressionNode*, DebugHookID);
+        void emitDebugHook(ExpressionNode*, DebugHookType);
         void emitWillLeaveCallFrameDebugHook();
 
         bool isInFinallyBlock() { return m_finallyDepth > 0; }
index 51134c8..6c2a1ec 100644 (file)
@@ -1220,7 +1220,7 @@ JSValue Interpreter::execute(ModuleProgramExecutable* executable, CallFrame* cal
     return checkedReturn(result);
 }
 
-NEVER_INLINE void Interpreter::debug(CallFrame* callFrame, DebugHookID debugHookID)
+NEVER_INLINE void Interpreter::debug(CallFrame* callFrame, DebugHookType debugHookType)
 {
     VM& vm = callFrame->vm();
     auto scope = DECLARE_CATCH_SCOPE(vm);
@@ -1231,7 +1231,7 @@ NEVER_INLINE void Interpreter::debug(CallFrame* callFrame, DebugHookID debugHook
     ASSERT(callFrame->codeBlock()->hasDebuggerRequests());
     ASSERT_UNUSED(scope, !scope.exception());
 
-    switch (debugHookID) {
+    switch (debugHookType) {
         case DidEnterCallFrame:
             debugger->callEvent(callFrame);
             break;
index 29dd462..ae9ae28 100644 (file)
@@ -67,7 +67,7 @@ namespace JSC {
 
     enum UnwindStart : uint8_t { UnwindFromCurrentFrame, UnwindFromCallerFrame };
 
-    enum DebugHookID {
+    enum DebugHookType {
         WillExecuteProgram,
         DidExecuteProgram,
         DidEnterCallFrame,
@@ -210,7 +210,7 @@ namespace JSC {
         
         NEVER_INLINE HandlerInfo* unwind(VM&, CallFrame*&, Exception*, UnwindStart);
         void notifyDebuggerOfExceptionToBeThrown(CallFrame*, Exception*);
-        NEVER_INLINE void debug(CallFrame*, DebugHookID);
+        NEVER_INLINE void debug(CallFrame*, DebugHookType);
         static JSString* stackTraceAsString(VM&, const Vector<StackFrame>&);
 
         static EncodedJSValue JSC_HOST_CALL constructWithErrorConstructor(ExecState*);
index e65a76b..f1ff5ed 100644 (file)
@@ -1179,12 +1179,12 @@ void JIT_OPERATION operationThrowStaticError(ExecState* exec, EncodedJSValue enc
         throwTypeError(exec, scope, errorMessage);
 }
 
-void JIT_OPERATION operationDebug(ExecState* exec, int32_t debugHookID)
+void JIT_OPERATION operationDebug(ExecState* exec, int32_t debugHookType)
 {
     VM& vm = exec->vm();
     NativeCallFrameTracer tracer(&vm, exec);
 
-    vm.interpreter->debug(exec, static_cast<DebugHookID>(debugHookID));
+    vm.interpreter->debug(exec, static_cast<DebugHookType>(debugHookType));
 }
 
 #if ENABLE(DFG_JIT)
index bcecb57..2dad569 100644 (file)
@@ -1498,8 +1498,8 @@ LLINT_SLOW_PATH_DECL(slow_path_handle_watchdog_timer)
 LLINT_SLOW_PATH_DECL(slow_path_debug)
 {
     LLINT_BEGIN();
-    int debugHookID = pc[1].u.operand;
-    vm.interpreter->debug(exec, static_cast<DebugHookID>(debugHookID));
+    int debugHookType = pc[1].u.operand;
+    vm.interpreter->debug(exec, static_cast<DebugHookType>(debugHookType));
     
     LLINT_END();
 }