summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h
diff options
context:
space:
mode:
authorFrans Englich <frans.englich@nokia.com>2009-09-24 16:58:05 (GMT)
committerFrans Englich <frans.englich@nokia.com>2009-09-24 16:58:05 (GMT)
commit90996b73d4f2983d6f721c205b5a0957d3a55aff (patch)
tree1ab4215df101422590c7af368cdd22d4f1dc3786 /src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h
parent9345d47c3945b61a27724508e8b3d0aaf7b57bcf (diff)
parentaabd12223bda6260756ab19430082477d5669c0a (diff)
downloadQt-90996b73d4f2983d6f721c205b5a0957d3a55aff.zip
Qt-90996b73d4f2983d6f721c205b5a0957d3a55aff.tar.gz
Qt-90996b73d4f2983d6f721c205b5a0957d3a55aff.tar.bz2
Merge commit 'qt/4.6' into mmfphonon
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h58
1 files changed, 48 insertions, 10 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h
index d437d46..9728775 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Executable.h
@@ -27,7 +27,9 @@
#define Executable_h
#include "JSFunction.h"
+#include "Interpreter.h"
#include "Nodes.h"
+#include "SamplingTool.h"
namespace JSC {
@@ -102,11 +104,30 @@ namespace JSC {
class ScriptExecutable : public ExecutableBase {
public:
- ScriptExecutable(const SourceCode& source)
+ ScriptExecutable(JSGlobalData* globalData, const SourceCode& source)
: ExecutableBase(NUM_PARAMETERS_NOT_COMPILED)
, m_source(source)
, m_features(0)
{
+#if ENABLE(CODEBLOCK_SAMPLING)
+ if (SamplingTool* sampler = globalData->interpreter->sampler())
+ sampler->notifyOfScope(this);
+#else
+ UNUSED_PARAM(globalData);
+#endif
+ }
+
+ ScriptExecutable(ExecState* exec, const SourceCode& source)
+ : ExecutableBase(NUM_PARAMETERS_NOT_COMPILED)
+ , m_source(source)
+ , m_features(0)
+ {
+#if ENABLE(CODEBLOCK_SAMPLING)
+ if (SamplingTool* sampler = exec->globalData().interpreter->sampler())
+ sampler->notifyOfScope(this);
+#else
+ UNUSED_PARAM(exec);
+#endif
}
const SourceCode& source() { return m_source; }
@@ -137,8 +158,8 @@ namespace JSC {
class EvalExecutable : public ScriptExecutable {
public:
- EvalExecutable(const SourceCode& source)
- : ScriptExecutable(source)
+ EvalExecutable(ExecState* exec, const SourceCode& source)
+ : ScriptExecutable(exec, source)
, m_evalCodeBlock(0)
{
}
@@ -157,7 +178,7 @@ namespace JSC {
JSObject* compile(ExecState*, ScopeChainNode*);
ExceptionInfo* reparseExceptionInfo(JSGlobalData*, ScopeChainNode*, CodeBlock*);
- static PassRefPtr<EvalExecutable> create(const SourceCode& source) { return adoptRef(new EvalExecutable(source)); }
+ static PassRefPtr<EvalExecutable> create(ExecState* exec, const SourceCode& source) { return adoptRef(new EvalExecutable(exec, source)); }
private:
EvalCodeBlock* m_evalCodeBlock;
@@ -178,8 +199,8 @@ namespace JSC {
class ProgramExecutable : public ScriptExecutable {
public:
- ProgramExecutable(const SourceCode& source)
- : ScriptExecutable(source)
+ ProgramExecutable(ExecState* exec, const SourceCode& source)
+ : ScriptExecutable(exec, source)
, m_programCodeBlock(0)
{
}
@@ -221,9 +242,14 @@ namespace JSC {
class FunctionExecutable : public ScriptExecutable {
friend class JIT;
public:
- static PassRefPtr<FunctionExecutable> create(const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
+ static PassRefPtr<FunctionExecutable> create(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
+ {
+ return adoptRef(new FunctionExecutable(exec, name, source, forceUsesArguments, parameters, firstLine, lastLine));
+ }
+
+ static PassRefPtr<FunctionExecutable> create(JSGlobalData* globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
{
- return adoptRef(new FunctionExecutable(name, source, forceUsesArguments, parameters, firstLine, lastLine));
+ return adoptRef(new FunctionExecutable(globalData, name, source, forceUsesArguments, parameters, firstLine, lastLine));
}
~FunctionExecutable();
@@ -263,8 +289,20 @@ namespace JSC {
static PassRefPtr<FunctionExecutable> fromGlobalCode(const Identifier&, ExecState*, Debugger*, const SourceCode&, int* errLine = 0, UString* errMsg = 0);
private:
- FunctionExecutable(const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
- : ScriptExecutable(source)
+ FunctionExecutable(JSGlobalData* globalData, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
+ : ScriptExecutable(globalData, source)
+ , m_forceUsesArguments(forceUsesArguments)
+ , m_parameters(parameters)
+ , m_codeBlock(0)
+ , m_name(name)
+ , m_numVariables(0)
+ {
+ m_firstLine = firstLine;
+ m_lastLine = lastLine;
+ }
+
+ FunctionExecutable(ExecState* exec, const Identifier& name, const SourceCode& source, bool forceUsesArguments, FunctionParameters* parameters, int firstLine, int lastLine)
+ : ScriptExecutable(exec, source)
, m_forceUsesArguments(forceUsesArguments)
, m_parameters(parameters)
, m_codeBlock(0)