Bug 803907 - Remove some unused GC functions (r=terrence)
authorBill McCloskey <wmccloskey@mozilla.com>
Fri, 26 Oct 2012 11:53:25 -0700
changeset 111684 3ff0432ce8d90a9a28e7460a77c594310176f426
parent 111683 fb81587d2dd8f04bf3dbaceb8cadbffea9e14710
child 111685 2373c969584c51e46467c1a9762c57aef19e21e8
push id93
push usernmatsakis@mozilla.com
push dateWed, 31 Oct 2012 21:26:57 +0000
reviewersterrence
bugs803907
milestone19.0a1
Bug 803907 - Remove some unused GC functions (r=terrence)
js/src/jsgc.cpp
js/src/jsgc.h
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -1279,23 +1279,16 @@ RecordNativeStackTopForGC(JSRuntime *rt)
     if (!rt->requestDepth)
         return;
 #endif
     cgcd->recordStackTop();
 }
 
 } /* namespace js */
 
-bool
-js_IsAddressableGCThing(JSRuntime *rt, uintptr_t w, gc::AllocKind *thingKind, void **thing)
-{
-    rt->gcHelperThread.waitBackgroundSweepOrAllocEnd();
-    return js::IsAddressableGCThing(rt, w, false, thingKind, NULL, thing) == CGCT_VALID;
-}
-
 void
 js_FinishGC(JSRuntime *rt)
 {
     /*
      * Wait until the background finalization stops and the helper thread
      * shuts down before we forcefully release any remaining GC memory.
      */
     rt->gcHelperThread.finish();
--- a/js/src/jsgc.h
+++ b/js/src/jsgc.h
@@ -436,22 +436,16 @@ struct ArenaLists {
  * chunks with total capacity of 16MB to avoid buffer resizes during browser
  * startup.
  */
 const size_t INITIAL_CHUNK_CAPACITY = 16 * 1024 * 1024 / ChunkSize;
 
 /* The number of GC cycles an empty chunk can survive before been released. */
 const size_t MAX_EMPTY_CHUNK_AGE = 4;
 
-inline Cell *
-AsCell(JSObject *obj)
-{
-    return reinterpret_cast<Cell *>(obj);
-}
-
 } /* namespace gc */
 
 struct GCPtrHasher
 {
     typedef void *Lookup;
 
     static HashNumber hash(void *key) {
         return HashNumber(uintptr_t(key) >> JS_GCTHING_ZEROBITS);
@@ -495,19 +489,16 @@ typedef struct JSPtrTable {
 } JSPtrTable;
 
 extern JSBool
 js_LockGCThingRT(JSRuntime *rt, void *thing);
 
 extern void
 js_UnlockGCThingRT(JSRuntime *rt, void *thing);
 
-extern bool
-js_IsAddressableGCThing(JSRuntime *rt, uintptr_t w, js::gc::AllocKind *thingKind, void **thing);
-
 namespace js {
 
 extern void
 MarkCompartmentActive(js::StackFrame *fp);
 
 extern void
 TraceRuntime(JSTracer *trc);