aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4engine_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-03-09 13:32:59 +0100
committerLars Knoll <lars.knoll@qt.io>2017-04-07 06:06:22 +0000
commitb361a59c699fca02379c149cf0b9c59490a1ba62 (patch)
treeb66f16bff41b941d44b07d5e14706d2ae3e73e44 /src/qml/jsruntime/qv4engine_p.h
parent589f8a90fa8c158ec97f32d4a9539b47ba8486a2 (diff)
Micro optimization
Avoid the check whether the Value has a HeapObject if the Value is a Managed. Change-Id: I1dd42126cab57d094698402390fdcb4e427a7919 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h
index bace8b700b..a2c774c295 100644
--- a/src/qml/jsruntime/qv4engine_p.h
+++ b/src/qml/jsruntime/qv4engine_p.h
@@ -559,6 +559,12 @@ inline void Value::mark(MarkStack *markStack)
o->mark(markStack);
}
+inline void Managed::mark(MarkStack *markStack)
+{
+ Q_ASSERT(m());
+ m()->mark(markStack);
+}
+
#define CHECK_STACK_LIMITS(v4, scope) if ((v4)->checkStackLimits(scope)) return; \
ExecutionEngineCallDepthRecorder _executionEngineCallDepthRecorder(v4);