v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
js-segment-iterator-inl.h
Go to the documentation of this file.
1
// Copyright 2020 the V8 project authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef V8_OBJECTS_JS_SEGMENT_ITERATOR_INL_H_
6
#define V8_OBJECTS_JS_SEGMENT_ITERATOR_INL_H_
7
8
#ifndef V8_INTL_SUPPORT
9
#error Internationalization is expected to be enabled.
10
#endif
// V8_INTL_SUPPORT
11
12
#include "
src/objects/js-segment-iterator.h
"
13
// Include the non-inl header before the rest of the headers.
14
15
#include "
src/objects/objects-inl.h
"
16
17
// Has to be the last include (doesn't have include guards):
18
#include "
src/objects/object-macros.h
"
19
20
namespace
v8
{
21
namespace
internal
{
22
23
#include "torque-generated/src/objects/js-segment-iterator-tq-inl.inc"
24
25
TQ_OBJECT_CONSTRUCTORS_IMPL
(JSSegmentIterator)
26
TQ_OBJECT_CONSTRUCTORS_IMPL
(JSSegmentDataObject)
27
TQ_OBJECT_CONSTRUCTORS_IMPL
(JSSegmentDataObjectWithIsWordLike)
28
29
// Base segment iterator accessors.
30
ACCESSORS
(
JSSegmentIterator
, icu_break_iterator,
31
Tagged
<
Managed
<icu::
BreakIterator
>>, kIcuBreakIteratorOffset)
32
ACCESSORS
(
JSSegmentIterator
, raw_string,
Tagged
<
String
>, kRawStringOffset)
33
ACCESSORS
(
JSSegmentIterator
,
unicode_string
,
34
Tagged
<
Managed
<icu::UnicodeString>>, kUnicodeStringOffset)
35
36
inline
void
JSSegmentIterator
::set_granularity(
37
JSSegmenter
::Granularity granularity) {
38
DCHECK
(GranularityBits::is_valid(granularity));
39
int
hints =
flags
();
40
hints = GranularityBits::update(hints, granularity);
41
set_flags(hints);
42
}
43
44
inline
JSSegmenter::Granularity
JSSegmentIterator::granularity
()
const
{
45
return
GranularityBits::decode(
flags
());
46
}
47
48
}
// namespace internal
49
}
// namespace v8
50
51
#include "
src/objects/object-macros-undef.h
"
52
53
#endif
// V8_OBJECTS_JS_SEGMENT_ITERATOR_INL_H_
v8::internal::BreakIterator
Definition
debug.h:136
v8::internal::JSSegmentIterator
Definition
js-segment-iterator.h:34
v8::internal::JSSegmentIterator::granularity
JSSegmenter::Granularity granularity() const
Definition
js-segment-iterator-inl.h:44
v8::internal::JSSegmenter
Definition
js-segmenter.h:34
v8::internal::JSSegmenter::Granularity
Granularity
Definition
js-segmenter.h:55
v8::internal::Managed
Definition
wasm-objects.h:67
v8::internal::String
Definition
string.h:113
v8::internal::Tagged
Definition
waiter-queue-node.h:21
js-segment-iterator.h
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8::internal::flags
Flag flags[]
Definition
flags.cc:3797
v8::internal::unicode_string
unicode_string
Definition
js-break-iterator-inl.h:29
v8
Definition
api-arguments-inl.h:19
object-macros-undef.h
object-macros.h
ACCESSORS
#define ACCESSORS(holder, name, type, offset)
Definition
object-macros.h:279
TQ_OBJECT_CONSTRUCTORS_IMPL
#define TQ_OBJECT_CONSTRUCTORS_IMPL(Type)
Definition
object-macros.h:988
objects-inl.h
DCHECK
#define DCHECK(condition)
Definition
logging.h:482
src
objects
js-segment-iterator-inl.h
Generated on Sun Apr 6 2025 21:08:55 for v8 by
1.12.0