diff options
author | Lars Knoll <lars.knoll@theqtcompany.com> | 2015-01-15 15:01:06 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2015-01-23 08:07:35 +0100 |
commit | 13cf87fa93b584091a51d775953074db9df1b453 (patch) | |
tree | def0d8107e1a152faff71b31902eaade14531e12 /src/qml/jsruntime/qv4value_p.h | |
parent | 002a5d4303b3b182ae4abc4a752c49787c1c2821 (diff) |
Remove all remaining usages of ValueRef
Change-Id: Icd76d3d03fac2e57530e55f8ec15b97109dcdcbc
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4value_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4value_p.h | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h index 22f0e1e4d5..3bd986ff8e 100644 --- a/src/qml/jsruntime/qv4value_p.h +++ b/src/qml/jsruntime/qv4value_p.h @@ -420,8 +420,6 @@ struct Q_QML_PRIVATE_EXPORT Primitive : public Value static double toInteger(double fromNumber); static int toInt32(double value); static unsigned int toUInt32(double value); - - inline operator ValueRef(); }; inline Primitive Primitive::undefinedValue() @@ -518,61 +516,6 @@ private: Encode(void *); }; -struct ValueRef { - ValueRef(const ScopedValue &v); - template <typename T> - ValueRef(const Scoped<T> &v); - ValueRef(const PersistentValue &v); - ValueRef(Value &v) { ptr = &v; } - // Important: Do NOT add a copy constructor to this class - // adding a copy constructor actually changes the calling convention, ie. - // is not even binary compatible. Adding it would break assumptions made - // in the jit'ed code. - ValueRef &operator=(const ScopedValue &o); - ValueRef &operator=(const Value &v) - { *ptr = v; return *this; } - ValueRef &operator=(const ReturnedValue &v) { - ptr->val = v; - return *this; - } - - operator const Value *() const { - return ptr; - } - const Value *operator->() const { - return ptr; - } - - operator Value &() { return *ptr; } - operator const Value &() const { return *ptr; } - - operator Value *() { - return ptr; - } - Value *operator->() { - return ptr; - } - - static ValueRef fromRawValue(Value *v) { - return ValueRef(v); - } - static const Value &fromRawValue(const Value *v) { - return ValueRef(const_cast<Value *>(v)); - } - - ReturnedValue asReturnedValue() const { return ptr->val; } - - // ### get rid of this one! - ValueRef(Value *v) { ptr = v; } -private: - Value *ptr; -}; - -inline Primitive::operator ValueRef() -{ - return ValueRef(this); -} - inline ReturnedValue Heap::Base::asReturnedValue() const { |