From 289f7a0ee6ebf13a45fe51590a1b16ea424f9c15 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 12 Mar 2013 11:32:06 -0700 Subject: [PATCH] Disable PGO for ObjectImpl::nativeLookup (bug 844580, r=billm). --- js/src/vm/ObjectImpl.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/js/src/vm/ObjectImpl.cpp b/js/src/vm/ObjectImpl.cpp index b789ad89b6e..457af6159b1 100644 --- a/js/src/vm/ObjectImpl.cpp +++ b/js/src/vm/ObjectImpl.cpp @@ -282,6 +282,11 @@ js::ObjectImpl::slotInRange(uint32_t slot, SentinelAllowed sentinel) const } #endif /* DEBUG */ +// See bug 844580. +#if defined(_MSC_VER) +# pragma optimize("g", off) +#endif + #if defined(_MSC_VER) && _MSC_VER >= 1500 /* * Work around a compiler bug in MSVC9 and above, where inlining this function @@ -298,6 +303,10 @@ js::ObjectImpl::nativeLookup(JSContext *cx, jsid id) return Shape::search(cx, lastProperty(), id, &spp); } +#if defined(_MSC_VER) +# pragma optimize("", on) +#endif + void js::ObjectImpl::markChildren(JSTracer *trc) {