Bug 603433 - TM: various GC cleanups, r=igor

This commit is contained in:
Gregor Wagner 2010-10-13 09:22:05 -07:00
parent 920b80ef4e
commit 669cd09bcd
3 changed files with 3 additions and 24 deletions

View File

@ -1040,7 +1040,7 @@ NewCompartment(JSContext *cx, JSPrincipals *principals);
inline JSCompartment *
JSObject::getCompartment() const
{
return ((Cell *)this)->compartment();
return compartment();
}
#endif /* jsgc_h___ */

View File

@ -103,7 +103,7 @@ js_NewGCString(JSContext *cx)
inline JSShortString *
js_NewGCShortString(JSContext *cx)
{
return (JSShortString *) NewFinalizableGCThing<JSShortString>(cx, js::gc::FINALIZE_SHORT_STRING);
return NewFinalizableGCThing<JSShortString>(cx, js::gc::FINALIZE_SHORT_STRING);
}
inline JSString *
@ -204,21 +204,6 @@ MarkChildren(JSTracer *trc, JSObject *obj)
(op ? op : js_TraceObject)(trc, obj);
}
static inline void
MarkChildren(JSTracer *trc, JSFunction *fun)
{
JSObject *obj = reinterpret_cast<JSObject *>(fun);
if (!obj->map)
return;
if (JSObject *proto = obj->getProto())
MarkObject(trc, *proto, "proto");
if (JSObject *parent = obj->getParent())
MarkObject(trc, *parent, "parent");
TraceOp op = obj->getOps()->trace;
(op ? op : js_TraceObject)(trc, obj);
}
static inline void
MarkChildren(JSTracer *trc, JSString *str)
{
@ -240,12 +225,6 @@ MarkChildren(JSTracer *trc, JSXML *xml)
}
#endif
#if JS_STACK_GROWTH_DIRECTION > 0
# define JS_CHECK_STACK_SIZE(limit, lval) ((jsuword)(lval) < limit)
#else
# define JS_CHECK_STACK_SIZE(limit, lval) ((jsuword)(lval) > limit)
#endif
static inline bool
RecursionTooDeep(GCMarker *gcmarker) {
#ifdef JS_GC_ASSUME_LOW_C_STACK

View File

@ -371,7 +371,7 @@ GCTimer::finish(bool lastGC) {
gcFile = fopen("gcTimer.dat", "a");
fprintf(gcFile, " AppTime, Total, Mark, Sweep, FinObj,");
fprintf(gcFile, " FinStr, Destroy, newChunks, destoyChunks\n");
fprintf(gcFile, " FinStr, Destroy, newChunks, destroyChunks\n");
}
JS_ASSERT(gcFile);
fprintf(gcFile, "%12.1f, %6.1f, %6.1f, %6.1f, %6.1f, %6.1f, %7.1f, ",