5 #ifndef V8_INTL_SUPPORT 6 #error Internationalization is expected to be enabled. 7 #endif // V8_INTL_SUPPORT 9 #ifndef V8_OBJECTS_JS_NUMBER_FORMAT_INL_H_ 10 #define V8_OBJECTS_JS_NUMBER_FORMAT_INL_H_ 12 #include "src/objects-inl.h" 13 #include "src/objects/js-number-format.h" 16 #include "src/objects/object-macros.h" 21 ACCESSORS2(JSNumberFormat, locale, String, kLocaleOffset)
22 ACCESSORS(JSNumberFormat, icu_number_format, Managed<icu::NumberFormat>,
23 kICUNumberFormatOffset)
24 ACCESSORS(JSNumberFormat, bound_format, Object, kBoundFormatOffset)
25 SMI_ACCESSORS(JSNumberFormat, flags, kFlagsOffset)
27 inline void JSNumberFormat::set_style(Style style) {
28 DCHECK_LT(style, Style::COUNT);
30 hints = StyleBits::update(hints, style);
34 inline JSNumberFormat::Style JSNumberFormat::style()
const {
35 return StyleBits::decode(flags());
38 inline void JSNumberFormat::set_currency_display(
39 CurrencyDisplay currency_display) {
40 DCHECK_LT(currency_display, CurrencyDisplay::COUNT);
42 hints = CurrencyDisplayBits::update(hints, currency_display);
46 inline JSNumberFormat::CurrencyDisplay JSNumberFormat::currency_display()
48 return CurrencyDisplayBits::decode(flags());
51 CAST_ACCESSOR(JSNumberFormat);
56 #include "src/objects/object-macros-undef.h" 58 #endif // V8_OBJECTS_JS_NUMBER_FORMAT_INL_H_