Bug 848612 - Don't store strings in the store buffer; r=billm
authorTerrence Cole <terrence@mozilla.com>
Thu, 07 Mar 2013 10:50:26 -0800
changeset 124148 b57e338dd933ca47c3ac9608e78e4fdbe275f541
parent 124147 1ccebe00cd2c243cbc67e3011d0e0c724d7ef39e
child 124149 916cfe5fa71149bca9828840a3fc22a5be00d96c
push id24408
push userryanvm@gmail.com
push dateFri, 08 Mar 2013 04:58:11 +0000
treeherdermozilla-central@cb432984d5ce [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbillm
bugs848612
milestone22.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 848612 - Don't store strings in the store buffer; r=billm
js/src/jsgc.h
js/src/vm/String-inl.h
--- a/js/src/jsgc.h
+++ b/js/src/jsgc.h
@@ -134,18 +134,18 @@ IsNurseryAllocable(AllocKind kind)
         false,     /* FINALIZE_OBJECT12 */
         true,      /* FINALIZE_OBJECT12_BACKGROUND */
         false,     /* FINALIZE_OBJECT16 */
         true,      /* FINALIZE_OBJECT16_BACKGROUND */
         false,     /* FINALIZE_SCRIPT */
         false,     /* FINALIZE_SHAPE */
         false,     /* FINALIZE_BASE_SHAPE */
         false,     /* FINALIZE_TYPE_OBJECT */
-        true,      /* FINALIZE_SHORT_STRING */
-        true,      /* FINALIZE_STRING */
+        false,     /* FINALIZE_SHORT_STRING */
+        false,     /* FINALIZE_STRING */
         false,     /* FINALIZE_EXTERNAL_STRING */
         false,     /* FINALIZE_IONCODE */
     };
     JS_STATIC_ASSERT(JS_ARRAY_LENGTH(map) == FINALIZE_LIMIT);
     return map[kind];
 }
 #endif
 
--- a/js/src/vm/String-inl.h
+++ b/js/src/vm/String-inl.h
@@ -92,27 +92,21 @@ NewShortString(JSContext *cx, TwoByteCha
     storage[len] = 0;
     Probes::createString(cx, str, len);
     return str;
 }
 
 static inline void
 StringWriteBarrierPost(JSRuntime *rt, JSString **strp)
 {
-#ifdef JSGC_GENERATIONAL
-    rt->gcStoreBuffer.putRelocatableCell(reinterpret_cast<gc::Cell **>(strp));
-#endif
 }
 
 static inline void
 StringWriteBarrierPostRemove(JSRuntime *rt, JSString **strp)
 {
-#ifdef JSGC_GENERATIONAL
-    rt->gcStoreBuffer.removeRelocatableCell(reinterpret_cast<gc::Cell **>(strp));
-#endif
 }
 
 } /* namespace js */
 
 inline void
 JSString::writeBarrierPre(JSString *str)
 {
 #ifdef JSGC_INCREMENTAL
@@ -126,21 +120,16 @@ JSString::writeBarrierPre(JSString *str)
         JS_ASSERT(tmp == str);
     }
 #endif
 }
 
 inline void
 JSString::writeBarrierPost(JSString *str, void *addr)
 {
-#ifdef JSGC_GENERATIONAL
-    if (!str)
-        return;
-    str->runtime()->gcStoreBuffer.putCell((Cell **)addr);
-#endif
 }
 
 inline bool
 JSString::needWriteBarrierPre(JS::Zone *zone)
 {
 #ifdef JSGC_INCREMENTAL
     return zone->needsBarrier();
 #else