From 669e6b434f015982d2e5e9f48ef72d8e8eebb0ac Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Mon, 14 Oct 2013 13:08:58 +0200 Subject: Fix performance regression introduced by 6adb06 The global scope is compiled as EvalCode. Because of this we were never using global lookups anymore, slowing down the v8 test suite by ~20%. Change-Id: I6c47ccf90f4d9ec3bf531bbb689d3f1511f69968 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml') diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index e3f835be9c..727d20d045 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -1374,7 +1374,7 @@ V4IR::Expr *Codegen::identifier(const QString &name, int line, int col) f = f->outer; } - if (!e->parent && (!f || !f->insideWithOrCatch) && e->compilationMode != EvalCode && e->compilationMode != QmlBinding) + if (!e->parent && (!f || !f->insideWithOrCatch) && _env->compilationMode != EvalCode && e->compilationMode != QmlBinding) return _block->GLOBALNAME(name, line, col); // global context or with. Lookup by name -- cgit v1.2.3