aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4function_p.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2013-08-16 17:25:58 +0200
committerLars Knoll <lars.knoll@digia.com>2013-08-16 19:18:48 +0200
commit0f0e7443aea0d9a203b380bec708c485a01450e0 (patch)
treec34a687f99964d9d97c535e6c3cf1fdc232aaebf /src/qml/jsruntime/qv4function_p.h
parentbb8d91829c12b7742205eb96a0e8fbcc164c5e91 (diff)
Refcount the compilation unit and remove refcount from runtime function
Change-Id: Iaa2f96a6814f1b39589ffcfe3c84e3c229e25f1f Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4function_p.h')
-rw-r--r--src/qml/jsruntime/qv4function_p.h14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h
index 47215cf69a..d9ba9dccb8 100644
--- a/src/qml/jsruntime/qv4function_p.h
+++ b/src/qml/jsruntime/qv4function_p.h
@@ -87,7 +87,6 @@ struct LineNumberMapping
};
struct Function {
- int refCount;
String *name;
const CompiledData::Function *compiledFunction;
@@ -98,13 +97,11 @@ struct Function {
QVector<String *> formals;
QVector<String *> locals;
- QVector<Function *> nestedFunctions;
ExecutionEngine *engine;
Function(ExecutionEngine *engine, String *name)
- : refCount(0)
- , name(name)
+ : name(name)
, compiledFunction(0)
, compilationUnit(0)
, code(0)
@@ -118,15 +115,6 @@ struct Function {
void init(CompiledData::CompilationUnit *unit, const CompiledData::Function *function,
Value (*codePtr)(ExecutionContext *, const uchar *), quint32 _codeSize);
- void ref() { ++refCount; }
- void deref() { if (!--refCount) delete this; }
-
- void addNestedFunction(Function *f)
- {
- f->ref();
- nestedFunctions.append(f);
- }
-
inline QString sourceFile() const { return compilationUnit->fileName(); }
inline bool usesArgumentsObject() const { return compiledFunction->flags & CompiledData::Function::UsesArgumentsObject; }