diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-08-14 10:17:37 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@digia.com> | 2013-08-15 09:08:39 +0200 |
commit | 5f3ef18bf8c3e0e3ba1c80bcdeaece46cbb45c06 (patch) | |
tree | 645b8834e773e408bdb07b33dc8e7733335bf1e3 /src/qml/compiler/qv4isel_p.h | |
parent | 131964a3b5ac0cb6de5f1d306035003751da907a (diff) |
Begin using the compiled data structures for runtime strings
Change-Id: Idbf278a96624bf101df35de40577b38e593f22be
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_p.h')
-rw-r--r-- | src/qml/compiler/qv4isel_p.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4isel_p.h b/src/qml/compiler/qv4isel_p.h index 965caf2cba..d31d60db9a 100644 --- a/src/qml/compiler/qv4isel_p.h +++ b/src/qml/compiler/qv4isel_p.h @@ -44,6 +44,8 @@ #include "private/qv4global_p.h" #include "qv4jsir_p.h" +#include <private/qv4compileddata_p.h> +#include <private/qv4compiler_p.h> #include <qglobal.h> #include <QHash> @@ -63,7 +65,7 @@ public: EvalInstructionSelection(QV4::ExecutionEngine *engine, V4IR::Module *module); virtual ~EvalInstructionSelection() = 0; - QV4::Function *vmFunction(V4IR::Function *f); + QV4::CompiledData::CompilationUnit *compile(); void setUseFastLookups(bool b) { useFastLookups = b; } @@ -72,11 +74,15 @@ protected: QV4::ExecutionEngine *engine() const { return _engine; } virtual void run(QV4::Function *vmFunction, V4IR::Function *function) = 0; + int stringId(const QString &str) { return jsUnitGenerator.registerString(str); } + private: QV4::ExecutionEngine *_engine; - QHash<V4IR::Function *, QV4::Function *> _irToVM; protected: + QHash<V4IR::Function *, QV4::Function *> _irToVM; bool useFastLookups; + QV4::Compiler::JSUnitGenerator jsUnitGenerator; + QV4::CompiledData::CompilationUnit *compilationUnit; // subclass ctor needs to initialize. }; class Q_QML_EXPORT EvalISelFactory |