aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@qt.io>2018-05-28 14:22:24 +0200
committerSimon Hausmann <simon.hausmann@qt.io>2018-05-28 19:15:47 +0000
commitef75c3017e75135fb3454f67c0778e9a89165cd2 (patch)
treece2bcc7a9a9ddf7ae8322e4d158a8fe70370f3d3
parent2e17c1bed2f0690342f98130701ebfe088075a60 (diff)
Remove unused QV4::Function::code member
Since commit 831ddc54932d2681712ca9fa3e94484ae11d59f7 we always call the interpreter entry function when calling into JS. Change-Id: Ieeb549f6d144f02f0a919759fd31541a7f636f83 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
-rw-r--r--src/qml/compiler/qv4compileddata.cpp2
-rw-r--r--src/qml/jsruntime/qv4function.cpp3
-rw-r--r--src/qml/jsruntime/qv4function_p.h4
-rw-r--r--src/qml/jsruntime/qv4functionobject.cpp1
4 files changed, 3 insertions, 7 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp
index 4c0bbd9dfa..e72bbe1f5e 100644
--- a/src/qml/compiler/qv4compileddata.cpp
+++ b/src/qml/compiler/qv4compileddata.cpp
@@ -384,7 +384,7 @@ void CompilationUnit::linkBackendToEngine(ExecutionEngine *engine)
runtimeFunctions.resize(data->functionTableSize);
for (int i = 0 ;i < runtimeFunctions.size(); ++i) {
const QV4::CompiledData::Function *compiledFunction = data->functionAt(i);
- runtimeFunctions[i] = new QV4::Function(engine, this, compiledFunction, &Moth::VME::exec);
+ runtimeFunctions[i] = new QV4::Function(engine, this, compiledFunction);
}
Scope scope(engine);
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp
index ed050cc094..10e7fb1b3f 100644
--- a/src/qml/jsruntime/qv4function.cpp
+++ b/src/qml/jsruntime/qv4function.cpp
@@ -52,10 +52,9 @@ QT_BEGIN_NAMESPACE
using namespace QV4;
-Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, const CompiledData::Function *function, Code codePtr)
+Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, const CompiledData::Function *function)
: compiledFunction(function)
, compilationUnit(unit)
- , code(codePtr)
, codeData(function->code())
, jittedCode(nullptr)
, codeRef(nullptr)
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h
index fa6b886b10..06a3bda0a8 100644
--- a/src/qml/jsruntime/qv4function_p.h
+++ b/src/qml/jsruntime/qv4function_p.h
@@ -72,8 +72,6 @@ struct Q_QML_EXPORT Function {
return Moth::VME::exec(this, thisObject, argv, argc, context);
}
- typedef ReturnedValue (*Code)(const FunctionObject *fo, const Value *thisObject, const Value *argv, int argc);
- Code code;
const uchar *codeData;
typedef ReturnedValue (*JittedCode)(CppStackFrame *, ExecutionEngine *);
@@ -86,7 +84,7 @@ struct Q_QML_EXPORT Function {
int interpreterCallCount = 0;
bool hasQmlDependencies;
- Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, const CompiledData::Function *function, Code codePtr);
+ Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, const CompiledData::Function *function);
~Function();
// used when dynamically assigning signal handlers (QQmlConnection)
diff --git a/src/qml/jsruntime/qv4functionobject.cpp b/src/qml/jsruntime/qv4functionobject.cpp
index e95f5108a9..a9aaa344cb 100644
--- a/src/qml/jsruntime/qv4functionobject.cpp
+++ b/src/qml/jsruntime/qv4functionobject.cpp
@@ -465,7 +465,6 @@ void Heap::ScriptFunction::init(QV4::ExecutionContext *scope, Function *function
setFunction(function);
Q_ASSERT(function);
- Q_ASSERT(function->code);
Scope s(scope);
ScopedFunctionObject f(s, this);