5 #ifndef V8_INTL_SUPPORT 6 #error Internationalization is expected to be enabled. 7 #endif // V8_INTL_SUPPORT 9 #ifndef V8_OBJECTS_JS_SEGMENT_ITERATOR_H_ 10 #define V8_OBJECTS_JS_SEGMENT_ITERATOR_H_ 12 #include "src/heap/factory.h" 13 #include "src/isolate.h" 14 #include "src/objects.h" 15 #include "src/objects/js-segmenter.h" 16 #include "src/objects/managed.h" 17 #include "unicode/uversion.h" 20 #include "src/objects/object-macros.h" 34 Isolate* isolate, icu::BreakIterator* icu_break_iterator,
73 inline void set_granularity(JSSegmenter::Granularity granularity);
74 inline JSSegmenter::Granularity granularity()
const;
77 #define FLAGS_BIT_FIELDS(V, _) \ 78 V(GranularityBits, JSSegmenter::Granularity, 3, _) 79 DEFINE_BIT_FIELDS(FLAGS_BIT_FIELDS)
80 #undef FLAGS_BIT_FIELDS 82 STATIC_ASSERT(JSSegmenter::Granularity::GRAPHEME <= GranularityBits::kMax);
83 STATIC_ASSERT(JSSegmenter::Granularity::WORD <= GranularityBits::kMax);
84 STATIC_ASSERT(JSSegmenter::Granularity::SENTENCE <= GranularityBits::kMax);
85 STATIC_ASSERT(JSSegmenter::Granularity::LINE <= GranularityBits::kMax);
88 DECL_INT_ACCESSORS(flags)
91 #define SEGMENTER_FIELDS(V) \ 93 V(kICUBreakIteratorOffset, kTaggedSize) \ 94 V(kUnicodeStringOffset, kTaggedSize) \ 95 V(kFlagsOffset, kTaggedSize) \ 99 DEFINE_FIELD_OFFSET_CONSTANTS(JSObject::kHeaderSize, SEGMENTER_FIELDS)
100 #undef SEGMENTER_FIELDS 109 #include "src/objects/object-macros-undef.h" 111 #endif // V8_OBJECTS_JS_SEGMENT_ITERATOR_H_