aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/parser/qqmljsmemorypool_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-03-11 12:27:48 +0100
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-03-20 13:14:52 +0000
commit2a37b8f2b1522558a6144b09db6f9487652a788c (patch)
tree8ae20d7307ed6755db2714a6dc8a2371523f8b64 /src/qml/parser/qqmljsmemorypool_p.h
parent2e7d4ecdc59942b484159ca827f5d5dbc8787a1b (diff)
V4: Allow the compiler to inline more small methods.
Change-Id: Ib2dc03a2535fcbdb10be2dab39593e8dc224fd93 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/parser/qqmljsmemorypool_p.h')
-rw-r--r--src/qml/parser/qqmljsmemorypool_p.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/qml/parser/qqmljsmemorypool_p.h b/src/qml/parser/qqmljsmemorypool_p.h
index 3659271bc6..08609e2961 100644
--- a/src/qml/parser/qqmljsmemorypool_p.h
+++ b/src/qml/parser/qqmljsmemorypool_p.h
@@ -94,7 +94,7 @@ public:
inline void *allocate(size_t size)
{
size = (size + 7) & ~7;
- if (_ptr && (_ptr + size < _end)) {
+ if (Q_LIKELY(_ptr && (_ptr + size < _end))) {
void *addr = _ptr;
_ptr += size;
return addr;
@@ -111,7 +111,7 @@ public:
template <typename Tp> Tp *New() { return new (this->allocate(sizeof(Tp))) Tp(); }
private:
- void *allocate_helper(size_t size)
+ Q_NEVER_INLINE void *allocate_helper(size_t size)
{
Q_ASSERT(size < BLOCK_SIZE);