diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-08-14 15:58:54 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-08-15 09:08:53 +0200 |
commit | 83a975ae1ccc3eec52c859b8665319b7a096fc37 (patch) | |
tree | 8e89d018d848addc7111d46adbc1262982287af0 /src/qml/jsruntime/qv4function_p.h | |
parent | 0d1e37e9f50b644c88578aee82859990e7378caf (diff) |
Get rid of flags in QV4::Function and use CompiledFunction::flags instead
Change-Id: Iffe72ff6dd0311d7548d1ea41164a400fd3a7600
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.h | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h index f2059139ba..ced2bf5626 100644 --- a/src/qml/jsruntime/qv4function_p.h +++ b/src/qml/jsruntime/qv4function_p.h @@ -106,12 +106,6 @@ struct Function { Lookup *lookups; - bool hasNestedFunctions; - bool hasDirectEval; - bool usesArgumentsObject; - bool isStrict; - bool isNamedExpression; - QString sourceFile; QVector<LineNumberMapping> lineNumberMappings; @@ -126,11 +120,6 @@ struct Function { , codeData(0) , codeSize(0) , lookups(0) - , hasNestedFunctions(0) - , hasDirectEval(false) - , usesArgumentsObject(false) - , isStrict(false) - , isNamedExpression(false) , engine(engine) {} ~Function(); @@ -144,7 +133,12 @@ struct Function { nestedFunctions.append(f); } - inline bool needsActivation() const { return hasNestedFunctions || hasDirectEval || usesArgumentsObject; } + inline bool usesArgumentsObject() const { return compiledFunction->flags & CompiledData::Function::UsesArgumentsObject; } + inline bool isStrict() const { return compiledFunction->flags & CompiledData::Function::IsStrict; } + inline bool isNamedExpression() const { return compiledFunction->flags & CompiledData::Function::IsNamedExpression; } + + inline bool needsActivation() const + { return compiledFunction->nInnerFunctions > 0 || (compiledFunction->flags & (CompiledData::Function::HasDirectEval | CompiledData::Function::UsesArgumentsObject)); } void mark(); |