зеркало из https://github.com/mozilla/gecko-dev.git
Bug 977308 - Pre-tenure all objects attached to scripts; r=sfink
--HG-- extra : rebase_source : d5638a91ffca3008b353d68f480014066c94a2d1
This commit is contained in:
Родитель
dd4ddb761b
Коммит
5798244efa
|
@ -2227,7 +2227,7 @@ IteratorResultShape(ExclusiveContext *cx, BytecodeEmitter *bce, unsigned *shape)
|
|||
// No need to do any guessing for the object kind, since we know exactly how
|
||||
// many properties we plan to have.
|
||||
gc::AllocKind kind = gc::GetGCObjectKind(2);
|
||||
obj = NewBuiltinClassInstance<PlainObject>(cx, kind);
|
||||
obj = NewBuiltinClassInstance<PlainObject>(cx, kind, TenuredObject);
|
||||
if (!obj)
|
||||
return false;
|
||||
|
||||
|
@ -7671,6 +7671,7 @@ CGObjectList::finish(ObjectArray *array)
|
|||
do {
|
||||
--cursor;
|
||||
MOZ_ASSERT(!*cursor);
|
||||
MOZ_ASSERT(objbox->object->isTenured());
|
||||
*cursor = objbox->object;
|
||||
} while ((objbox = objbox->emitLink) != nullptr);
|
||||
MOZ_ASSERT(cursor == array->vector);
|
||||
|
|
|
@ -1097,6 +1097,7 @@ ObjectBox::ObjectBox(JSObject *object, ObjectBox* traceLink)
|
|||
emitLink(nullptr)
|
||||
{
|
||||
MOZ_ASSERT(!object->is<JSFunction>());
|
||||
MOZ_ASSERT(object->isTenured());
|
||||
}
|
||||
|
||||
ObjectBox::ObjectBox(JSFunction *function, ObjectBox* traceLink)
|
||||
|
@ -1106,6 +1107,7 @@ ObjectBox::ObjectBox(JSFunction *function, ObjectBox* traceLink)
|
|||
{
|
||||
MOZ_ASSERT(object->is<JSFunction>());
|
||||
MOZ_ASSERT(asFunctionBox()->function() == function);
|
||||
MOZ_ASSERT(object->isTenured());
|
||||
}
|
||||
|
||||
FunctionBox *
|
||||
|
|
|
@ -1582,6 +1582,7 @@ class JSScript : public js::gc::TenuredCell
|
|||
JSObject *getObject(size_t index) {
|
||||
js::ObjectArray *arr = objects();
|
||||
MOZ_ASSERT(index < arr->length);
|
||||
MOZ_ASSERT(arr->vector[index]->isTenured());
|
||||
return arr->vector[index];
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче