@@ -0,0 +1,40 @@
1+From 8207a31c26cc42fee79363a14c4a8f4fcbfffe63 Mon Sep 17 00:00:00 2001
2+From: Jordan DeLong <jdelong@fb.com>
3+Date: Mon, 6 Oct 2014 18:30:28 -0700
4+Subject: [PATCH] Remove some MIN/MAX macro uses in the emitter
5+
6+Summary: <algorithm> has preferable type-safe versions that don't double-eval
7+their args.
8+
9+Reviewed By: @paulbiss
10+
11+Differential Revision: D1599803
12+---
13+ hphp/compiler/analysis/emitter.cpp | 6 +++---
14+ hphp/util/compatibility.h | 4 ----
15+ 2 files changed, 3 insertions(+), 7 deletions(-)
16+
17+diff --git a/hphp/compiler/analysis/emitter.cpp b/hphp/compiler/analysis/emitter.cpp
18+index 321e637..b1d3f2d 100644
19+--- a/hphp/compiler/analysis/emitter.cpp
20++++ b/hphp/compiler/analysis/emitter.cpp
21+@@ -799,8 +799,8 @@ void SymbolicStack::push(char sym) {
22+ if (sym != StackSym::W && sym != StackSym::K && sym != StackSym::L &&
23+ sym != StackSym::T && sym != StackSym::I && sym != StackSym::H) {
24+ m_actualStack.push_back(m_symStack.size());
25+- *m_actualStackHighWaterPtr = MAX(*m_actualStackHighWaterPtr,
26+- (int)m_actualStack.size());
27++ *m_actualStackHighWaterPtr = std::max(*m_actualStackHighWaterPtr,
28++ (int)m_actualStack.size());
29+ }
30+ m_symStack.push_back(SymEntry(sym));
31+ }
32+@@ -1010,7 +1010,7 @@ int SymbolicStack::sizeActual() const {
33+
34+ void SymbolicStack::pushFDesc() {
35+ m_fdescCount += kNumActRecCells;
36+- *m_fdescHighWaterPtr = MAX(*m_fdescHighWaterPtr, m_fdescCount);
37++ *m_fdescHighWaterPtr = std::max(*m_fdescHighWaterPtr, m_fdescCount);
38+ }
39+
40+ void SymbolicStack::popFDesc() {