Ignore:
Timestamp:
Aug 26, 2010, 5:38:54 PM (15 years ago)
Author:
[email protected]
Message:

Rubber Stamped by Oliver Hunt.

Partially revert r65959. The toString changes regressed the v8 tests,
but keep the toFixed/toExponential/toPrecision changes.

JavaScriptCore:

(JSC::UString::number):

  • wtf/DecimalNumber.h:
  • wtf/dtoa.cpp:

(WTF::append):
(WTF::doubleToStringInJavaScriptFormat):

  • wtf/dtoa.h:
  • wtf/text/WTFString.cpp:
  • wtf/text/WTFString.h:

WebCore:

  • html/HTMLTreeBuilder.cpp:

(WebCore::serializeForNumberType):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/UString.cpp

    r65959 r66159  
    2727#include "JSGlobalObjectFunctions.h"
    2828#include "Collector.h"
     29#include "dtoa.h"
    2930#include "Identifier.h"
    3031#include "Operations.h"
     
    3940#include <wtf/StringExtras.h>
    4041#include <wtf/Vector.h>
    41 #include <wtf/text/WTFString.h>
    4242#include <wtf/unicode/UTF8.h>
    4343
     
    199199UString UString::number(double d)
    200200{
    201     NumberToStringBuffer buffer;
    202     return StringImpl::create(buffer, numberToString(d, buffer));
     201    DtoaBuffer buffer;
     202    unsigned length;
     203    doubleToStringInJavaScriptFormat(d, buffer, &length);
     204    return UString(buffer, length);
    203205}
    204206
Note: See TracChangeset for help on using the changeset viewer.