@@ -76,12 +76,12 @@ namespace Js
7676 }
7777
7878 /* **************************************************************************
79- Multiply two unsigned longs. Return the low ulong and fill *pluHi with
80- the high ulong .
79+ Multiply two unsigned longs. Return the low uint32 and fill *pluHi with
80+ the high uint32 .
8181 ***************************************************************************/
8282#pragma warning(push)
8383#pragma warning(disable:4035) // Turn off warning that there is no return value
84- ulong NumberUtilities::MulLu (ulong lu1, ulong lu2, ulong *pluHi)
84+ uint32 NumberUtilities::MulLu (uint32 lu1, uint32 lu2, uint32 *pluHi)
8585 {
8686#if I386_ASM
8787 __asm
@@ -94,16 +94,16 @@ namespace Js
9494#else // !I386_ASM
9595 DWORDLONG llu = UInt32x32To64 (lu1, lu2);
9696
97- *pluHi = (ulong )(llu >> 32 );
98- return (ulong )llu;
97+ *pluHi = (uint32 )(llu >> 32 );
98+ return (uint32 )llu;
9999#endif // !I386_ASM
100100 }
101101#pragma warning(pop)
102102
103103 /* **************************************************************************
104104 Add two unsigned longs and return the carry bit.
105105 ***************************************************************************/
106- int NumberUtilities::AddLu (ulong *plu1, ulong lu2)
106+ int NumberUtilities::AddLu (uint32 *plu1, uint32 lu2)
107107 {
108108 *plu1 += lu2;
109109 return *plu1 < lu2;
@@ -118,7 +118,7 @@ namespace Js
118118#endif
119119 }
120120
121- int NumberUtilities::CbitZeroLeft (ulong lu)
121+ int NumberUtilities::CbitZeroLeft (uint32 lu)
122122 {
123123 int cbit = 0 ;
124124
@@ -343,15 +343,15 @@ namespace Js
343343 return (long )dbl;
344344 }
345345
346- ulong NumberUtilities::LuFromDblNearest (double dbl)
346+ uint32 NumberUtilities::LuFromDblNearest (double dbl)
347347 {
348348 if (Js::NumberUtilities::IsNan (dbl))
349349 return 0 ;
350- if (dbl >(ulong )0xFFFFFFFFUL )
351- return (ulong )0xFFFFFFFFUL ;
350+ if (dbl >(uint32 )0xFFFFFFFFUL )
351+ return (uint32 )0xFFFFFFFFUL ;
352352 if (dbl < 0 )
353353 return 0 ;
354- return (ulong )dbl;
354+ return (uint32 )dbl;
355355 }
356356
357357 BOOL NumberUtilities::FDblIsLong (double dbl, long *plw)
@@ -397,17 +397,17 @@ namespace Js
397397 if (uT & 0x08 )
398398 {
399399 cbit = 4 ;
400- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )(uT & 0x07 ) << 17 ;
400+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )(uT & 0x07 ) << 17 ;
401401 }
402402 else if (uT & 0x04 )
403403 {
404404 cbit = 3 ;
405- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )(uT & 0x03 ) << 18 ;
405+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )(uT & 0x03 ) << 18 ;
406406 }
407407 else if (uT & 0x02 )
408408 {
409409 cbit = 2 ;
410- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )(uT & 0x01 ) << 19 ;
410+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )(uT & 0x01 ) << 19 ;
411411 }
412412 else
413413 {
@@ -427,17 +427,17 @@ namespace Js
427427 }
428428
429429 if (cbit <= 17 )
430- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )uT << (17 - cbit);
430+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )uT << (17 - cbit);
431431 else if (cbit < 21 )
432432 {
433- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )uT >> (cbit - 17 );
434- Js::NumberUtilities::LuLoDbl (dbl) |= (ulong )uT << (49 - cbit);
433+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )uT >> (cbit - 17 );
434+ Js::NumberUtilities::LuLoDbl (dbl) |= (uint32 )uT << (49 - cbit);
435435 }
436436 else if (cbit <= 49 )
437- Js::NumberUtilities::LuLoDbl (dbl) |= (ulong )uT << (49 - cbit);
437+ Js::NumberUtilities::LuLoDbl (dbl) |= (uint32 )uT << (49 - cbit);
438438 else if (cbit <= 53 )
439439 {
440- Js::NumberUtilities::LuLoDbl (dbl) |= (ulong )uT >> (cbit - 49 );
440+ Js::NumberUtilities::LuLoDbl (dbl) |= (uint32 )uT >> (cbit - 49 );
441441 bExtra = (byte)(uT << (57 - cbit));
442442 }
443443 else if (0 != uT)
@@ -457,7 +457,7 @@ namespace Js
457457 Js::NumberUtilities::LuLoDbl (dbl) = 0 ;
458458 return dbl;
459459 }
460- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )cbit << 20 ;
460+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )cbit << 20 ;
461461
462462 // Use bExtra to round.
463463 if ((bExtra & 0x80 ) && ((bExtra & 0x7F ) || (Js::NumberUtilities::LuLoDbl (dbl) & 1 )))
@@ -509,16 +509,16 @@ namespace Js
509509 {
510510 if (cbit <= rightShiftValue)
511511 {
512- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )uT << (rightShiftValue - cbit);
512+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )uT << (rightShiftValue - cbit);
513513
514514 }
515515 else if (cbit <= leftShiftValue)
516516 {
517- Js::NumberUtilities::LuLoDbl (dbl) |= (ulong )uT << (leftShiftValue - cbit);
517+ Js::NumberUtilities::LuLoDbl (dbl) |= (uint32 )uT << (leftShiftValue - cbit);
518518 }
519519 else if (cbit == leftShiftValue + 1 )// 53 bits
520520 {
521- Js::NumberUtilities::LuLoDbl (dbl) |= (ulong )uT >> (cbit - leftShiftValue);
521+ Js::NumberUtilities::LuLoDbl (dbl) |= (uint32 )uT >> (cbit - leftShiftValue);
522522 bExtra = (byte)(uT << (60 - cbit));
523523 }
524524 else if (0 != uT)
@@ -540,7 +540,7 @@ namespace Js
540540 return dbl;
541541 }
542542
543- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )cbit << 20 ;
543+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )cbit << 20 ;
544544
545545 // Use bExtra to round.
546546 if ((bExtra & 0x80 ) && ((bExtra & 0x7F ) || (Js::NumberUtilities::LuLoDbl (dbl) & 1 )))
@@ -581,12 +581,12 @@ namespace Js
581581 if (uT & 0x04 )// is the 3rd bit set
582582 {
583583 cbit = 3 ;
584- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )(uT & 0x03 ) << 18 ;
584+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )(uT & 0x03 ) << 18 ;
585585 }
586586 else if (uT & 0x02 )// is the 2nd bit set
587587 {
588588 cbit = 2 ;
589- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )(uT & 0x01 ) << 19 ;
589+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )(uT & 0x01 ) << 19 ;
590590 }
591591 else // then is the first bit set
592592 {
@@ -598,17 +598,17 @@ namespace Js
598598 for (; (uT = (*psz - ' 0' )) <= 7 ; psz++)
599599 {
600600 if (cbit <= 18 )
601- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )uT << (18 - cbit);
601+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )uT << (18 - cbit);
602602 else if (cbit < 21 )
603603 {
604- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )uT >> (cbit - 18 );
605- Js::NumberUtilities::LuLoDbl (dbl) |= (ulong )uT << (50 - cbit);
604+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )uT >> (cbit - 18 );
605+ Js::NumberUtilities::LuLoDbl (dbl) |= (uint32 )uT << (50 - cbit);
606606 }
607607 else if (cbit <= 50 )
608- Js::NumberUtilities::LuLoDbl (dbl) |= (ulong )uT << (50 - cbit);
608+ Js::NumberUtilities::LuLoDbl (dbl) |= (uint32 )uT << (50 - cbit);
609609 else if (cbit <= 53 )
610610 {
611- Js::NumberUtilities::LuLoDbl (dbl) |= (ulong )uT >> (cbit - 50 );
611+ Js::NumberUtilities::LuLoDbl (dbl) |= (uint32 )uT >> (cbit - 50 );
612612 bExtra = (byte)(uT << (58 - cbit));
613613 }
614614 else if (0 != uT)
@@ -629,7 +629,7 @@ namespace Js
629629 return dbl;
630630
631631 }
632- Js::NumberUtilities::LuHiDbl (dbl) |= (ulong )cbit << 20 ;
632+ Js::NumberUtilities::LuHiDbl (dbl) |= (uint32 )cbit << 20 ;
633633
634634 // Use bExtra to round.
635635 if ((bExtra & 0x80 ) && ((bExtra & 0x7F ) || (Js::NumberUtilities::LuLoDbl (dbl) & 1 )))
0 commit comments