aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4arraydata.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2014-11-12 13:55:44 +0100
committerSimon Hausmann <simon.hausmann@digia.com>2014-11-15 13:16:20 +0100
commitcd6db04169dcd0f7b49f5875d3c63d94fa32e17a (patch)
tree6e06f7e65b0d80b7c662d714a656bc8b8ea4039f /src/qml/jsruntime/qv4arraydata.cpp
parent1b97c612e6228bd9c89ad57a922eebf6d44c9bf9 (diff)
Remove ExecutionContext from the array sorting code
Change-Id: I3c59fdb2413664f1c541264a89613a325ecefd2a Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4arraydata.cpp')
-rw-r--r--src/qml/jsruntime/qv4arraydata.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4arraydata.cpp b/src/qml/jsruntime/qv4arraydata.cpp
index a546f78b54..e4a8772cb6 100644
--- a/src/qml/jsruntime/qv4arraydata.cpp
+++ b/src/qml/jsruntime/qv4arraydata.cpp
@@ -647,13 +647,13 @@ Property *ArrayData::insert(Object *o, uint index, bool isAccessor)
class ArrayElementLessThan
{
public:
- inline ArrayElementLessThan(ExecutionContext *context, Object *thisObject, const ValueRef comparefn)
- : m_context(context), thisObject(thisObject), m_comparefn(comparefn) {}
+ inline ArrayElementLessThan(ExecutionEngine *engine, Object *thisObject, const ValueRef comparefn)
+ : m_engine(engine), thisObject(thisObject), m_comparefn(comparefn) {}
bool operator()(Value v1, Value v2) const;
private:
- ExecutionContext *m_context;
+ ExecutionEngine *m_engine;
Object *thisObject;
const ValueRef m_comparefn;
};
@@ -661,7 +661,7 @@ private:
bool ArrayElementLessThan::operator()(Value v1, Value v2) const
{
- Scope scope(m_context);
+ Scope scope(m_engine);
if (v1.isUndefined() || v1.isEmpty())
return false;
@@ -738,7 +738,7 @@ top:
}
-void ArrayData::sort(ExecutionContext *context, Object *thisObject, const ValueRef comparefn, uint len)
+void ArrayData::sort(ExecutionEngine *engine, Object *thisObject, const ValueRef comparefn, uint len)
{
if (!len)
return;
@@ -747,7 +747,7 @@ void ArrayData::sort(ExecutionContext *context, Object *thisObject, const ValueR
return;
if (!(comparefn->isUndefined() || comparefn->asObject())) {
- context->engine()->throwTypeError();
+ engine->throwTypeError();
return;
}
@@ -826,7 +826,7 @@ void ArrayData::sort(ExecutionContext *context, Object *thisObject, const ValueR
}
- ArrayElementLessThan lessThan(context, thisObject, comparefn);
+ ArrayElementLessThan lessThan(engine, thisObject, comparefn);
Value *begin = thisObject->arrayData()->d()->arrayData;
sortHelper(begin, begin + len, *begin, lessThan);