Interpreter::unwind() has no need for the bytecodeOffset
https://bugs.webkit.org/show_bug.cgi?id=121755

Reviewed by Oliver Hunt.
        
It was only using the bytecodeOffset for some debugger stuff, but the debugger could
just get the bytecodeOffset the same way the rest of the machinery does: by using the
CallFrame's location.
        
It turns out that a lot of really ugly code was in place just to supply this
bytecodeOffset. This patch kills most of that code, and allows us to kill even more
code in a future patch - though most likely that killage will involve further
refactorings as well, see https://bugs.webkit.org/show_bug.cgi?id=121734.

* dfg/DFGOperations.cpp:
* interpreter/CallFrame.cpp:
(JSC::CallFrame::bytecodeOffset):
(JSC::CallFrame::codeOrigin):
* interpreter/CallFrame.h:
* interpreter/Interpreter.cpp:
(JSC::Interpreter::unwind):
* interpreter/Interpreter.h:
* jit/JITExceptions.cpp:
(JSC::genericUnwind):
* jit/JITExceptions.h:
* jit/JITStubs.cpp:
(JSC::DEFINE_STUB_FUNCTION):
(JSC::cti_vm_handle_exception):
* llint/LLIntExceptions.cpp:
(JSC::LLInt::doThrow):
(JSC::LLInt::returnToThrow):
(JSC::LLInt::callToThrow):
* llint/LLIntExceptions.h:
* llint/LLIntSlowPaths.cpp:
(JSC::LLInt::LLINT_SLOW_PATH_DECL):
* runtime/CommonSlowPaths.cpp:
(JSC::SLOW_PATH_DECL):
* runtime/CommonSlowPathsExceptions.cpp:
(JSC::CommonSlowPaths::interpreterThrowInCaller):
* runtime/CommonSlowPathsExceptions.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/JavaScriptCore/interpreter/CallFrame.h b/Source/JavaScriptCore/interpreter/CallFrame.h
index e06e322..63a3d27 100644
--- a/Source/JavaScriptCore/interpreter/CallFrame.h
+++ b/Source/JavaScriptCore/interpreter/CallFrame.h
@@ -164,6 +164,17 @@
 #if ENABLE(DFG_JIT)
         unsigned bytecodeOffsetFromCodeOriginIndex();
 #endif
+        
+        // This will try to get you the bytecode offset, but you should be aware that
+        // this bytecode offset may be bogus in the presence of inlining. This will
+        // also return 0 if the call frame has no notion of bytecode offsets (for
+        // example if it's native code).
+        // https://bugs.webkit.org/show_bug.cgi?id=121754
+        unsigned bytecodeOffset();
+        
+        // This will get you a CodeOrigin. It will always succeed. May return
+        // CodeOrigin(0) if we're in native code.
+        CodeOrigin codeOrigin();
 
         Register* frameExtent()
         {