aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/compiler/qv4codegen.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2023-03-10 13:35:27 +0100
committerFabian Kosmale <fabian.kosmale@qt.io>2023-03-11 05:05:24 +0100
commitcc07ee38be294e79f8674fb98711d88aec637b1d (patch)
treee5e1a4a801283825a3f94b6d984c3cb649fce538 /src/qml/compiler/qv4codegen.cpp
parentec410555adf147234201145b9ea5b8ea25cd29c2 (diff)
qv4codegen: Remove static disable_lookup debug aid
This variable, introduced in aabf2196016d96bd171a7d632b6e1cc5622d05ae, allows to turn of the use of lookups in a few places. However, there is no apparent need for doing so, and the commit message of the change that introduced it does not give any reason for it. As the variable is always false, and given that we run the lookup code path by default since quite a while, simply remove it. Change-Id: I62e00739a58fc748a1239087fa0374861ec73e64 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
-rw-r--r--src/qml/compiler/qv4codegen.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp
index 3b0dac0766..d6f2716bbc 100644
--- a/src/qml/compiler/qv4codegen.cpp
+++ b/src/qml/compiler/qv4codegen.cpp
@@ -23,8 +23,6 @@
#include <cmath>
#include <iostream>
-static const bool disable_lookups = false;
-
#ifdef CONST
#undef CONST
#endif
@@ -2066,7 +2064,7 @@ void Codegen::handleCall(Reference &base, Arguments calldata, int slotForFunctio
//### Do we really need all these call instructions? can's we load the callee in a temp?
if (base.type == Reference::Member) {
- if (!disable_lookups && useFastLookups) {
+ if (useFastLookups) {
Instruction::CallPropertyLookup call;
call.base = base.propertyBase.stackSlot();
call.lookupIndex = registerGetterLookup(
@@ -2095,7 +2093,7 @@ void Codegen::handleCall(Reference &base, Arguments calldata, int slotForFunctio
call.argc = calldata.argc;
call.argv = calldata.argv;
bytecodeGenerator->addInstruction(call);
- } else if (!disable_lookups && useFastLookups && base.global) {
+ } else if (useFastLookups && base.global) {
if (base.qmlGlobal) {
Instruction::CallQmlContextPropertyLookup call;
call.index = registerQmlContextPropertyGetterLookup(
@@ -4566,7 +4564,7 @@ void Codegen::Reference::storeAccumulator() const
}
} return;
case Member:
- if (!disable_lookups && codegen->useFastLookups) {
+ if (codegen->useFastLookups) {
Instruction::SetLookup store;
store.base = propertyBase.stackSlot();
store.index = codegen->registerSetterLookup(propertyNameIndex);
@@ -4684,7 +4682,7 @@ QT_WARNING_POP
if (sourceLocation.isValid())
codegen->bytecodeGenerator->setLocation(sourceLocation);
- if (!disable_lookups && global) {
+ if (global) {
if (qmlGlobal) {
Instruction::LoadQmlContextPropertyLookup load;
load.index = codegen->registerQmlContextPropertyGetterLookup(
@@ -4709,7 +4707,7 @@ QT_WARNING_POP
if (sourceLocation.isValid())
codegen->bytecodeGenerator->setLocation(sourceLocation);
- if (!disable_lookups && codegen->useFastLookups) {
+ if (codegen->useFastLookups) {
if (optionalChainJumpLabel->isValid()) {
// If we got a valid jump label, this means it's an optional lookup
auto jump = codegen->bytecodeGenerator->jumpOptionalLookup(