aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qml/compiler/qv4isel_moth.cpp3
-rw-r--r--src/qml/jit/qv4assembler.cpp3
-rw-r--r--src/qml/jit/qv4assembler_p.h2
-rw-r--r--src/qml/jit/qv4isel_masm.cpp4
-rw-r--r--src/qml/jsruntime/qv4engine.cpp44
-rw-r--r--src/qml/jsruntime/qv4engine_p.h2
-rw-r--r--src/qml/jsruntime/qv4function.cpp3
-rw-r--r--src/qml/jsruntime/qv4function_p.h3
8 files changed, 6 insertions, 58 deletions
diff --git a/src/qml/compiler/qv4isel_moth.cpp b/src/qml/compiler/qv4isel_moth.cpp
index 0dac3dbdf2..51529b5bc7 100644
--- a/src/qml/compiler/qv4isel_moth.cpp
+++ b/src/qml/compiler/qv4isel_moth.cpp
@@ -1488,8 +1488,7 @@ void CompilationUnit::linkBackendToEngine(QV4::ExecutionEngine *engine)
for (int i = 0 ;i < runtimeFunctions.size(); ++i) {
const QV4::CompiledData::Function *compiledFunction = data->functionAt(i);
- QV4::Function *runtimeFunction = new QV4::Function(engine, this, compiledFunction,
- &VME::exec, /*size - doesn't matter for moth*/0);
+ QV4::Function *runtimeFunction = new QV4::Function(engine, this, compiledFunction, &VME::exec);
runtimeFunction->codeData = reinterpret_cast<const uchar *>(codeRefs.at(i).constData());
runtimeFunctions[i] = runtimeFunction;
diff --git a/src/qml/jit/qv4assembler.cpp b/src/qml/jit/qv4assembler.cpp
index d0a569de5e..fb6e23cf1e 100644
--- a/src/qml/jit/qv4assembler.cpp
+++ b/src/qml/jit/qv4assembler.cpp
@@ -79,8 +79,7 @@ void CompilationUnit::linkBackendToEngine(ExecutionEngine *engine)
const CompiledData::Function *compiledFunction = data->functionAt(i);
QV4::Function *runtimeFunction = new QV4::Function(engine, this, compiledFunction,
- (ReturnedValue (*)(QV4::ExecutionContext *, const uchar *)) codeRefs[i].code().executableAddress(),
- codeSizes[i]);
+ (ReturnedValue (*)(QV4::ExecutionContext *, const uchar *)) codeRefs[i].code().executableAddress());
runtimeFunctions[i] = runtimeFunction;
}
diff --git a/src/qml/jit/qv4assembler_p.h b/src/qml/jit/qv4assembler_p.h
index 7986a65456..fa9aa4193b 100644
--- a/src/qml/jit/qv4assembler_p.h
+++ b/src/qml/jit/qv4assembler_p.h
@@ -82,8 +82,6 @@ struct CompilationUnit : public QV4::CompiledData::CompilationUnit
QVector<JSC::MacroAssemblerCodeRef> codeRefs;
QList<QVector<QV4::Primitive> > constantValues;
- QVector<int> codeSizes; // corresponding to the endOfCode labels. MacroAssemblerCodeRef's size may
- // be larger, as for example on ARM we append the exception handling table.
};
struct RelativeCall {
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp
index 332c244a6c..2317ed72d2 100644
--- a/src/qml/jit/qv4isel_masm.cpp
+++ b/src/qml/jit/qv4isel_masm.cpp
@@ -201,7 +201,6 @@ InstructionSelection::InstructionSelection(QQmlEnginePrivate *qmlEngine, QV4::Ex
{
compilationUnit = new CompilationUnit;
compilationUnit->codeRefs.resize(module->functions.size());
- compilationUnit->codeSizes.resize(module->functions.size());
}
InstructionSelection::~InstructionSelection()
@@ -335,7 +334,8 @@ void InstructionSelection::run(int functionIndex)
if (!_as->exceptionReturnLabel.isSet())
visitRet(0);
- JSC::MacroAssemblerCodeRef codeRef =_as->link(&compilationUnit->codeSizes[functionIndex]);
+ int dummySize;
+ JSC::MacroAssemblerCodeRef codeRef =_as->link(&dummySize);
compilationUnit->codeRefs[functionIndex] = codeRef;
qSwap(_function, function);
diff --git a/src/qml/jsruntime/qv4engine.cpp b/src/qml/jsruntime/qv4engine.cpp
index 4bf6c89f26..321e821e26 100644
--- a/src/qml/jsruntime/qv4engine.cpp
+++ b/src/qml/jsruntime/qv4engine.cpp
@@ -895,50 +895,6 @@ void ExecutionEngine::markObjects()
(*it)->markObjects(this);
}
-namespace {
- struct FindHelper
- {
- bool operator()(Function *function, quintptr pc)
- {
- return reinterpret_cast<quintptr>(function->code) < pc
- && (reinterpret_cast<quintptr>(function->code) + function->codeSize) < pc;
- }
-
- bool operator()(quintptr pc, Function *function)
- {
- return pc < reinterpret_cast<quintptr>(function->code);
- }
- };
-}
-
-Function *ExecutionEngine::functionForProgramCounter(quintptr pc) const
-{
- // ### Use this code path instead of the "else" when the number of compilation units went down to
- // one per (qml) file.
-#if 0
- for (QSet<QV4::CompiledData::CompilationUnit*>::ConstIterator unitIt = compilationUnits.constBegin(), unitEnd = compilationUnits.constEnd();
- unitIt != unitEnd; ++unitIt) {
- const QVector<Function*> &functions = (*unitIt)->runtimeFunctionsSortedByAddress;
- QVector<Function*>::ConstIterator it = qBinaryFind(functions.constBegin(),
- functions.constEnd(),
- pc, FindHelper());
- if (it != functions.constEnd())
- return *it;
- }
- return 0;
-#else
- QMap<quintptr, Function*>::ConstIterator it = allFunctions.lowerBound(pc);
- if (it != allFunctions.begin() && allFunctions.count() > 0)
- --it;
- if (it == allFunctions.end())
- return 0;
-
- if (pc < it.key() || pc >= it.key() + (*it)->codeSize)
- return 0;
- return *it;
-#endif
-}
-
QmlExtensions *ExecutionEngine::qmlExtensions()
{
if (!m_qmlExtensions)
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 4bf95c4868..8a48afbcd8 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -353,8 +353,6 @@ public:
InternalClass *newClass(const InternalClass &other);
- Function *functionForProgramCounter(quintptr pc) const;
-
QmlExtensions *qmlExtensions();
bool recheckCStackLimits();
diff --git a/src/qml/jsruntime/qv4function.cpp b/src/qml/jsruntime/qv4function.cpp
index 550c359772..e01febcfa3 100644
--- a/src/qml/jsruntime/qv4function.cpp
+++ b/src/qml/jsruntime/qv4function.cpp
@@ -51,12 +51,11 @@ QT_BEGIN_NAMESPACE
using namespace QV4;
Function::Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, const CompiledData::Function *function,
- ReturnedValue (*codePtr)(ExecutionContext *, const uchar *), quint32 _codeSize)
+ ReturnedValue (*codePtr)(ExecutionContext *, const uchar *))
: compiledFunction(function)
, compilationUnit(unit)
, code(codePtr)
, codeData(0)
- , codeSize(_codeSize)
{
Q_UNUSED(engine);
diff --git a/src/qml/jsruntime/qv4function_p.h b/src/qml/jsruntime/qv4function_p.h
index 530d67e3c8..553c7484b8 100644
--- a/src/qml/jsruntime/qv4function_p.h
+++ b/src/qml/jsruntime/qv4function_p.h
@@ -86,13 +86,12 @@ struct Function {
ReturnedValue (*code)(ExecutionContext *, const uchar *);
const uchar *codeData;
- quint32 codeSize;
// first nArguments names in internalClass are the actual arguments
InternalClass *internalClass;
Function(ExecutionEngine *engine, CompiledData::CompilationUnit *unit, const CompiledData::Function *function,
- ReturnedValue (*codePtr)(ExecutionContext *, const uchar *), quint32 _codeSize);
+ ReturnedValue (*codePtr)(ExecutionContext *, const uchar *));
~Function();
inline StringRef name() {