v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
js-collator.h
Go to the documentation of this file.
1// Copyright 2018 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_COLLATOR_H_
6#define V8_OBJECTS_JS_COLLATOR_H_
7
8#ifndef V8_INTL_SUPPORT
9#error Internationalization is expected to be enabled.
10#endif // V8_INTL_SUPPORT
11
12#include <set>
13#include <string>
14
16#include "src/heap/factory.h"
19#include "src/objects/managed.h"
20#include "src/objects/objects.h"
21
22// Has to be the last include (doesn't have include guards):
24
25namespace U_ICU_NAMESPACE {
26class Collator;
27} // namespace U_ICU_NAMESPACE
28
29namespace v8 {
30namespace internal {
31
32#include "torque-generated/src/objects/js-collator-tq.inc"
33
34class JSCollator : public TorqueGeneratedJSCollator<JSCollator, JSObject> {
35 public:
36 // ecma402/#sec-initializecollator
38 Isolate* isolate, DirectHandle<Map> map, DirectHandle<Object> locales,
39 DirectHandle<Object> options, const char* service);
40
41 // ecma402/#sec-intl.collator.prototype.resolvedoptions
43 Isolate* isolate, DirectHandle<JSCollator> collator);
44
45 V8_EXPORT_PRIVATE static const std::set<std::string>& GetAvailableLocales();
46
48
50
52};
53
54} // namespace internal
55} // namespace v8
56
58
59#endif // V8_OBJECTS_JS_COLLATOR_H_
static V8_EXPORT_PRIVATE const std::set< std::string > & GetAvailableLocales()
V8_EXPORT_PRIVATE static V8_WARN_UNUSED_RESULT MaybeHandle< JSCollator > New(Isolate *isolate, DirectHandle< Map > map, DirectHandle< Object > locales, DirectHandle< Object > options, const char *service)
static DirectHandle< JSObject > ResolvedOptions(Isolate *isolate, DirectHandle< JSCollator > collator)
#define DECL_ACCESSORS(name,...)
#define DECL_PRINTER(Name)
#define TQ_OBJECT_CONSTRUCTORS(Type)
#define V8_EXPORT_PRIVATE
Definition macros.h:460
#define V8_WARN_UNUSED_RESULT
Definition v8config.h:671