diff options
author | Lars Knoll <lars.knoll@qt.io> | 2017-11-02 16:02:10 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-14 21:45:42 +0000 |
commit | 002fdc48d43e4fd67921e0cd46c28d28aee06848 (patch) | |
tree | 08fdc81dc91153649d8b6c6514ed3b49ad970064 /src/qml/jsruntime/qv4engine_p.h | |
parent | 010197a42150ee73a17cb53fbe397a6c55b2d342 (diff) |
Bring back markObjects(), this time generated
Doing the marking of objects in a function instead of
using the table seems to be somewhat faster.
Change-Id: I9ec00cc0264f9a15c69b285db493bee31d99bf96
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4engine_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4engine_p.h | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/src/qml/jsruntime/qv4engine_p.h b/src/qml/jsruntime/qv4engine_p.h index db002035da..aaf69f6555 100644 --- a/src/qml/jsruntime/qv4engine_p.h +++ b/src/qml/jsruntime/qv4engine_p.h @@ -498,35 +498,6 @@ inline void ExecutionEngine::setCurrentContext(Heap::ExecutionContext *context) currentStackFrame->jsFrame->context = context; } -inline -void Heap::Base::mark(QV4::MarkStack *markStack) -{ - Q_ASSERT(inUse()); - const HeapItem *h = reinterpret_cast<const HeapItem *>(this); - Chunk *c = h->chunk(); - size_t index = h - c->realBase(); - Q_ASSERT(!Chunk::testBit(c->extendsBitmap, index)); - quintptr *bitmap = c->blackBitmap + Chunk::bitmapIndex(index); - quintptr bit = Chunk::bitForIndex(index); - if (!(*bitmap & bit)) { - *bitmap |= bit; - markStack->push(this); - } -} - -inline void Value::mark(MarkStack *markStack) -{ - Heap::Base *o = heapObject(); - if (o) - o->mark(markStack); -} - -inline void Managed::mark(MarkStack *markStack) -{ - Q_ASSERT(m()); - m()->mark(markStack); -} - #define CHECK_STACK_LIMITS(v4) if ((v4)->checkStackLimits()) return Encode::undefined(); \ ExecutionEngineCallDepthRecorder _executionEngineCallDepthRecorder(v4); |