Add JSCallee to program and eval CallFrames
authormsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Sep 2014 05:21:44 +0000 (05:21 +0000)
committermsaboff@apple.com <msaboff@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Sep 2014 05:21:44 +0000 (05:21 +0000)
commitc5f02be2d8f28a4317668d41ca61e7947b1422d8
tree22bcfee50fc445313996d52af8b3041efd483978
parent195de6ea107d6a17a3e10b57c1a174e6a314b9f1
Add JSCallee to program and eval CallFrames
https://bugs.webkit.org/show_bug.cgi?id=136785

Reviewed by Mark Lam.

Populated Callee slot for program and call eval CallFrames with a JSCallee objects.
Made supporting changes including adding a JSCallee structure to global object and adding
JSCallee::create() method.  Added code so that the newly added callee object won't be
returned by Function.caller.  Changed null pointer checks of callee to check the if
the type is JSFunction* or JSCallee*.

* debugger/DebuggerCallFrame.cpp:
(JSC::DebuggerCallFrame::functionName):
(JSC::DebuggerCallFrame::type):
* profiler/LegacyProfiler.cpp:
(JSC::LegacyProfiler::createCallIdentifier):
* interpreter/Interpreter.cpp:
(JSC::unwindCallFrame):
Changed checks of callee is a JSFunction* or JSCallee* instead of just checking
if it is null or not.

* interpreter/Interpreter.cpp:
(JSC::Interpreter::execute): Create and use JSCallee objects for execute(EvalExecutable, ...)
and execute(ProgramExecutable, ...)

* jit/JITCode.cpp:
(JSC::JITCode::execute): Use jsDynamicCast to cast only JSFunctions.

* runtime/JSCallee.cpp:
(JSC::JSCallee::create): Not used, therefore deleted.

* runtime/JSCallee.h:
(JSC::JSCallee::create): Added.

* runtime/JSFunction.cpp:
(JSC::JSFunction::callerGetter): Added test to return null for JSCallee's that aren't
JSFunction's.  This can only be the case when the JSCallee comes from a program or
call eval CallFrame.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::reset):
(JSC::JSGlobalObject::visitChildren):
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::calleeStructure):
Added new JSCallee structure.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173600 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp
Source/JavaScriptCore/interpreter/Interpreter.cpp
Source/JavaScriptCore/jit/JITCode.cpp
Source/JavaScriptCore/profiler/LegacyProfiler.cpp
Source/JavaScriptCore/runtime/JSCallee.cpp
Source/JavaScriptCore/runtime/JSCallee.h
Source/JavaScriptCore/runtime/JSFunction.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.cpp
Source/JavaScriptCore/runtime/JSGlobalObject.h