From ac68997dbd16c297ccb2986900e8ba1279282cdf Mon Sep 17 00:00:00 2001 From: "crowder@fiverocks.com" Date: Mon, 11 Feb 2008 12:23:28 -0800 Subject: [PATCH] Bug 416615 - Optimize JS_MAX(upcase(localMax), downcase(localMax)), r=mrbkap, blocking1.9=brendan, idea from BijuMailList@gmail.com --- js/src/jsregexp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/js/src/jsregexp.c b/js/src/jsregexp.c index 0b98cc1db912..c435778fbc74 100644 --- a/js/src/jsregexp.c +++ b/js/src/jsregexp.c @@ -1055,7 +1055,10 @@ lexHex: break; } if (state->flags & JSREG_FOLD) { - c = (jschar) JS_MAX(upcase(localMax), downcase(localMax)); + jschar uc = upcase(localMax); + jschar dc = downcase(localMax); + + c = JS_MAX(uc, dc); if (c > localMax) localMax = c; }