mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 00:08:39 +09:00
Issue #2046 - Move various generated files from builtin/Intl* to builtin/intl/*, and add "Generated" to their names for clarity
This commit is contained in:
parent
5574b06ff5
commit
f8e3f81197
6 changed files with 23 additions and 23 deletions
|
|
@ -18,7 +18,7 @@
|
|||
#include "builtin/intl/ICUHeader.h"
|
||||
#include "builtin/intl/ScopedICUObject.h"
|
||||
#include "builtin/intl/SharedIntlData.h"
|
||||
#include "builtin/IntlTimeZoneData.h"
|
||||
#include "builtin/intl/TimeZoneDataGenerated.h"
|
||||
#include "vm/GlobalObject.h"
|
||||
#include "vm/Runtime.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
#include "builtin/intl/CommonFunctions.h"
|
||||
#include "builtin/intl/ICUHeader.h"
|
||||
#include "builtin/intl/ScopedICUObject.h"
|
||||
#include "builtin/IntlTimeZoneData.h"
|
||||
#include "builtin/intl/TimeZoneDataGenerated.h"
|
||||
#include "js/Utility.h"
|
||||
|
||||
using js::HashNumber;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
// Generated by make_intl_data.py. DO NOT EDIT.
|
||||
// tzdata version = 2022e
|
||||
|
||||
#ifndef builtin_IntlTimeZoneData_h
|
||||
#define builtin_IntlTimeZoneData_h
|
||||
#ifndef builtin_intl_TimeZoneDataGenerated_h
|
||||
#define builtin_intl_TimeZoneDataGenerated_h
|
||||
|
||||
namespace js {
|
||||
namespace timezone {
|
||||
|
|
@ -143,4 +143,4 @@ const char* const legacyICUTimeZones[] = {
|
|||
} // namespace timezone
|
||||
} // namespace js
|
||||
|
||||
#endif /* builtin_IntlTimeZoneData_h */
|
||||
#endif /* builtin_intl_TimeZoneDataGenerated_h */
|
||||
|
|
@ -12,8 +12,8 @@
|
|||
Target "langtags":
|
||||
This script extracts information about mappings between deprecated and
|
||||
current BCP 47 language tags from the IANA Language Subtag Registry and
|
||||
converts it to JavaScript object definitions in IntlData.js. The definitions
|
||||
are used in Intl.js.
|
||||
converts it to JavaScript object definitions in
|
||||
LangTagMappingsGenerated.js. The definitions are used in Intl.js.
|
||||
|
||||
The IANA Language Subtag Registry is imported from
|
||||
https://www.iana.org/assignments/language-subtag-registry
|
||||
|
|
@ -190,7 +190,7 @@ def writeLanguageTagData(intlData, fileDate, url, langTagMappings, langSubtagMap
|
|||
"Mappings from extlang subtags to preferred values", fileDate, url)
|
||||
|
||||
def updateLangTags(args):
|
||||
""" Update the IntlData.js file. """
|
||||
""" Update the LangTagMappingsGenerated.js file. """
|
||||
url = args.url
|
||||
out = args.out
|
||||
filename = args.file
|
||||
|
|
@ -685,8 +685,8 @@ def processTimeZones(tzdataDir, icuDir, icuTzDir, version, ignoreBackzone, ignor
|
|||
println(tzdataVersionComment.format(version))
|
||||
println(u"")
|
||||
|
||||
println(u"#ifndef builtin_IntlTimeZoneData_h")
|
||||
println(u"#define builtin_IntlTimeZoneData_h")
|
||||
println(u"#ifndef builtin_intl_TimeZoneDataGenerated_h")
|
||||
println(u"#define builtin_intl_TimeZoneDataGenerated_h")
|
||||
println(u"")
|
||||
|
||||
println(u"namespace js {")
|
||||
|
|
@ -727,7 +727,7 @@ def processTimeZones(tzdataDir, icuDir, icuTzDir, version, ignoreBackzone, ignor
|
|||
println(u"} // namespace timezone")
|
||||
println(u"} // namespace js")
|
||||
println(u"")
|
||||
println(u"#endif /* builtin_IntlTimeZoneData_h */")
|
||||
println(u"#endif /* builtin_intl_TimeZoneDataGenerated_h */")
|
||||
|
||||
def updateBackzoneLinks(tzdataDir, links):
|
||||
(backzoneZones, backzoneLinks) = readIANAFiles(tzdataDir, ["backzone"])
|
||||
|
|
@ -878,16 +878,9 @@ def generateTzDataTests(tzdataDir, version, ignoreBackzone, testDir):
|
|||
generateTzDataTestBackzone(tzdataDir, version, ignoreBackzone, testDir)
|
||||
generateTzDataTestBackzoneLinks(tzdataDir, version, ignoreBackzone, testDir)
|
||||
|
||||
def updateTzdata(args):
|
||||
def updateTzdata(topsrcdir, args):
|
||||
""" Update the time zone cpp file. """
|
||||
|
||||
# This script must reside in js/src/builtin to work correctly.
|
||||
(thisDir, thisFile) = os.path.split(os.path.abspath(sys.argv[0]))
|
||||
thisDir = os.path.normpath(thisDir)
|
||||
if "/".join(thisDir.split(os.sep)[-3:]) != "js/src/builtin":
|
||||
raise RuntimeError("%s must reside in js/src/builtin" % sys.argv[0])
|
||||
topsrcdir = "/".join(thisDir.split(os.sep)[:-3])
|
||||
|
||||
icuDir = os.path.join(topsrcdir, "intl/icu/source")
|
||||
if not os.path.isdir(icuDir):
|
||||
raise RuntimeError("not a directory: %s" % icuDir)
|
||||
|
|
@ -947,6 +940,13 @@ def updateTzdata(args):
|
|||
if __name__ == "__main__":
|
||||
import argparse
|
||||
|
||||
# This script must reside in js/src/builtin/intl to work correctly.
|
||||
(thisDir, thisFile) = os.path.split(os.path.abspath(sys.argv[0]))
|
||||
dirPaths = os.path.normpath(thisDir).split(os.sep)
|
||||
if "/".join(dirPaths[-4:]) != "js/src/builtin/intl":
|
||||
raise RuntimeError("%s must reside in js/src/builtin/intl" % sys.argv[0])
|
||||
topsrcdir = "/".join(dirPaths[:-4])
|
||||
|
||||
def EnsureHttps(v):
|
||||
if not v.startswith("https:"):
|
||||
raise argparse.ArgumentTypeError("URL protocol must be https: " % v)
|
||||
|
|
@ -963,7 +963,7 @@ if __name__ == "__main__":
|
|||
type=EnsureHttps,
|
||||
help="Download url for language-subtag-registry.txt (default: %(default)s)")
|
||||
parser_tags.add_argument("--out",
|
||||
default="IntlData.js",
|
||||
default="LangTagMappingsGenerated.js",
|
||||
help="Output file (default: %(default)s)")
|
||||
parser_tags.add_argument("file",
|
||||
nargs="?",
|
||||
|
|
@ -984,9 +984,9 @@ if __name__ == "__main__":
|
|||
"accurate time zone canonicalization reflecting the actual time "
|
||||
"zones as used by ICU.")
|
||||
parser_tz.add_argument("--out",
|
||||
default="IntlTimeZoneData.h",
|
||||
default="TimeZoneDataGenerated.h",
|
||||
help="Output file (default: %(default)s)")
|
||||
parser_tz.set_defaults(func=updateTzdata)
|
||||
parser_tz.set_defaults(func=partial(updateTzdata, topsrcdir))
|
||||
|
||||
args = parser.parse_args()
|
||||
args.func(args)
|
||||
|
|
@ -669,7 +669,7 @@ selfhosted.inputs = [
|
|||
'builtin/Function.js',
|
||||
'builtin/Generator.js',
|
||||
'builtin/Intl.js',
|
||||
'builtin/IntlData.js',
|
||||
'builtin/intl/LangTagMappingsGenerated.js',
|
||||
'builtin/Iterator.js',
|
||||
'builtin/Map.js',
|
||||
'builtin/Module.js',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue