diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-11 11:28:27 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-12 21:52:39 +0200 |
commit | a30799396472f2db5978036a64dcb4a4a74cd0b3 (patch) | |
tree | 667ac55038feaef3da0aeb18dba024221db2b1d1 /src/qml/jsruntime/qv4string_p.h | |
parent | c4b984d099b9653bfa0e282daed0bf466123c341 (diff) |
Convert ReturnedValue into a primitive (typedef to quint64)
ReturnedValue is used to return values from runtime methods
The type has to be a primitive type (no struct or union), so that
the compiler will return it in a register on all platforms.
They will be returned in rax on x64, [eax,edx] on x86 and [r0,r1] on arm.
Change-Id: I38433e6fad252370dda5dc335d9c5be8f22e8c76
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4string_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4string_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h index 31e5c2a5f7..96e3393700 100644 --- a/src/qml/jsruntime/qv4string_p.h +++ b/src/qml/jsruntime/qv4string_p.h @@ -119,6 +119,8 @@ struct Q_QML_EXPORT String : public Managed { return _text.length(); } + ReturnedValue asReturnedValue() { return Value::fromString(this).asReturnedValue(); } + QString _text; mutable Identifier *identifier; mutable uint stringHash; |