From 5d26f5c83501a254f89cd46b74c55467c7f527c2 Mon Sep 17 00:00:00 2001 From: Jason Orendorff Date: Fri, 18 Sep 2009 08:53:03 -0500 Subject: [PATCH] Backed out changeset 8abad92fd850 (bug 500431) due to Tinderbox orangeness --- js/src/jsops.cpp | 14 +++++++------- js/src/jspropcache.h | 1 - js/src/jspropcacheinlines.h | 8 ++++---- 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/js/src/jsops.cpp b/js/src/jsops.cpp index ba112841d53..cb730513edd 100644 --- a/js/src/jsops.cpp +++ b/js/src/jsops.cpp @@ -1733,8 +1733,8 @@ } else if (scope->owned()) { if (sprop == scope->lastProp || scope->has(sprop)) { fast_set_propcache_hit: - PCMETER(JS_PROPERTY_CACHE(cx).pchits++); - PCMETER(JS_PROPERTY_CACHE(cx).setpchits++); + PCMETER(cache->pchits++); + PCMETER(cache->setpchits++); NATIVE_SET(cx, obj, sprop, entry, &rval); JS_UNLOCK_SCOPE(cx, scope); break; @@ -1769,8 +1769,8 @@ JS_ASSERT(!(obj->getClass()->flags & JSCLASS_SHARE_ALL_PROPERTIES)); - PCMETER(JS_PROPERTY_CACHE(cx).pchits++); - PCMETER(JS_PROPERTY_CACHE(cx).addpchits++); + PCMETER(cache->pchits++); + PCMETER(cache->addpchits++); /* * Beware classes such as Function that use the @@ -1809,7 +1809,7 @@ goto error; } if (sprop2 != sprop) { - PCMETER(JS_PROPERTY_CACHE(cx).slotchanges++); + PCMETER(cache->slotchanges++); JS_ASSERT(slot != sprop->slot && slot == sprop2->slot && sprop2->id == sprop->id); @@ -1840,7 +1840,7 @@ break; } JS_UNLOCK_SCOPE(cx, scope); - PCMETER(JS_PROPERTY_CACHE(cx).setpcmisses++); + PCMETER(cache->setpcmisses++); } if (!atom) { @@ -3546,7 +3546,7 @@ } do_initprop_miss: - PCMETER(JS_PROPERTY_CACHE(cx).inipcmisses++); + PCMETER(cache->inipcmisses++); JS_UNLOCK_SCOPE(cx, scope); /* Get the immediate property name into id. */ diff --git a/js/src/jspropcache.h b/js/src/jspropcache.h index e884489a233..bfb45974298 100644 --- a/js/src/jspropcache.h +++ b/js/src/jspropcache.h @@ -150,7 +150,6 @@ private: JSBool empty; #ifdef JS_PROPERTY_CACHE_METERING -public: JSPropCacheEntry *pctestentry; /* entry of the last PC-based test */ uint32 fills; /* number of cache entry fills */ uint32 nofills; /* couldn't fill (e.g. default get) */ diff --git a/js/src/jspropcacheinlines.h b/js/src/jspropcacheinlines.h index f1fb0dec198..2788491ae87 100644 --- a/js/src/jspropcacheinlines.h +++ b/js/src/jspropcacheinlines.h @@ -138,8 +138,8 @@ JSPropertyCache::testForSet(JSContext *cx, jsbytecode *pc, JSObject **objp, *atomp = JS_PROPERTY_CACHE(cx).fullTest(cx, pc, objp, pobjp, entryp); if (*atomp) { - PCMETER(misses++); - PCMETER(setmisses++); + PCMETER(cache->misses++); + PCMETER(cache->setmisses++); } return false; @@ -160,8 +160,8 @@ JSPropertyCache::testForInit(JSContext *cx, jsbytecode *pc, JSObject *obj, PCVCAP_SHAPE(entry->vcap) == cx->runtime->protoHazardShape) { JS_ASSERT(PCVCAP_TAG(entry->vcap) == 0); - PCMETER(pchits++); - PCMETER(inipchits++); + PCMETER(cache->pchits++); + PCMETER(cache->inipchits++); JS_ASSERT(PCVAL_IS_SPROP(entry->vword)); JSScopeProperty *sprop = PCVAL_TO_SPROP(entry->vword); JS_ASSERT(!(sprop->attrs & JSPROP_READONLY));