From b361a59c699fca02379c149cf0b9c59490a1ba62 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 9 Mar 2017 13:32:59 +0100 Subject: Micro optimization Avoid the check whether the Value has a HeapObject if the Value is a Managed. Change-Id: I1dd42126cab57d094698402390fdcb4e427a7919 Reviewed-by: Simon Hausmann --- src/qml/jsruntime/qv4engine_p.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/qml/jsruntime/qv4engine_p.h') 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); -- cgit v1.2.3