From 0f0e7443aea0d9a203b380bec708c485a01450e0 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Fri, 16 Aug 2013 17:25:58 +0200 Subject: Refcount the compilation unit and remove refcount from runtime function Change-Id: Iaa2f96a6814f1b39589ffcfe3c84e3c229e25f1f Reviewed-by: Lars Knoll --- src/qml/jsruntime/qv4function_p.h | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/qml/jsruntime/qv4function_p.h') 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 formals; QVector locals; - QVector 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; } -- cgit v1.2.3