Bug 1100168 - Allow pretenuring on more objects, r=terrence.
authorBrian Hackett <bhackett1024@gmail.com>
Mon, 17 Nov 2014 09:55:27 -0700
changeset 216025 4407bd0c6330307ddc8b7c8ccfebe9c92fa2d559
parent 216024 03cd5b31ae494ca8d8f55858c6bbbcd64232fe31
child 216027 06f612773cc0d1f489161c9ca118505b3dd54196
push id51919
push userbhackett@mozilla.com
push dateMon, 17 Nov 2014 16:55:37 +0000
treeherdermozilla-inbound@4407bd0c6330 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs1100168
milestone36.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 1100168 - Allow pretenuring on more objects, r=terrence.
js/src/jsinfer.h
--- a/js/src/jsinfer.h
+++ b/js/src/jsinfer.h
@@ -1196,23 +1196,17 @@ struct TypeObject : public gc::TenuredCe
 
     bool hasTenuredProto() {
         return !(flags() & OBJECT_FLAG_NURSERY_PROTO);
     }
 
     gc::InitialHeap initialHeap(CompilerConstraintList *constraints);
 
     bool canPreTenure() {
-        // Only types associated with particular allocation sites or 'new'
-        // scripts can be marked as needing pretenuring. Other types can be
-        // used for different purposes across the compartment and can't use
-        // this bit reliably.
-        if (unknownProperties())
-            return false;
-        return fromAllocationSite() || newScript();
+        return !unknownProperties();
     }
 
     bool fromAllocationSite() {
         return flags() & OBJECT_FLAG_FROM_ALLOCATION_SITE;
     }
 
     void setShouldPreTenure(ExclusiveContext *cx) {
         MOZ_ASSERT(canPreTenure());