Replace old strtod with new strtod
authormhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 23:38:44 +0000 (23:38 +0000)
committermhahnenberg@apple.com <mhahnenberg@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 13 Feb 2012 23:38:44 +0000 (23:38 +0000)
commite960bcad9ac70cf56caf1a4e92cb269bbf83d744
tree5ea5e733b01196f9247d38bda761632b780e86c7
parent288f49199716cf9d7218ddae7c4e061818c0b562
Replace old strtod with new strtod
https://bugs.webkit.org/show_bug.cgi?id=68044

Reviewed by Geoffrey Garen.

* parser/Lexer.cpp: Added template argument. This version allows junk after numbers.
(JSC::::lex):
* runtime/JSGlobalObjectFunctions.cpp: Ditto.
(JSC::parseInt):
(JSC::jsStrDecimalLiteral):
* runtime/LiteralParser.cpp: Ditto.
(JSC::::Lexer::lexNumber):
* wtf/dtoa.cpp: Replaced old strtod with a new version that uses the new StringToDoubleConverter.
It takes a template argument to allow clients to determine statically whether it should allow
junk after the numbers or not.
(WTF):
(WTF::strtod):
* wtf/dtoa.h:
(WTF):
* wtf/text/WTFString.cpp: Added template argument. This version does not allow junk after numbers.
(WTF::toDoubleType):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@107625 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/parser/Lexer.cpp
Source/JavaScriptCore/runtime/JSGlobalObjectFunctions.cpp
Source/JavaScriptCore/runtime/LiteralParser.cpp
Source/JavaScriptCore/wtf/dtoa.cpp
Source/JavaScriptCore/wtf/dtoa.h
Source/JavaScriptCore/wtf/text/WTFString.cpp