Debian Codegraph @

src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.h

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 #ifndef Interpreter_h
30 #define Interpreter_hcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/interpreter/Interpreter.h:30:9`!
31
32 #include "ArgList.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/ArgList.h`/
33 #include "FastAllocBase.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/FastAllocBase.h`/
34 #include "JSCell.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSCell.h`/
35 #include "JSValue.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSValue.h`/
36 #include "JSObject.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/runtime/JSObject.h`/
37 #include "Opcode.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/bytecode/Opcode.h`/
38 #include "RegisterFile.h"cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/interpreter/RegisterFile.h`/
39
40 #include <wtf/HashMap.h>cxx . . $ `<file>/src/3rdparty/javascriptcore/JavaScriptCore/wtf/HashMap.h`/
41
42 namespace JSCcxx . . $ `<built-in>:463:9`! {
43
44 class CodeBlockcxx . . $ QTJSC/CodeBlock#;
45 class EvalExecutablecxx . . $ QTJSC/EvalExecutable#;
46 class FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#;
47 class InternalFunctioncxx . . $ QTJSC/InternalFunction#;
48 class JSFunctioncxx . . $ QTJSC/JSFunction#;
49 class JSGlobalObjectcxx . . $ QTJSC/JSGlobalObject#;
50 class ProgramExecutablecxx . . $ QTJSC/ProgramExecutable#;
51 class Registercxx . . $ QTJSC/Register#;
52 class ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#;
53 class SamplingToolcxx . . $ QTJSC/SamplingTool#;
54 struct CallFrameClosurecxx . . $ QTJSC/CallFrameClosure#;
55 struct HandlerInfocxx . . $ QTJSC/HandlerInfo#;
56 struct Instructioncxx . . $ QTJSC/Instruction#;
57
58 enum DebugHookIDcxx . . $ QTJSC/DebugHookID# {
59 WillExecuteProgramcxx . . $ QTJSC/WillExecuteProgram.,
60 DidExecuteProgramcxx . . $ QTJSC/DidExecuteProgram.,
61 DidEnterCallFramecxx . . $ QTJSC/DidEnterCallFrame.,
62 DidReachBreakpointcxx . . $ QTJSC/DidReachBreakpoint.,
63 WillLeaveCallFramecxx . . $ QTJSC/WillLeaveCallFrame.,
64 WillExecuteStatementcxx . . $ QTJSC/WillExecuteStatement.
65 };
66
67 enumcxx . . $ QTJSC/$anonymous_type_2ad394965a2a9803_0# { MaxMainThreadReentryDepthcxx . . $ QTJSC/MaxMainThreadReentryDepth. = 256, MaxSecondaryThreadReentryDepthcxx . . $ QTJSC/MaxSecondaryThreadReentryDepth. = 32 };
68
69 class Interpretercxx . . $ QTJSC/Interpreter# : public FastAllocBasecxx . . $ FastAllocBase# {
70 friend class JITcxx . . $ QTJSC/JIT#;
71 friend class CachedCallcxx . . $ QTJSC/CachedCall#;
72 public:
73 Interpretercxx . . $ QTJSC/Interpreter#Interpreter(49f6e7a06ebc5aa8).();
74
75 RegisterFilecxx . . $ QTJSC/RegisterFile#& registerFilecxx . . $ QTJSC/Interpreter#registerFile(2b422a0e2f5a1a12).() { return m_registerFilecxx . . $ QTJSC/Interpreter#m_registerFile.; }
76
77 Opcodecxx . . $ QTJSC/Opcode# getOpcodecxx . . $ QTJSC/Interpreter#getOpcode(720968b0507a9cd2).(OpcodeIDcxx . . $ QTJSC/OpcodeID# id)
78 {
79 #if HAVEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:46:9`!(COMPUTED_GOTO)
80 return m_opcodeTable[id];
81 #else
82 return id;
83 #endif
84 }
85
86 OpcodeIDcxx . . $ QTJSC/OpcodeID# getOpcodeIDcxx . . $ QTJSC/Interpreter#getOpcodeID(720968b0507a9cd2).(Opcodecxx . . $ QTJSC/Opcode# opcode)
87 {
88 #if HAVEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:46:9`!(COMPUTED_GOTO)
89 ASSERT(isOpcode(opcode));
90 return m_opcodeIDTable.get(opcode);
91 #else
92 return opcode;
93 #endif
94 }
95
96 bool isOpcodecxx . . $ QTJSC/Interpreter#isOpcode(57a48c2bec783e6d).(Opcodecxx . . $ QTJSC/Opcode#);
97
98 JSValuecxx . . $ QTJSC/JSValue# executecxx . . $ QTJSC/Interpreter#execute(ea0451e50c68f2ec).(ProgramExecutablecxx . . $ QTJSC/ProgramExecutable#*, CallFramecxx . . $ QTJSC/CallFrame#*, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#*, JSObjectcxx . . $ QTJSC/JSObject#* thisObj, JSValuecxx . . $ QTJSC/JSValue#* exception);
99 JSValuecxx . . $ QTJSC/JSValue# executecxx . . $ QTJSC/Interpreter#execute(a0a052767767bb53).(FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#*, CallFramecxx . . $ QTJSC/CallFrame#*, JSFunctioncxx . . $ QTJSC/JSFunction#*, JSObjectcxx . . $ QTJSC/JSObject#* thisObj, const ArgListcxx . . $ QTJSC/ArgList#& args, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#*, JSValuecxx . . $ QTJSC/JSValue#* exception);
100 JSValuecxx . . $ QTJSC/JSValue# executecxx . . $ QTJSC/Interpreter#execute(e434fcb808a05019).(EvalExecutablecxx . . $ QTJSC/EvalExecutable#* evalNode, CallFramecxx . . $ QTJSC/CallFrame#* exec, JSObjectcxx . . $ QTJSC/JSObject#* thisObj, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* scopeChain, JSValuecxx . . $ QTJSC/JSValue#* exception);
101
102 JSValuecxx . . $ QTJSC/JSValue# retrieveArgumentscxx . . $ QTJSC/Interpreter#retrieveArguments(3f9d942197bdd3cc).(CallFramecxx . . $ QTJSC/CallFrame#*, JSFunctioncxx . . $ QTJSC/JSFunction#*) const;
103 JSValuecxx . . $ QTJSC/JSValue# retrieveCallercxx . . $ QTJSC/Interpreter#retrieveCaller(ba763e7f33a9c8e7).(CallFramecxx . . $ QTJSC/CallFrame#*, InternalFunctioncxx . . $ QTJSC/InternalFunction#*) const;
104 void retrieveLastCallercxx . . $ QTJSC/Interpreter#retrieveLastCaller(6e6ec479fcebc00b).(CallFramecxx . . $ QTJSC/CallFrame#*, int& lineNumber, intptr_tcxx . . $ intptr_t#& sourceID, UStringcxx . . $ QTJSC/UString#& sourceURL, JSValuecxx . . $ QTJSC/JSValue#& function) const;
105
106 void getArgumentsDatacxx . . $ QTJSC/Interpreter#getArgumentsData(9456cbbc25d59b11).(CallFramecxx . . $ QTJSC/CallFrame#*, JSFunctioncxx . . $ QTJSC/JSFunction#*&, ptrdiff_t& firstParameterIndex, Registercxx . . $ QTJSC/Register#*& argv, int& argc);
107
108 SamplingToolcxx . . $ QTJSC/SamplingTool#* samplercxx . . $ QTJSC/Interpreter#sampler(902396b2a87066b9).() { return m_sampler.get(); }
109
110 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! JSValuecxx . . $ QTJSC/JSValue# callEvalcxx . . $ QTJSC/Interpreter#callEval(4bdce225fb768eec).(CallFramecxx . . $ QTJSC/CallFrame#*, RegisterFilecxx . . $ QTJSC/RegisterFile#*, Registercxx . . $ QTJSC/Register#* argv, int argc, int registerOffset, JSValuecxx . . $ QTJSC/JSValue#& exceptionValue);
111 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! HandlerInfocxx . . $ QTJSC/HandlerInfo#* throwExceptioncxx . . $ QTJSC/Interpreter#throwException(972d677959466ec).(CallFramecxx . . $ QTJSC/CallFrame#*&, JSValuecxx . . $ QTJSC/JSValue#&, unsigned bytecodeOffset, bool);
112 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! void debugcxx . . $ QTJSC/Interpreter#debug(c71a0da09f7d1644).(CallFramecxx . . $ QTJSC/CallFrame#*, DebugHookIDcxx . . $ QTJSC/DebugHookID#, int firstLine, int lastLine);
113
114 void dumpSampleDatacxx . . $ QTJSC/Interpreter#dumpSampleData(d2cb180e190a9680).(ExecStatecxx . . $ QTJSC/ExecState#* exec);
115 void startSamplingcxx . . $ QTJSC/Interpreter#startSampling(49f6e7a06ebc5aa8).();
116 void stopSamplingcxx . . $ QTJSC/Interpreter#stopSampling(49f6e7a06ebc5aa8).();
117 private:
118 enum ExecutionFlagcxx . . $ QTJSC/Interpreter#ExecutionFlag# { Normalcxx . . $ QTJSC/Interpreter#Normal., InitializeAndReturncxx . . $ QTJSC/Interpreter#InitializeAndReturn. };
119
120 CallFrameClosurecxx . . $ QTJSC/CallFrameClosure# prepareForRepeatCallcxx . . $ QTJSC/Interpreter#prepareForRepeatCall(4e6bc6f4477ad73c).(FunctionExecutablecxx . . $ QTJSC/FunctionExecutable#*, CallFramecxx . . $ QTJSC/CallFrame#*, JSFunctioncxx . . $ QTJSC/JSFunction#*, int argCount, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#*, JSValuecxx . . $ QTJSC/JSValue#* exception);
121 void endRepeatCallcxx . . $ QTJSC/Interpreter#endRepeatCall(e91d858123f36bc2).(CallFrameClosurecxx . . $ QTJSC/CallFrameClosure#&);
122 JSValuecxx . . $ QTJSC/JSValue# executecxx . . $ QTJSC/Interpreter#execute(c7284d9f486c89c0).(CallFrameClosurecxx . . $ QTJSC/CallFrameClosure#&, JSValuecxx . . $ QTJSC/JSValue#* exception);
123
124 JSValuecxx . . $ QTJSC/JSValue# executecxx . . $ QTJSC/Interpreter#execute(7ce193c050309b77).(EvalExecutablecxx . . $ QTJSC/EvalExecutable#*, CallFramecxx . . $ QTJSC/CallFrame#*, JSObjectcxx . . $ QTJSC/JSObject#* thisObject, int globalRegisterOffset, ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#*, JSValuecxx . . $ QTJSC/JSValue#* exception);
125
126 #if USEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:55:9`!(INTERPRETER)
127 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! bool resolvecxx . . $ QTJSC/Interpreter#resolve(e9662bd2f3b07389).(CallFramecxx . . $ QTJSC/CallFrame#*, Instructioncxx . . $ QTJSC/Instruction#*, JSValuecxx . . $ QTJSC/JSValue#& exceptionValue);
128 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! bool resolveSkipcxx . . $ QTJSC/Interpreter#resolveSkip(e9662bd2f3b07389).(CallFramecxx . . $ QTJSC/CallFrame#*, Instructioncxx . . $ QTJSC/Instruction#*, JSValuecxx . . $ QTJSC/JSValue#& exceptionValue);
129 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! bool resolveGlobalcxx . . $ QTJSC/Interpreter#resolveGlobal(e9662bd2f3b07389).(CallFramecxx . . $ QTJSC/CallFrame#*, Instructioncxx . . $ QTJSC/Instruction#*, JSValuecxx . . $ QTJSC/JSValue#& exceptionValue);
130 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! void resolveBasecxx . . $ QTJSC/Interpreter#resolveBase(517deae919ca8335).(CallFramecxx . . $ QTJSC/CallFrame#*, Instructioncxx . . $ QTJSC/Instruction#* vPC);
131 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! bool resolveBaseAndPropertycxx . . $ QTJSC/Interpreter#resolveBaseAndProperty(e9662bd2f3b07389).(CallFramecxx . . $ QTJSC/CallFrame#*, Instructioncxx . . $ QTJSC/Instruction#*, JSValuecxx . . $ QTJSC/JSValue#& exceptionValue);
132 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! ScopeChainNodecxx . . $ QTJSC/ScopeChainNode#* createExceptionScopecxx . . $ QTJSC/Interpreter#createExceptionScope(3bac64aecf298d70).(CallFramecxx . . $ QTJSC/CallFrame#*, const Instructioncxx . . $ QTJSC/Instruction#* vPC);
133
134 void tryCacheGetByIDcxx . . $ QTJSC/Interpreter#tryCacheGetByID(23395d0f6397311).(CallFramecxx . . $ QTJSC/CallFrame#*, CodeBlockcxx . . $ QTJSC/CodeBlock#*, Instructioncxx . . $ QTJSC/Instruction#*, JSValuecxx . . $ QTJSC/JSValue# baseValue, const Identifiercxx . . $ QTJSC/Identifier#& propertyName, const PropertySlotcxx . . $ QTJSC/PropertySlot#&);
135 void uncacheGetByIDcxx . . $ QTJSC/Interpreter#uncacheGetByID(dd36cf60fd3c15f9).(CodeBlockcxx . . $ QTJSC/CodeBlock#*, Instructioncxx . . $ QTJSC/Instruction#* vPC);
136 void tryCachePutByIDcxx . . $ QTJSC/Interpreter#tryCachePutByID(36a58bce16894de9).(CallFramecxx . . $ QTJSC/CallFrame#*, CodeBlockcxx . . $ QTJSC/CodeBlock#*, Instructioncxx . . $ QTJSC/Instruction#*, JSValuecxx . . $ QTJSC/JSValue# baseValue, const PutPropertySlotcxx . . $ QTJSC/PutPropertySlot#&);
137 void uncachePutByIDcxx . . $ QTJSC/Interpreter#uncachePutByID(dd36cf60fd3c15f9).(CodeBlockcxx . . $ QTJSC/CodeBlock#*, Instructioncxx . . $ QTJSC/Instruction#* vPC);
138 #endif
139
140 NEVER_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:35:9`! bool unwindCallFramecxx . . $ QTJSC/Interpreter#unwindCallFrame(852e8bd52d428ea3).(CallFramecxx . . $ QTJSC/CallFrame#*&, JSValuecxx . . $ QTJSC/JSValue#, unsigned& bytecodeOffset, CodeBlockcxx . . $ QTJSC/CodeBlock#*&);
141
142 static ALWAYS_INLINEcxx . . $ `../3rdparty/javascriptcore/JavaScriptCore/wtf/AlwaysInline.h:25:9`! CallFramecxx . . $ QTJSC/CallFrame#* slideRegisterWindowForCallcxx . . $ QTJSC/Interpreter#slideRegisterWindowForCall(c83f7e92863d893d).(CodeBlockcxx . . $ QTJSC/CodeBlock#*, RegisterFilecxx . . $ QTJSC/RegisterFile#*, CallFramecxx . . $ QTJSC/CallFrame#*, size_tcxx . . $ size_t# registerOffset, int argc);
143
144 static CallFramecxx . . $ QTJSC/CallFrame#* findFunctionCallFramecxx . . $ QTJSC/Interpreter#findFunctionCallFrame(b0f7cfc5c7e3e1d4).(CallFramecxx . . $ QTJSC/CallFrame#*, InternalFunctioncxx . . $ QTJSC/InternalFunction#*);
145
146 JSValuecxx . . $ QTJSC/JSValue# privateExecutecxx . . $ QTJSC/Interpreter#privateExecute(32954e9b28fd0918).(ExecutionFlagcxx . . $ QTJSC/Interpreter#ExecutionFlag#, RegisterFilecxx . . $ QTJSC/RegisterFile#*, CallFramecxx . . $ QTJSC/CallFrame#*, JSValuecxx . . $ QTJSC/JSValue#* exception);
147
148 void dumpCallFramecxx . . $ QTJSC/Interpreter#dumpCallFrame(d2cb180e190a9680).(CallFramecxx . . $ QTJSC/CallFrame#*);
149 void dumpRegisterscxx . . $ QTJSC/Interpreter#dumpRegisters(d2cb180e190a9680).(CallFramecxx . . $ QTJSC/CallFrame#*);
150
151 bool isCallBytecodecxx . . $ QTJSC/Interpreter#isCallBytecode(57a48c2bec783e6d).(Opcodecxx . . $ QTJSC/Opcode# opcode) { return opcode == getOpcodecxx . . $ QTJSC/Interpreter#getOpcode(720968b0507a9cd2).(op_callcxx . . $ QTJSC/op_call.) || opcode == getOpcodecxx . . $ QTJSC/Interpreter#getOpcode(720968b0507a9cd2).(op_constructcxx . . $ QTJSC/op_construct.) || opcode == getOpcodecxx . . $ QTJSC/Interpreter#getOpcode(720968b0507a9cd2).(op_call_evalcxx . . $ QTJSC/op_call_eval.); }
152
153 void enableSamplercxx . . $ QTJSC/Interpreter#enableSampler(49f6e7a06ebc5aa8).();
154 int m_sampleEntryDepthcxx . . $ QTJSC/Interpreter#m_sampleEntryDepth.;
155 OwnPtrcxx . . $ OwnPtr#<SamplingToolcxx . . $ QTJSC/SamplingTool#> m_samplercxx . . $ QTJSC/Interpreter#m_sampler.;
156
157 int m_reentryDepthcxx . . $ QTJSC/Interpreter#m_reentryDepth.;
158
159 RegisterFilecxx . . $ QTJSC/RegisterFile# m_registerFilecxx . . $ QTJSC/Interpreter#m_registerFile.;
160
161 #if HAVEcxx . . $ `src/3rdparty/javascriptcore/JavaScriptCore/wtf/Platform.h:46:9`!(COMPUTED_GOTO)
162 Opcode m_opcodeTable[numOpcodeIDs]; // Maps OpcodeID => Opcode for compiling
163 HashMap<Opcode, OpcodeID> m_opcodeIDTable; // Maps Opcode => OpcodeID for decompiling
164 #endif
165 };
166
167 } // namespace JSC
168
169 #endif // Interpreter_h