aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/memory
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-11-27 14:21:44 +0100
committerLars Knoll <lars.knoll@qt.io>2017-11-30 09:17:28 +0000
commit6f9e578ce8d7b27a5160f70600e0bbe878ed7947 (patch)
treec90d0f5beac40ef6f082a85544b70d3cdc158bd0 /src/qml/memory
parent0b64810ada26ea1e7d19342f05f97e870ed1db1b (diff)
JIT: Inline load(Scoped)Local and store(Scoped)Local instructions
Generate inline code for loading and storing (scoped) locals in the JIT. Change-Id: I6eb72126a0a2c6012bf6e73df245c9301bd4c48d Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/memory')
-rw-r--r--src/qml/memory/qv4writebarrier_p.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/qml/memory/qv4writebarrier_p.h b/src/qml/memory/qv4writebarrier_p.h
index 4ec224cc36..c0f4b0b29a 100644
--- a/src/qml/memory/qv4writebarrier_p.h
+++ b/src/qml/memory/qv4writebarrier_p.h
@@ -142,8 +142,9 @@ V4_ASSERT_IS_TRIVIAL(V4PointerCheck)
}
-template <size_t offset>
+template <size_t o>
struct HeapValue : Value {
+ static Q_CONSTEXPR size_t offset = o;
Heap::Base *base() {
Heap::Base *base = reinterpret_cast<Heap::Base *>(this) - (offset/sizeof(Heap::Base));
Q_ASSERT(base->inUse());
@@ -158,8 +159,9 @@ struct HeapValue : Value {
}
};
-template <size_t offset>
+template <size_t o>
struct ValueArray {
+ static Q_CONSTEXPR size_t offset = o;
uint size;
uint alloc;
Value values[1];