> Will it still add to total object count if this is used:?

Due to the fact that we're reserving space for all objects in the compilation unit, the rectangle does count towards the total. Indeed the calculation could be improved here. We're not going to need this stack slot. Maybe we should allocate stack iteratively, as needed rather than all of it at once. However, that will have a (small) performance cost for simpler documents.

It might even be possible to recycle some of the stack space once we're "done" with an object, but I haven't looked at it in detail.

If you're going to hack around in this, maybe first measure how much stack space it allocates and how much it actually uses in your case. The place where it uses the stack space is in createInstance():

*sharedState->allJavaScriptObjects = QV4::QObjectWrapper::wrap(v4, instance);
    ++sharedState->allJavaScriptObjects;

best regards,
Ulf
_______________________________________________
Interest mailing list
Interest@qt-project.org
https://lists.qt-project.org/listinfo/interest

Reply via email to