aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4isel_moth.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2014-08-22 12:11:40 +0200
committerErik Verbruggen <erik.verbruggen@digia.com>2014-08-26 16:45:26 +0200
commitb926452f6c98e35fd87706fc637240cb47bac4bf (patch)
tree4cda0562b5544115177b732ad5df6f092d87d0a6 /src/qml/compiler/qv4isel_moth.cpp
parent39286a50c32321981adb82ea47c93b7398b257d8 (diff)
V4: disable type inference and loop peeling for the interpreter.
Loop peeling is always disabled. Type inference is still enabled for QML code, because of the static-type nature of the properties. This speeds up crypto.js by 20%. Change-Id: Ibf51cb36f8904d64df0793980d463451dfd361e2 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_moth.cpp')
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index a0a89482d6..40a44844ce 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -321,7 +321,9 @@ InstructionSelection::InstructionSelection(QQmlEnginePrivate *qmlEngine, QV4::Ex
, _codeEnd(0)
, _currentStatement(0)
, compilationUnit(new CompilationUnit)
-{}
+{
+ setUseTypeInference(false);
+}
InstructionSelection::~InstructionSelection()
{
@@ -351,7 +353,7 @@ void InstructionSelection::run(int functionIndex)
qSwap(codeEnd, _codeEnd);
IR::Optimizer opt(_function);
- opt.run(qmlEngine);
+ opt.run(qmlEngine, useTypeInference, /*peelLoops =*/ false);
if (opt.isInSSA()) {
static const bool doStackSlotAllocation =
qgetenv("QV4_NO_INTERPRETER_STACK_SLOT_ALLOCATION").isEmpty();