aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4arraydata_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-01-15 11:36:57 +0100
committerLars Knoll <lars.knoll@digia.com>2015-01-23 08:07:32 +0100
commit002a5d4303b3b182ae4abc4a752c49787c1c2821 (patch)
tree69c7666ed1061c7acacee1d76597c06405459c80 /src/qml/jsruntime/qv4arraydata_p.h
parentfddc75e862032163af36d2282051758647b62d15 (diff)
Get rid of most uses of ValueRef
Instead pass a const Value & into the functions With our new inheritance structure, we can get rid of ValueRef and instead simply pass a pointer to a Value again. Pointers to Values are safe to use again now, as they are now guaranteed to be in a place where the GC knows about them. Change-Id: I44c606fde764db3993b8128fd6fb781d3a298e53 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4arraydata_p.h')
-rw-r--r--src/qml/jsruntime/qv4arraydata_p.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/qml/jsruntime/qv4arraydata_p.h b/src/qml/jsruntime/qv4arraydata_p.h
index 76451480c3..5ae3883647 100644
--- a/src/qml/jsruntime/qv4arraydata_p.h
+++ b/src/qml/jsruntime/qv4arraydata_p.h
@@ -61,8 +61,8 @@ struct ArrayVTable
uint type;
Heap::ArrayData *(*reallocate)(Object *o, uint n, bool enforceAttributes);
ReturnedValue (*get)(const Heap::ArrayData *d, uint index);
- bool (*put)(Object *o, uint index, ValueRef value);
- bool (*putArray)(Object *o, uint index, Value *values, uint n);
+ bool (*put)(Object *o, uint index, const Value &value);
+ bool (*putArray)(Object *o, uint index, const Value *values, uint n);
bool (*del)(Object *o, uint index);
void (*setAttribute)(Object *o, uint index, PropertyAttributes attrs);
void (*push_front)(Object *o, Value *values, uint n);
@@ -203,7 +203,7 @@ struct Q_QML_EXPORT ArrayData : public Managed
static void ensureAttributes(Object *o);
static void realloc(Object *o, Type newType, uint alloc, bool enforceAttributes);
- static void sort(ExecutionEngine *engine, Object *thisObject, const ValueRef comparefn, uint dataLen);
+ static void sort(ExecutionEngine *engine, Object *thisObject, const Value &comparefn, uint dataLen);
static uint append(Object *obj, ArrayObject *otherObj, uint n);
static Property *insert(Object *o, uint index, bool isAccessor = false);
};
@@ -224,8 +224,8 @@ struct Q_QML_EXPORT SimpleArrayData : public ArrayData
static void markObjects(Heap::Base *d, ExecutionEngine *e);
static ReturnedValue get(const Heap::ArrayData *d, uint index);
- static bool put(Object *o, uint index, ValueRef value);
- static bool putArray(Object *o, uint index, Value *values, uint n);
+ static bool put(Object *o, uint index, const Value &value);
+ static bool putArray(Object *o, uint index, const Value *values, uint n);
static bool del(Object *o, uint index);
static void setAttribute(Object *o, uint index, PropertyAttributes attrs);
static void push_front(Object *o, Value *values, uint n);
@@ -253,8 +253,8 @@ struct Q_QML_EXPORT SparseArrayData : public ArrayData
static Heap::ArrayData *reallocate(Object *o, uint n, bool enforceAttributes);
static ReturnedValue get(const Heap::ArrayData *d, uint index);
- static bool put(Object *o, uint index, ValueRef value);
- static bool putArray(Object *o, uint index, Value *values, uint n);
+ static bool put(Object *o, uint index, const Value &value);
+ static bool putArray(Object *o, uint index, const Value *values, uint n);
static bool del(Object *o, uint index);
static void setAttribute(Object *o, uint index, PropertyAttributes attrs);
static void push_front(Object *o, Value *values, uint n);