aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4value_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-02-06 10:57:04 +0100
committerLars Knoll <lars.knoll@qt.io>2017-03-09 08:58:57 +0000
commitb214d6cc2f96837d6502c9a3068bbd0d08b5b929 (patch)
tree7937c9cd8333083a3ad7905432eb5368fea715b7 /src/qml/jsruntime/qv4value_p.h
parentc13baa8873589c46d19f256ba551a95a6b56d94f (diff)
Add an actual write barrier and centralize it in one place
All stores into the Heap from C++ and Moth should now go through the write barrier. Change-Id: Iae9347754b90d68c10fade9f345842e86ec460cd 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.h46
1 files changed, 0 insertions, 46 deletions
diff --git a/src/qml/jsruntime/qv4value_p.h b/src/qml/jsruntime/qv4value_p.h
index bb2132c85e..6d98692e94 100644
--- a/src/qml/jsruntime/qv4value_p.h
+++ b/src/qml/jsruntime/qv4value_p.h
@@ -708,52 +708,6 @@ inline unsigned int Value::toUInt32() const
return (unsigned int)toInt32();
}
-template <size_t offset>
-struct HeapValue : Value {
- void set(ExecutionEngine *e, const Value &newVal) {
- Q_UNUSED(e);
- setRawValue(newVal.rawValue());
- }
-};
-
-template <size_t offset>
-struct ValueArray {
- uint size;
- uint alloc;
- Value values[1];
-
- void set(ExecutionEngine *e, uint index, Value v) {
- Q_UNUSED(e);
- Q_ASSERT(index < alloc);
- values[index] = v;
- }
- void set(ExecutionEngine *e, uint index, Heap::Base *b) {
- Q_UNUSED(e);
- Q_ASSERT(index < alloc);
- values[index] = b;
- }
- inline const Value &operator[] (uint index) const {
- Q_ASSERT(index < alloc);
- return values[index];
- }
- inline const Value *data() const {
- return values;
- }
-
- void insertData(ExecutionEngine *e, uint index, Value v) {
- for (uint i = size - 1; i > index; --i) {
- values[i] = values[i - 1];
- }
- set(e, index, v);
- }
- void removeData(ExecutionEngine *e, uint index, int n = 1) {
- Q_UNUSED(e);
- for (uint i = index; i < size - n; ++i) {
- values[i] = values[i + n];
- }
- }
-};
-
}
QT_END_NAMESPACE