aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4runtimeapi_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-10-09 10:03:11 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2016-04-11 12:27:37 +0000
commitdb4a2fb7631391495eb4d92db9576272a3c2ec97 (patch)
treeb2536e53f52c3b1a2fea83be8a415a6f73f5ef70 /src/qml/jsruntime/qv4runtimeapi_p.h
parent3a3703f298534fce8e2be5fc1f03d84fd32c1b73 (diff)
Convert comparison methods to the new runtime syntax
Change-Id: Iad4dadddefca2d6322d4f778272b75d64e1a746f Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/jsruntime/qv4runtimeapi_p.h')
-rw-r--r--src/qml/jsruntime/qv4runtimeapi_p.h30
1 files changed, 20 insertions, 10 deletions
diff --git a/src/qml/jsruntime/qv4runtimeapi_p.h b/src/qml/jsruntime/qv4runtimeapi_p.h
index 8f5a010107..e17b1803d8 100644
--- a/src/qml/jsruntime/qv4runtimeapi_p.h
+++ b/src/qml/jsruntime/qv4runtimeapi_p.h
@@ -106,6 +106,16 @@ struct Q_QML_PRIVATE_EXPORT Runtime {
, INIT_RUNTIME_METHOD(complement)
, INIT_RUNTIME_METHOD(increment)
, INIT_RUNTIME_METHOD(decrement)
+ , INIT_RUNTIME_METHOD(compareGreaterThan)
+ , INIT_RUNTIME_METHOD(compareLessThan)
+ , INIT_RUNTIME_METHOD(compareGreaterEqual)
+ , INIT_RUNTIME_METHOD(compareLessEqual)
+ , INIT_RUNTIME_METHOD(compareEqual)
+ , INIT_RUNTIME_METHOD(compareNotEqual)
+ , INIT_RUNTIME_METHOD(compareStrictEqual)
+ , INIT_RUNTIME_METHOD(compareStrictNotEqual)
+ , INIT_RUNTIME_METHOD(compareInstanceof)
+ , INIT_RUNTIME_METHOD(compareIn)
, INIT_RUNTIME_METHOD(toBoolean)
, INIT_RUNTIME_METHOD(toDouble)
, INIT_RUNTIME_METHOD(toInt)
@@ -227,18 +237,18 @@ struct Q_QML_PRIVATE_EXPORT Runtime {
// comparisons
typedef Bool (*CompareOperation)(const Value &left, const Value &right);
- static Bool compareGreaterThan(const Value &l, const Value &r);
- static Bool compareLessThan(const Value &l, const Value &r);
- static Bool compareGreaterEqual(const Value &l, const Value &r);
- static Bool compareLessEqual(const Value &l, const Value &r);
- static Bool compareEqual(const Value &left, const Value &right);
- static Bool compareNotEqual(const Value &left, const Value &right);
- static Bool compareStrictEqual(const Value &left, const Value &right);
- static Bool compareStrictNotEqual(const Value &left, const Value &right);
+ RUNTIME_METHOD(Bool, compareGreaterThan, (const Value &l, const Value &r));
+ RUNTIME_METHOD(Bool, compareLessThan, (const Value &l, const Value &r));
+ RUNTIME_METHOD(Bool, compareGreaterEqual, (const Value &l, const Value &r));
+ RUNTIME_METHOD(Bool, compareLessEqual, (const Value &l, const Value &r));
+ RUNTIME_METHOD(Bool, compareEqual, (const Value &left, const Value &right));
+ RUNTIME_METHOD(Bool, compareNotEqual, (const Value &left, const Value &right));
+ RUNTIME_METHOD(Bool, compareStrictEqual, (const Value &left, const Value &right));
+ RUNTIME_METHOD(Bool, compareStrictNotEqual, (const Value &left, const Value &right));
typedef Bool (*CompareOperationContext)(ExecutionEngine *engine, const Value &left, const Value &right);
- static Bool compareInstanceof(ExecutionEngine *engine, const Value &left, const Value &right);
- static Bool compareIn(ExecutionEngine *engine, const Value &left, const Value &right);
+ RUNTIME_METHOD(Bool, compareInstanceof, (ExecutionEngine *engine, const Value &left, const Value &right));
+ RUNTIME_METHOD(Bool, compareIn, (ExecutionEngine *engine, const Value &left, const Value &right));
// conversions
RUNTIME_METHOD(Bool, toBoolean, (const Value &value));