chromium/v8/src/objects/js-segments.cc

// Copyright 2020 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.

#ifndef V8_INTL_SUPPORT
#error Internationalization is expected to be enabled.
#endif  // V8_INTL_SUPPORT

#include "src/objects/js-segments.h"

#include <map>
#include <memory>
#include <string>

#include "src/execution/isolate.h"
#include "src/heap/factory.h"
#include "src/objects/intl-objects.h"
#include "src/objects/js-segment-iterator-inl.h"
#include "src/objects/js-segmenter-inl.h"
#include "src/objects/js-segments-inl.h"
#include "src/objects/managed-inl.h"
#include "src/objects/objects-inl.h"
#include "unicode/brkiter.h"

namespace v8 {
namespace internal {

// ecma402 #sec-createsegmentsobject
MaybeHandle<JSSegments> JSSegments::Create(Isolate* isolate,
                                           DirectHandle<JSSegmenter> segmenter,
                                           Handle<String> string) {}

// ecma402 #sec-%segmentsprototype%.containing
MaybeHandle<Object> JSSegments::Containing(Isolate* isolate,
                                           DirectHandle<JSSegments> segments,
                                           double n_double) {}

namespace {

bool CurrentSegmentIsWordLike(icu::BreakIterator* break_iterator) {}

}  // namespace

// ecma402 #sec-createsegmentdataobject
MaybeHandle<JSSegmentDataObject> JSSegments::CreateSegmentDataObject(
    Isolate* isolate, JSSegmenter::Granularity granularity,
    icu::BreakIterator* break_iterator, DirectHandle<String> input_string,
    const icu::UnicodeString& unicode_string, int32_t start_index,
    int32_t end_index) {}

Handle<String> JSSegments::GranularityAsString(Isolate* isolate) const {}

}  // namespace internal
}  // namespace v8