| // Copyright 2019 the V8 project authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #include 'src/objects/js-break-iterator.h' |
| #include 'src/objects/js-collator.h' |
| #include 'src/objects/js-date-time-format.h' |
| #include 'src/objects/js-display-names.h' |
| #include 'src/objects/js-list-format.h' |
| #include 'src/objects/js-locale.h' |
| #include 'src/objects/js-number-format.h' |
| #include 'src/objects/js-objects.h' |
| #include 'src/objects/js-plural-rules.h' |
| #include 'src/objects/js-relative-time-format.h' |
| #include 'src/objects/js-segment-iterator.h' |
| #include 'src/objects/js-segmenter.h' |
| #include 'src/objects/js-segments.h' |
| |
| type DateTimeStyle extends int32 constexpr 'JSDateTimeFormat::DateTimeStyle'; |
| type HourCycle extends int32 constexpr 'JSDateTimeFormat::HourCycle'; |
| bitfield struct JSDateTimeFormatFlags extends uint31 { |
| hour_cycle: HourCycle: 3 bit; |
| date_style: DateTimeStyle: 3 bit; |
| time_style: DateTimeStyle: 3 bit; |
| } |
| |
| @generateCppClass |
| extern class JSDateTimeFormat extends JSObject { |
| locale: String; |
| icu_locale: Foreign; // Managed<icu::Locale> |
| icu_simple_date_format: Foreign; // Managed<icu::SimpleDateFormat> |
| icu_date_interval_format: Foreign; // Managed<icu::DateIntervalFormat> |
| bound_format: JSFunction|Undefined; |
| flags: SmiTagged<JSDateTimeFormatFlags>; |
| } |
| |
| type JSDisplayNamesStyle extends int32 constexpr 'JSDisplayNames::Style'; |
| type JSDisplayNamesFallback extends int32 |
| constexpr 'JSDisplayNames::Fallback'; |
| bitfield struct JSDisplayNamesFlags extends uint31 { |
| style: JSDisplayNamesStyle: 2 bit; |
| fallback: JSDisplayNamesFallback: 1 bit; |
| } |
| |
| @generateCppClass |
| extern class JSDisplayNames extends JSObject { |
| internal: Foreign; // Managed<DisplayNamesInternal> |
| flags: SmiTagged<JSDisplayNamesFlags>; |
| } |
| |
| type JSListFormatStyle extends int32 constexpr 'JSListFormat::Style'; |
| type JSListFormatType extends int32 constexpr 'JSListFormat::Type'; |
| bitfield struct JSListFormatFlags extends uint31 { |
| style: JSListFormatStyle: 2 bit; |
| Type: JSListFormatType: 2 bit; // "type" is a reserved word. |
| } |
| |
| @generateCppClass |
| extern class JSListFormat extends JSObject { |
| locale: String; |
| icu_formatter: Foreign; // Managed<icu::ListFormatter> |
| flags: SmiTagged<JSListFormatFlags>; |
| } |
| |
| @generateCppClass |
| extern class JSNumberFormat extends JSObject { |
| locale: String; |
| icu_number_formatter: |
| Foreign; // Managed<icu::number::LocalizedNumberFormatter> |
| bound_format: JSFunction|Undefined; |
| } |
| |
| type JSPluralRulesType extends int32 constexpr 'JSPluralRules::Type'; |
| bitfield struct JSPluralRulesFlags extends uint31 { |
| Type: JSPluralRulesType: 1 bit; // "type" is a reserved word. |
| } |
| |
| @generateCppClass |
| extern class JSPluralRules extends JSObject { |
| locale: String; |
| flags: SmiTagged<JSPluralRulesFlags>; |
| icu_plural_rules: Foreign; // Managed<icu::PluralRules> |
| icu_number_formatter: |
| Foreign; // Managed<icu::number::LocalizedNumberFormatter> |
| } |
| |
| type JSRelativeTimeFormatNumeric extends int32 |
| constexpr 'JSRelativeTimeFormat::Numeric'; |
| bitfield struct JSRelativeTimeFormatFlags extends uint31 { |
| numeric: JSRelativeTimeFormatNumeric: 1 bit; |
| } |
| |
| @generateCppClass |
| extern class JSRelativeTimeFormat extends JSObject { |
| locale: String; |
| numberingSystem: String; |
| icu_formatter: Foreign; // Managed<icu::RelativeDateTimeFormatter> |
| flags: SmiTagged<JSRelativeTimeFormatFlags>; |
| } |
| |
| @generateCppClass |
| extern class JSLocale extends JSObject { |
| icu_locale: Foreign; // Managed<icu::Locale> |
| } |
| |
| type JSSegmenterGranularity extends int32 |
| constexpr 'JSSegmenter::Granularity'; |
| bitfield struct JSSegmenterFlags extends uint31 { |
| granularity: JSSegmenterGranularity: 2 bit; |
| } |
| |
| @generateCppClass |
| extern class JSSegmenter extends JSObject { |
| locale: String; |
| icu_break_iterator: Foreign; // Managed<icu::BreakIterator> |
| flags: SmiTagged<JSSegmenterFlags>; |
| } |
| |
| bitfield struct JSSegmentsFlags extends uint31 { |
| granularity: JSSegmenterGranularity: 2 bit; |
| } |
| |
| @generateCppClass |
| extern class JSSegments extends JSObject { |
| icu_break_iterator: Foreign; // Managed<icu::BreakIterator> |
| unicode_string: Foreign; // Managed<icu::UnicodeString> |
| flags: SmiTagged<JSSegmentsFlags>; |
| } |
| |
| bitfield struct JSSegmentIteratorFlags extends uint31 { |
| granularity: JSSegmenterGranularity: 2 bit; |
| } |
| |
| @generateCppClass |
| extern class JSSegmentIterator extends JSObject { |
| icu_break_iterator: Foreign; // Managed<icu::BreakIterator> |
| flags: SmiTagged<JSSegmentIteratorFlags>; |
| } |
| |
| @generateCppClass |
| extern class JSV8BreakIterator extends JSObject { |
| locale: String; |
| break_iterator: Foreign; // Managed<icu::BreakIterator>; |
| unicode_string: Foreign; // Managed<icu::UnicodeString>; |
| bound_adopt_text: Undefined|JSFunction; |
| bound_first: Undefined|JSFunction; |
| bound_next: Undefined|JSFunction; |
| bound_current: Undefined|JSFunction; |
| bound_break_type: Undefined|JSFunction; |
| } |
| |
| @generateCppClass |
| extern class JSCollator extends JSObject { |
| icu_collator: Foreign; // Managed<icu::Collator> |
| bound_compare: Undefined|JSFunction; |
| } |