summaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-06 16:24:59 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-02 14:18:32 +0000
commita6da23bb5f6004e13d22838c7db1246169874930 (patch)
tree27455bc82cb7705f9f0b8816fee02b7b22927d08 /src/qml/jsruntime/qv4engine_p.h
parentd1af494793961a31747b689cf307b65d99367486 (diff)
Garbage collect identifiers
Implemented by storing a backpointer to the Heap object in the identifier. Since identifiers now point back to their originating String or Symbol, we can now easily mark all identifiers that are still in use and collect those that aren't. Since Identifiers are 64bit also add support for holding an array index in there. With that an identifier can describe any kind of property that can be accessed in an object. This helps speed up and simplify some code paths. To make this possible, we need to register all IdentifierHash instances with the identifier table, so that we can properly mark those identifiers. Change-Id: Icadbaf5712ab9d252d4e71aa4a520e86b14cd2a0 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r--src/qml/jsruntime/qv4engine_p.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index 69c62261d2..4316967484 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -157,11 +157,6 @@ public:
QV8Engine *v8Engine;
QJSEngine *publicEngine;
-private:
- quintptr currentIdentifier = 0;
-public:
- Identifier nextIdentifier() { return Identifier{ ++currentIdentifier }; }
-
enum JSObjects {
RootContext,
IntegerNull, // Has to come after the RootContext to make the context stack safe