[Webkit-unassigned] [Bug 147602] [INTL] Implement Intl.NumberFormat.prototype.resolvedOptions ()

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat Oct 31 10:05:08 PDT 2015


https://bugs.webkit.org/show_bug.cgi?id=147602

Geoffrey Garen <ggaren at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #264455|review?                     |review+, commit-queue-
              Flags|                            |

--- Comment #10 from Geoffrey Garen <ggaren at apple.com> ---
Comment on attachment 264455
  --> https://bugs.webkit.org/attachment.cgi?id=264455
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=264455&action=review

r=me

> Source/JavaScriptCore/runtime/IntlNumberFormat.h:87
> +    unsigned m_minimumIntegerDigits;
> +    unsigned m_minimumFractionDigits;
> +    unsigned m_maximumFractionDigits;

These need initializers.

> Source/JavaScriptCore/runtime/IntlNumberFormat.h:91
> +    bool m_useGrouping;

And this.

> Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp:71
> +#ifndef NDEBUG
> +    ASSERT(key == "nu");
> +#else
> +    UNUSED_PARAM(key);
> +#endif

You can use ASSERT_UNUSED here instead.

> Source/JavaScriptCore/runtime/IntlNumberFormatConstructor.cpp:73
> +    Vector<String> keyLocaleData({

Can we use std::array here instead? We don't intend to grow or shrink this data structure.

> Source/JavaScriptCore/runtime/IntlNumberFormatPrototype.cpp:156
> +    options->putDirect(vm, Identifier::fromString(&vm, "minimumIntegerDigits"), jsNumber(nf->minimumIntegerDigits()));
> +    options->putDirect(vm, Identifier::fromString(&vm, "minimumFractionDigits"), jsNumber(nf->minimumFractionDigits()));
> +    options->putDirect(vm, Identifier::fromString(&vm, "maximumFractionDigits"), jsNumber(nf->maximumFractionDigits()));
> +    if (nf->minimumSignificantDigits())
> +        options->putDirect(vm, Identifier::fromString(&vm, "minimumSignificantDigits"), jsNumber(nf->minimumSignificantDigits()));
> +    if (nf->maximumSignificantDigits())
> +        options->putDirect(vm, Identifier::fromString(&vm, "maximumSignificantDigits"), jsNumber(nf->maximumSignificantDigits()));
> +    options->putDirect(vm, Identifier::fromString(&vm, "useGrouping"), jsBoolean(nf->useGrouping()));

I think we want these to be CommonIdentifiers so we don't have to keep allocating and hashing them.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151031/bc0f5cbe/attachment.html>


More information about the webkit-unassigned mailing list