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_INTL_SUPPORT 6 #error Internationalization is expected to be enabled. 7 #endif // V8_INTL_SUPPORT 8 9 #ifndef V8_OBJECTS_JS_LOCALE_INL_H_ 10 #define V8_OBJECTS_JS_LOCALE_INL_H_ 11 12 #include "src/api-inl.h" 13 #include "src/objects-inl.h" 14 #include "src/objects/js-locale.h" 15 16 // Has to be the last include (doesn't have include guards): 17 #include "src/objects/object-macros.h" 18 19 namespace v8 { 20 namespace internal { 21 22 // Base locale accessors. 23 ACCESSORS(JSLocale, language, Object, kLanguageOffset); 24 ACCESSORS(JSLocale, script, Object, kScriptOffset); 25 ACCESSORS(JSLocale, region, Object, kRegionOffset); 26 ACCESSORS(JSLocale, base_name, Object, kBaseNameOffset); 27 ACCESSORS(JSLocale, locale, String, kLocaleOffset); 28 29 // Unicode extension accessors. 30 ACCESSORS(JSLocale, calendar, Object, kCalendarOffset); 31 ACCESSORS(JSLocale, case_first, Object, kCaseFirstOffset); 32 ACCESSORS(JSLocale, collation, Object, kCollationOffset); 33 ACCESSORS(JSLocale, hour_cycle, Object, kHourCycleOffset); 34 ACCESSORS(JSLocale, numeric, Object, kNumericOffset); 35 ACCESSORS(JSLocale, numbering_system, Object, kNumberingSystemOffset); 36 37 CAST_ACCESSOR(JSLocale); 38 39 } // namespace internal 40 } // namespace v8 41 42 #include "src/objects/object-macros-undef.h" 43 44 #endif // V8_OBJECTS_JS_LOCALE_INL_H_ 45