diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-04-07 13:28:59 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-05-02 14:18:27 +0000 |
commit | d1af494793961a31747b689cf307b65d99367486 (patch) | |
tree | 1e89898065334e841ded62499331274cb9d0b230 /src/qml/jsruntime/qv4value_p.h | |
parent | 3c090c80c58d99f1bd29493ef747a4f6fa915a71 (diff) |
Change Objects vtable methods to take a StringOrSymbol
This is needed for symbol support.
Change-Id: I83db21f232168710d18999fd97d912016e86d630
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4value_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4value_p.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h index 03c9eda0f2..85c345f645 100644 --- a/src/qml/jsruntime/qv4value_p.h +++ b/src/qml/jsruntime/qv4value_p.h @@ -332,6 +332,8 @@ public: Q_ASSERT(isDouble()); } inline bool isString() const; + inline bool isStringOrSymbol() const; + inline bool isSymbol() const; inline bool isObject() const; inline bool isFunctionObject() const; inline bool isInt32() { @@ -504,6 +506,18 @@ inline bool Value::isString() const Heap::Base *b = heapObject(); return b && b->internalClass->vtable->isString; } + +bool Value::isStringOrSymbol() const +{ + Heap::Base *b = heapObject(); + return b && b->internalClass->vtable->isStringOrSymbol; +} + +bool Value::isSymbol() const +{ + Heap::Base *b = heapObject(); + return b && b->internalClass->vtable->isStringOrSymbol && !b->internalClass->vtable->isString; +} inline bool Value::isObject() const { Heap::Base *b = heapObject(); |