diff options
Diffstat (limited to 'tools/qmljs/qmljs.cpp')
-rw-r--r-- | tools/qmljs/qmljs.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/qmljs/qmljs.cpp b/tools/qmljs/qmljs.cpp index ea014f3beb..c8abb7330a 100644 --- a/tools/qmljs/qmljs.cpp +++ b/tools/qmljs/qmljs.cpp @@ -80,6 +80,15 @@ int main(int argc, char *argv[]) bool cache = false; if (!args.isEmpty()) { + if (args.constFirst() == QLatin1String("--jit")) { + qputenv("QV4_JIT_CALL_THRESHOLD", QByteArray("0")); + args.removeFirst(); + } + if (args.constFirst() == QLatin1String("--interpret")) { + qputenv("QV4_FORCE_INTERPRETER", QByteArray("1")); + args.removeFirst(); + } + if (args.constFirst() == QLatin1String("--qml")) { runAsQml = true; args.removeFirst(); @@ -120,7 +129,7 @@ int main(int argc, char *argv[]) const QString code = QString::fromUtf8(file.readAll()); file.close(); - script.reset(new QV4::Script(ctx, QV4::Compiler::GlobalCode, code, fn)); + script.reset(new QV4::Script(ctx, QV4::Compiler::ContextType::Global, code, fn)); script->parseAsBinding = runAsQml; script->parse(); } |