From dee16c2cf01bc60ca1be0fae12b53d491474026d 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 b789ad89b6e0..457af6159b10 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) {