Debian Codegraph @

src/3rdparty/javascriptcore/JavaScriptCore/debugger/DebuggerCallFrame.cpp

raw symbols SCIP
1 /*
2 * Copyright (C) 2008 Apple Inc. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 *
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
14 * its contributors may be used to endorse or promote products derived
15 * from this software without specific prior written permission.
16 *
17 * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20 * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
21 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29 #include "config.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/config.h`/
30 #include "DebuggerCallFrame.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/debugger/DebuggerCallFrame.h`/
31
32 #include "JSFunction.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSFunction.h`/
33 #include "CodeBlock.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/bytecode/CodeBlock.h`/
34 #include "Interpreter.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.h`/
35 #include "Parser.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/parser/Parser.h`/
36
37 namespace JSCcxx . . $ `<built-in>:463:9`! {
38
39 const UStringcxx . . $ QTJSC/UString#* DebuggerCallFramecxx . . $ QTJSC/DebuggerCallFrame#::functionNamecxx . . $ QTJSC/DebuggerCallFrame#functionName(3073ac33136c1dcc).() const
40 {
41 if (!m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->codeBlockcxx . . $ QTJSC/ExecState#codeBlock(a218112474fb222a).())
42 return 0;
43
44 JSFunctioncxx . . $ QTJSC/JSFunction#* function = asFunctioncxx . . $ QTJSC/asFunction(deffc94ad83de35f).(m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->calleecxx . . $ QTJSC/ExecState#callee(8ac23ea934d7a115).());
45 if (!function)
46 return 0;
47 return &function->namecxx . . $ QTJSC/InternalFunction#name(1c31f8efbb776821).(m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.);
48 }
49
50 UStringcxx . . $ QTJSC/UString# DebuggerCallFramecxx . . $ QTJSC/DebuggerCallFrame#::calculatedFunctionNamecxx . . $ QTJSC/DebuggerCallFrame#calculatedFunctionName(ba9ec689f7dd9231).() const
51 {
52 if (!m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->codeBlockcxx . . $ QTJSC/ExecState#codeBlock(a218112474fb222a).())
53 returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). 0cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).;
54
55 JSFunctioncxx . . $ QTJSC/JSFunction#* function = asFunctioncxx . . $ QTJSC/asFunction(deffc94ad83de35f).(m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->calleecxx . . $ QTJSC/ExecState#callee(8ac23ea934d7a115).());
56 if (!function)
57 returncxx . . $ QTJSC/UString#UString(e6bad6cb9b63b14d). 0cxx . . $ QTJSC/UString#UString(85c52e162fed56f9).;
58 return function->calculatedDisplayNamecxx . . $ QTJSC/InternalFunction#calculatedDisplayName(607b87b3e5df695).(m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.);
59 }
60
61 DebuggerCallFramecxx . . $ QTJSC/DebuggerCallFrame#::Typecxx . . $ QTJSC/DebuggerCallFrame#Type# DebuggerCallFramecxx . . $ QTJSC/DebuggerCallFrame#::typecxx . . $ QTJSC/DebuggerCallFrame#type(7abf55029c0564ef).() const
62 {
63 if (m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->calleecxx . . $ QTJSC/ExecState#callee(8ac23ea934d7a115).())
64 return FunctionTypecxx . . $ QTJSC/DebuggerCallFrame#FunctionType.;
65
66 return ProgramTypecxx . . $ QTJSC/DebuggerCallFrame#ProgramType.;
67 }
68
69 JSObjectcxx . . $ QTJSC/JSObject#* DebuggerCallFramecxx . . $ QTJSC/DebuggerCallFrame#::thisObjectcxx . . $ QTJSC/DebuggerCallFrame#thisObject(8ac23ea934d7a115).() const
70 {
71 if (!m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->codeBlockcxx . . $ QTJSC/ExecState#codeBlock(a218112474fb222a).())
72 return 0;
73
74 return asObjectcxx . . $ QTJSC/asObject(107e81180f8dd622).(m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->thisValuecxx . . $ QTJSC/ExecState#thisValue(ad9afe69d7bf6378).());
75 }
76
77 JSValuecxx . . $ QTJSC/JSValue# DebuggerCallFramecxx . . $ QTJSC/DebuggerCallFrame#::evaluatecxx . . $ QTJSC/DebuggerCallFrame#evaluate(8e75206c889aa8e0).(const UStringcxx . . $ QTJSC/UString#& script, JSValuecxx . . $ QTJSC/JSValue#& exception) const
78 {
79 if (!m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->codeBlockcxx . . $ QTJSC/ExecState#codeBlock(a218112474fb222a).())
80 return JSValuecxx . . $ QTJSC/JSValue#JSValue(49f6e7a06ebc5aa8).();
81
82 RefPtrcxx . . $ RefPtr#<EvalExecutablecxx . . $ QTJSC/EvalExecutable#> eval = EvalExecutable::create(m_callFrame, makeSource(script));
83 JSObjectcxx . . $ QTJSC/JSObject#* error = eval->compile(m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame., m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->scopeChaincxx . . $ QTJSC/ExecState#scopeChain(7483ce9f56294eec).());
84 if (error)
85 return error;
86
87 return m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->scopeChaincxx . . $ QTJSC/ExecState#scopeChain(7483ce9f56294eec).()->globalDatacxx . . $ QTJSC/ScopeChainNode#globalData.->interpretercxx . . $ QTJSC/JSGlobalData#interpreter.->executecxx . . $ QTJSC/Interpreter#execute(e434fcb808a05019).(eval.get(), m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame., thisObjectcxx . . $ QTJSC/DebuggerCallFrame#thisObject(8ac23ea934d7a115).(), m_callFramecxx . . $ QTJSC/DebuggerCallFrame#m_callFrame.->scopeChaincxx . . $ QTJSC/ExecState#scopeChain(7483ce9f56294eec).(), &exception);
88 }
89
90 } // namespace JSC