Ignore:
Timestamp:
Oct 10, 2008, 7:53:03 PM (17 years ago)
Author:
[email protected]
Message:

JavaScriptCore:

2008-10-10 Sam Weinig <[email protected]>

Reviewed by Darin Adler.

  • Add a workaround for a bug in ceil in Darwin libc.
  • Remove old workarounds for JS math functions that are not needed anymore.

The math functions are heavily tested by fast/js/math.html.

  • kjs/MathObject.cpp: (JSC::mathProtoFuncAbs): Remove workaround. (JSC::mathProtoFuncCeil): Ditto. (JSC::mathProtoFuncFloor): Ditto.
  • wtf/MathExtras.h: (wtf_ceil): Add ceil workaround for darwin.

LayoutTests:

2008-10-10 Sam Weinig <[email protected]>

Reviewed by Darin Adler.

  • Update tests after fixing ceil(-0.1) behavior on darwin.
  • fast/js/math-expected.txt:
  • fast/js/resources/math.js: Remove code to detect sign of 0 now that the harness can handle it.
  • fast/xpath/4XPath/Core/test_core_functions-expected.txt:
  • fast/xpath/4XPath/Core/test_core_functions.html: Update test expect correct result of -0.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/MathExtras.h

    r35234 r37498  
    6767#endif
    6868
     69#if PLATFORM(DARWIN)
     70
     71// Work around a bug in the Mac OS X libc where ceil(-0.1) return +0.
     72inline double wtf_ceil(double x) { return copysign(ceil(x), x); }
     73
     74#define ceil(x) wtf_ceil(x)
     75
     76#endif
     77
    6978#if PLATFORM(SOLARIS)
    7079
Note: See TracChangeset for help on using the changeset viewer.