10. јун 2011. 00.25, <[email protected]> је написао/ла:

> This version of NaN handling is not going to work since NaN is not equal to
> anything. The rest of the V8 usage looks fine.
>

It seemed that NaN can take only 2 values in v8 world - see
http://code.google.com/p/v8/issues/detail?id=1101


>
>
> http://codereview.chromium.**org/7129051/diff/3001/src/**
> extensions/experimental/**number-format.cc<http://codereview.chromium.org/7129051/diff/3001/src/extensions/experimental/number-format.cc>
> File src/extensions/experimental/**number-format.cc (right):
>
> http://codereview.chromium.**org/7129051/diff/3001/src/**
> extensions/experimental/**number-format.cc#newcode90<http://codereview.chromium.org/7129051/diff/3001/src/extensions/experimental/number-format.cc#newcode90>
> src/extensions/experimental/**number-format.cc:90: if (value == nan_) {
> This does not work. NaN is not equal to anything so this should always
> be false. Have you tested this?
>

I did with actual NaN from JavaScript and non-number values like strings...


>
> You do need a is_nan method here. Most platforms provide one directly
> and windows has is_nan_. Can you introduce a i18n-extension-utils.h file
> that does the right platform #ifdef magic to make a is_nan method
> available on all platforms?
>

I'll try ICU approach.


>
> http://codereview.chromium.**org/7129051/diff/3001/src/**
> extensions/experimental/**number-format.h<http://codereview.chromium.org/7129051/diff/3001/src/extensions/experimental/number-format.h>
> File src/extensions/experimental/**number-format.h (right):
>
> http://codereview.chromium.**org/7129051/diff/3001/src/**
> extensions/experimental/**number-format.h#newcode58<http://codereview.chromium.org/7129051/diff/3001/src/extensions/experimental/number-format.h#newcode58>
> src/extensions/experimental/**number-format.h:58: void* param);
> Indentation is a bit off.
>
>
> http://codereview.chromium.**org/7129051/<http://codereview.chromium.org/7129051/>
>



-- 
Nebojša Ćirić

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to