Bug 720891 - Despecialize the optimization for TypeObject marking; r=bhackett

This is not worth the cognitive burden and prevents us from nicely compacting
the Marker function definitions.
This commit is contained in:
Terrence Cole 2012-01-24 16:28:41 -08:00
parent 34bd7b8080
commit 2afe66178f

View File

@ -229,19 +229,6 @@ MarkTypeObjectUnbarriered(JSTracer *trc, types::TypeObject *type, const char *na
JS_ASSERT(type);
JS_SET_TRACING_NAME(trc, name);
Mark(trc, type);
/*
* Mark parts of a type object skipped by ScanTypeObject. ScanTypeObject is
* only used for marking tracers; for tracers with a callback, if we
* reenter through JS_TraceChildren then MarkChildren will *not* skip these
* members, and we don't need to handle them here.
*/
if (IS_GC_MARKING_TRACER(trc)) {
if (type->singleton && !type->lazy())
MarkObject(trc, type->singleton, "type_singleton");
if (type->interpretedFunction)
MarkObject(trc, type->interpretedFunction, "type_function");
}
}
void
@ -993,13 +980,11 @@ ScanTypeObject(GCMarker *gcmarker, types::TypeObject *type)
if (type->interpretedFunction)
PushMarkStack(gcmarker, type->interpretedFunction);
/*
* Don't need to trace singleton, an object with this type must have
* already been traced and it will also hold a reference on the script
* (singleton and functionScript types cannot be the newType of another
* object). Attempts to mark type objects directly must use MarkTypeObject,
* which will itself mark these extra bits.
*/
if (type->singleton && !type->lazy())
PushMarkStack(gcmarker, type->singleton);
if (type->interpretedFunction)
PushMarkStack(gcmarker, type->interpretedFunction);
}
void