5 #ifndef V8_INTL_SUPPORT 6 #error Internationalization is expected to be enabled. 7 #endif // V8_INTL_SUPPORT 9 #ifndef V8_OBJECTS_JS_SEGMENTER_INL_H_ 10 #define V8_OBJECTS_JS_SEGMENTER_INL_H_ 12 #include "src/objects-inl.h" 13 #include "src/objects/js-segmenter.h" 16 #include "src/objects/object-macros.h" 22 ACCESSORS2(JSSegmenter, locale, String, kLocaleOffset)
23 ACCESSORS(JSSegmenter, icu_break_iterator, Managed<icu::BreakIterator>,
24 kICUBreakIteratorOffset)
25 SMI_ACCESSORS(JSSegmenter, flags, kFlagsOffset)
27 inline void JSSegmenter::set_line_break_style(LineBreakStyle line_break_style) {
28 DCHECK_GT(LineBreakStyle::COUNT, line_break_style);
30 hints = LineBreakStyleBits::update(hints, line_break_style);
34 inline JSSegmenter::LineBreakStyle JSSegmenter::line_break_style()
const {
35 return LineBreakStyleBits::decode(flags());
38 inline void JSSegmenter::set_granularity(Granularity granularity) {
39 DCHECK_GT(Granularity::COUNT, granularity);
41 hints = GranularityBits::update(hints, granularity);
45 inline JSSegmenter::Granularity JSSegmenter::granularity()
const {
46 return GranularityBits::decode(flags());
49 CAST_ACCESSOR(JSSegmenter);
54 #include "src/objects/object-macros-undef.h" 56 #endif // V8_OBJECTS_JS_SEGMENTER_INL_H_