• oliver@apple.com's avatar
    Source/JavaScriptCore: Implement basic ES6 Math functions · 975f214f
    oliver@apple.com authored
    https://bugs.webkit.org/show_bug.cgi?id=123536
    
    Reviewed by Michael Saboff.
    
    Fairly trivial patch to implement the core ES6 Math functions.
    
    This doesn't implement Math.hypot as it is not a trivial function.
    I've also skipped Math.sign as I am yet to be convinced the spec
    behaviour is good.  Everything else is trivial.
    
    * runtime/MathObject.cpp:
    (JSC::MathObject::finishCreation):
    (JSC::mathProtoFuncACosh):
    (JSC::mathProtoFuncASinh):
    (JSC::mathProtoFuncATanh):
    (JSC::mathProtoFuncCbrt):
    (JSC::mathProtoFuncCosh):
    (JSC::mathProtoFuncExpm1):
    (JSC::mathProtoFuncFround):
    (JSC::mathProtoFuncLog1p):
    (JSC::mathProtoFuncLog10):
    (JSC::mathProtoFuncLog2):
    (JSC::mathProtoFuncSinh):
    (JSC::mathProtoFuncTanh):
    (JSC::mathProtoFuncTrunc):
    
    Source/WTF: Implement basic ES6 Math functions
    https://bugs.webkit.org/show_bug.cgi?id=123536
    
    Reviewed by Michael Saboff.
    
    Add basic implementations of necessary methods to MathExtras to
    deal with MSVC not supplying them
    
    * wtf/MathExtras.h:
    (asinh):
    (acosh):
    (atanh):
    (expm1):
    (log1p):
    (cbrt):
    
    LayoutTests: Implement ES6 Math functions
    https://bugs.webkit.org/show_bug.cgi?id=123536
    
    Reviewed by Michael Saboff.
    
    Add tests for new math functions
    
    * js/Object-getOwnPropertyNames-expected.txt:
    * js/math-expected.txt:
    * js/script-tests/Object-getOwnPropertyNames.js:
    * js/script-tests/math.js:
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@158401 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    975f214f