mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code (gh-95860)
We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime. We'll solve that part of interpreter isolation separately. This change includes generated code. The non-generated changes are in: * Tools/clinic/clinic.py * Python/getargs.c * Include/cpython/modsupport.h * Makefile.pre.in (re-generate global strings after running clinic) * very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c All other changes are generated code (clinic, global strings).
This commit is contained in:
parent
bdb2cf8e91
commit
6f6a4e6cc5
127 changed files with 16242 additions and 621 deletions
|
@ -215,6 +215,7 @@ struct _Py_global_strings {
|
|||
STRUCT_FOR_ID(_blksize)
|
||||
STRUCT_FOR_ID(_bootstrap)
|
||||
STRUCT_FOR_ID(_dealloc_warn)
|
||||
STRUCT_FOR_ID(_feature_version)
|
||||
STRUCT_FOR_ID(_finalizing)
|
||||
STRUCT_FOR_ID(_find_and_load)
|
||||
STRUCT_FOR_ID(_fix_up_module)
|
||||
|
@ -229,93 +230,302 @@ struct _Py_global_strings {
|
|||
STRUCT_FOR_ID(_uninitialized_submodules)
|
||||
STRUCT_FOR_ID(_warn_unawaited_coroutine)
|
||||
STRUCT_FOR_ID(_xoptions)
|
||||
STRUCT_FOR_ID(a)
|
||||
STRUCT_FOR_ID(abs_tol)
|
||||
STRUCT_FOR_ID(access)
|
||||
STRUCT_FOR_ID(add)
|
||||
STRUCT_FOR_ID(after_in_child)
|
||||
STRUCT_FOR_ID(after_in_parent)
|
||||
STRUCT_FOR_ID(aggregate_class)
|
||||
STRUCT_FOR_ID(append)
|
||||
STRUCT_FOR_ID(argdefs)
|
||||
STRUCT_FOR_ID(arguments)
|
||||
STRUCT_FOR_ID(argv)
|
||||
STRUCT_FOR_ID(attribute)
|
||||
STRUCT_FOR_ID(authorizer_callback)
|
||||
STRUCT_FOR_ID(b)
|
||||
STRUCT_FOR_ID(backtick)
|
||||
STRUCT_FOR_ID(base)
|
||||
STRUCT_FOR_ID(before)
|
||||
STRUCT_FOR_ID(big)
|
||||
STRUCT_FOR_ID(binary_form)
|
||||
STRUCT_FOR_ID(block)
|
||||
STRUCT_FOR_ID(buffer)
|
||||
STRUCT_FOR_ID(buffer_callback)
|
||||
STRUCT_FOR_ID(buffer_size)
|
||||
STRUCT_FOR_ID(buffering)
|
||||
STRUCT_FOR_ID(buffers)
|
||||
STRUCT_FOR_ID(bufsize)
|
||||
STRUCT_FOR_ID(builtins)
|
||||
STRUCT_FOR_ID(byteorder)
|
||||
STRUCT_FOR_ID(bytes)
|
||||
STRUCT_FOR_ID(bytes_per_sep)
|
||||
STRUCT_FOR_ID(c_call)
|
||||
STRUCT_FOR_ID(c_exception)
|
||||
STRUCT_FOR_ID(c_return)
|
||||
STRUCT_FOR_ID(cached_statements)
|
||||
STRUCT_FOR_ID(cadata)
|
||||
STRUCT_FOR_ID(cafile)
|
||||
STRUCT_FOR_ID(call)
|
||||
STRUCT_FOR_ID(capath)
|
||||
STRUCT_FOR_ID(category)
|
||||
STRUCT_FOR_ID(cb_type)
|
||||
STRUCT_FOR_ID(certfile)
|
||||
STRUCT_FOR_ID(check_same_thread)
|
||||
STRUCT_FOR_ID(clear)
|
||||
STRUCT_FOR_ID(close)
|
||||
STRUCT_FOR_ID(closed)
|
||||
STRUCT_FOR_ID(closefd)
|
||||
STRUCT_FOR_ID(closure)
|
||||
STRUCT_FOR_ID(co_argcount)
|
||||
STRUCT_FOR_ID(co_cellvars)
|
||||
STRUCT_FOR_ID(co_code)
|
||||
STRUCT_FOR_ID(co_consts)
|
||||
STRUCT_FOR_ID(co_exceptiontable)
|
||||
STRUCT_FOR_ID(co_filename)
|
||||
STRUCT_FOR_ID(co_firstlineno)
|
||||
STRUCT_FOR_ID(co_flags)
|
||||
STRUCT_FOR_ID(co_freevars)
|
||||
STRUCT_FOR_ID(co_kwonlyargcount)
|
||||
STRUCT_FOR_ID(co_linetable)
|
||||
STRUCT_FOR_ID(co_name)
|
||||
STRUCT_FOR_ID(co_names)
|
||||
STRUCT_FOR_ID(co_nlocals)
|
||||
STRUCT_FOR_ID(co_posonlyargcount)
|
||||
STRUCT_FOR_ID(co_qualname)
|
||||
STRUCT_FOR_ID(co_stacksize)
|
||||
STRUCT_FOR_ID(co_varnames)
|
||||
STRUCT_FOR_ID(code)
|
||||
STRUCT_FOR_ID(command)
|
||||
STRUCT_FOR_ID(comment_factory)
|
||||
STRUCT_FOR_ID(context)
|
||||
STRUCT_FOR_ID(cookie)
|
||||
STRUCT_FOR_ID(copy)
|
||||
STRUCT_FOR_ID(copyreg)
|
||||
STRUCT_FOR_ID(coro)
|
||||
STRUCT_FOR_ID(count)
|
||||
STRUCT_FOR_ID(cwd)
|
||||
STRUCT_FOR_ID(data)
|
||||
STRUCT_FOR_ID(database)
|
||||
STRUCT_FOR_ID(decode)
|
||||
STRUCT_FOR_ID(decoder)
|
||||
STRUCT_FOR_ID(default)
|
||||
STRUCT_FOR_ID(defaultaction)
|
||||
STRUCT_FOR_ID(delete)
|
||||
STRUCT_FOR_ID(depth)
|
||||
STRUCT_FOR_ID(detect_types)
|
||||
STRUCT_FOR_ID(deterministic)
|
||||
STRUCT_FOR_ID(device)
|
||||
STRUCT_FOR_ID(dict)
|
||||
STRUCT_FOR_ID(dictcomp)
|
||||
STRUCT_FOR_ID(difference_update)
|
||||
STRUCT_FOR_ID(digest)
|
||||
STRUCT_FOR_ID(digest_size)
|
||||
STRUCT_FOR_ID(digestmod)
|
||||
STRUCT_FOR_ID(dir_fd)
|
||||
STRUCT_FOR_ID(dispatch_table)
|
||||
STRUCT_FOR_ID(displayhook)
|
||||
STRUCT_FOR_ID(dklen)
|
||||
STRUCT_FOR_ID(doc)
|
||||
STRUCT_FOR_ID(dont_inherit)
|
||||
STRUCT_FOR_ID(dst)
|
||||
STRUCT_FOR_ID(dst_dir_fd)
|
||||
STRUCT_FOR_ID(duration)
|
||||
STRUCT_FOR_ID(effective_ids)
|
||||
STRUCT_FOR_ID(element_factory)
|
||||
STRUCT_FOR_ID(encode)
|
||||
STRUCT_FOR_ID(encoding)
|
||||
STRUCT_FOR_ID(end)
|
||||
STRUCT_FOR_ID(end_lineno)
|
||||
STRUCT_FOR_ID(end_offset)
|
||||
STRUCT_FOR_ID(endpos)
|
||||
STRUCT_FOR_ID(env)
|
||||
STRUCT_FOR_ID(errors)
|
||||
STRUCT_FOR_ID(event)
|
||||
STRUCT_FOR_ID(eventmask)
|
||||
STRUCT_FOR_ID(exc_type)
|
||||
STRUCT_FOR_ID(exc_value)
|
||||
STRUCT_FOR_ID(excepthook)
|
||||
STRUCT_FOR_ID(exception)
|
||||
STRUCT_FOR_ID(exp)
|
||||
STRUCT_FOR_ID(extend)
|
||||
STRUCT_FOR_ID(factory)
|
||||
STRUCT_FOR_ID(family)
|
||||
STRUCT_FOR_ID(fanout)
|
||||
STRUCT_FOR_ID(fd)
|
||||
STRUCT_FOR_ID(fd2)
|
||||
STRUCT_FOR_ID(fdel)
|
||||
STRUCT_FOR_ID(fget)
|
||||
STRUCT_FOR_ID(file)
|
||||
STRUCT_FOR_ID(file_actions)
|
||||
STRUCT_FOR_ID(filename)
|
||||
STRUCT_FOR_ID(fileno)
|
||||
STRUCT_FOR_ID(filepath)
|
||||
STRUCT_FOR_ID(fillvalue)
|
||||
STRUCT_FOR_ID(filters)
|
||||
STRUCT_FOR_ID(final)
|
||||
STRUCT_FOR_ID(find_class)
|
||||
STRUCT_FOR_ID(fix_imports)
|
||||
STRUCT_FOR_ID(flags)
|
||||
STRUCT_FOR_ID(flush)
|
||||
STRUCT_FOR_ID(follow_symlinks)
|
||||
STRUCT_FOR_ID(format)
|
||||
STRUCT_FOR_ID(frequency)
|
||||
STRUCT_FOR_ID(fromlist)
|
||||
STRUCT_FOR_ID(fset)
|
||||
STRUCT_FOR_ID(func)
|
||||
STRUCT_FOR_ID(generation)
|
||||
STRUCT_FOR_ID(genexpr)
|
||||
STRUCT_FOR_ID(get)
|
||||
STRUCT_FOR_ID(get_source)
|
||||
STRUCT_FOR_ID(getattr)
|
||||
STRUCT_FOR_ID(getstate)
|
||||
STRUCT_FOR_ID(gid)
|
||||
STRUCT_FOR_ID(globals)
|
||||
STRUCT_FOR_ID(groupindex)
|
||||
STRUCT_FOR_ID(groups)
|
||||
STRUCT_FOR_ID(handle)
|
||||
STRUCT_FOR_ID(hash_name)
|
||||
STRUCT_FOR_ID(header)
|
||||
STRUCT_FOR_ID(headers)
|
||||
STRUCT_FOR_ID(hi)
|
||||
STRUCT_FOR_ID(hook)
|
||||
STRUCT_FOR_ID(id)
|
||||
STRUCT_FOR_ID(ignore)
|
||||
STRUCT_FOR_ID(imag)
|
||||
STRUCT_FOR_ID(importlib)
|
||||
STRUCT_FOR_ID(in_fd)
|
||||
STRUCT_FOR_ID(incoming)
|
||||
STRUCT_FOR_ID(indexgroup)
|
||||
STRUCT_FOR_ID(inf)
|
||||
STRUCT_FOR_ID(inheritable)
|
||||
STRUCT_FOR_ID(initial)
|
||||
STRUCT_FOR_ID(initial_bytes)
|
||||
STRUCT_FOR_ID(initial_value)
|
||||
STRUCT_FOR_ID(initval)
|
||||
STRUCT_FOR_ID(inner_size)
|
||||
STRUCT_FOR_ID(input)
|
||||
STRUCT_FOR_ID(insert_comments)
|
||||
STRUCT_FOR_ID(insert_pis)
|
||||
STRUCT_FOR_ID(intern)
|
||||
STRUCT_FOR_ID(intersection)
|
||||
STRUCT_FOR_ID(isatty)
|
||||
STRUCT_FOR_ID(isinstance)
|
||||
STRUCT_FOR_ID(isolation_level)
|
||||
STRUCT_FOR_ID(istext)
|
||||
STRUCT_FOR_ID(item)
|
||||
STRUCT_FOR_ID(items)
|
||||
STRUCT_FOR_ID(iter)
|
||||
STRUCT_FOR_ID(iterable)
|
||||
STRUCT_FOR_ID(iterations)
|
||||
STRUCT_FOR_ID(join)
|
||||
STRUCT_FOR_ID(jump)
|
||||
STRUCT_FOR_ID(keepends)
|
||||
STRUCT_FOR_ID(key)
|
||||
STRUCT_FOR_ID(keyfile)
|
||||
STRUCT_FOR_ID(keys)
|
||||
STRUCT_FOR_ID(kind)
|
||||
STRUCT_FOR_ID(lambda)
|
||||
STRUCT_FOR_ID(last)
|
||||
STRUCT_FOR_ID(last_node)
|
||||
STRUCT_FOR_ID(last_traceback)
|
||||
STRUCT_FOR_ID(last_type)
|
||||
STRUCT_FOR_ID(last_value)
|
||||
STRUCT_FOR_ID(latin1)
|
||||
STRUCT_FOR_ID(leaf_size)
|
||||
STRUCT_FOR_ID(len)
|
||||
STRUCT_FOR_ID(length)
|
||||
STRUCT_FOR_ID(level)
|
||||
STRUCT_FOR_ID(limit)
|
||||
STRUCT_FOR_ID(line)
|
||||
STRUCT_FOR_ID(line_buffering)
|
||||
STRUCT_FOR_ID(lineno)
|
||||
STRUCT_FOR_ID(listcomp)
|
||||
STRUCT_FOR_ID(little)
|
||||
STRUCT_FOR_ID(lo)
|
||||
STRUCT_FOR_ID(locale)
|
||||
STRUCT_FOR_ID(locals)
|
||||
STRUCT_FOR_ID(loop)
|
||||
STRUCT_FOR_ID(mapping)
|
||||
STRUCT_FOR_ID(match)
|
||||
STRUCT_FOR_ID(max_length)
|
||||
STRUCT_FOR_ID(maxevents)
|
||||
STRUCT_FOR_ID(maxmem)
|
||||
STRUCT_FOR_ID(maxsplit)
|
||||
STRUCT_FOR_ID(maxvalue)
|
||||
STRUCT_FOR_ID(memLevel)
|
||||
STRUCT_FOR_ID(memlimit)
|
||||
STRUCT_FOR_ID(message)
|
||||
STRUCT_FOR_ID(metaclass)
|
||||
STRUCT_FOR_ID(method)
|
||||
STRUCT_FOR_ID(mod)
|
||||
STRUCT_FOR_ID(mode)
|
||||
STRUCT_FOR_ID(module)
|
||||
STRUCT_FOR_ID(module_globals)
|
||||
STRUCT_FOR_ID(modules)
|
||||
STRUCT_FOR_ID(mro)
|
||||
STRUCT_FOR_ID(msg)
|
||||
STRUCT_FOR_ID(n)
|
||||
STRUCT_FOR_ID(n_arg)
|
||||
STRUCT_FOR_ID(n_fields)
|
||||
STRUCT_FOR_ID(n_sequence_fields)
|
||||
STRUCT_FOR_ID(n_unnamed_fields)
|
||||
STRUCT_FOR_ID(name)
|
||||
STRUCT_FOR_ID(namespace_separator)
|
||||
STRUCT_FOR_ID(namespaces)
|
||||
STRUCT_FOR_ID(narg)
|
||||
STRUCT_FOR_ID(ndigits)
|
||||
STRUCT_FOR_ID(new_limit)
|
||||
STRUCT_FOR_ID(newline)
|
||||
STRUCT_FOR_ID(newlines)
|
||||
STRUCT_FOR_ID(next)
|
||||
STRUCT_FOR_ID(node_depth)
|
||||
STRUCT_FOR_ID(node_offset)
|
||||
STRUCT_FOR_ID(ns)
|
||||
STRUCT_FOR_ID(number)
|
||||
STRUCT_FOR_ID(obj)
|
||||
STRUCT_FOR_ID(object)
|
||||
STRUCT_FOR_ID(offset)
|
||||
STRUCT_FOR_ID(offset_dst)
|
||||
STRUCT_FOR_ID(offset_src)
|
||||
STRUCT_FOR_ID(on_type_read)
|
||||
STRUCT_FOR_ID(onceregistry)
|
||||
STRUCT_FOR_ID(oparg)
|
||||
STRUCT_FOR_ID(opcode)
|
||||
STRUCT_FOR_ID(open)
|
||||
STRUCT_FOR_ID(opener)
|
||||
STRUCT_FOR_ID(operation)
|
||||
STRUCT_FOR_ID(optimize)
|
||||
STRUCT_FOR_ID(options)
|
||||
STRUCT_FOR_ID(order)
|
||||
STRUCT_FOR_ID(out_fd)
|
||||
STRUCT_FOR_ID(outgoing)
|
||||
STRUCT_FOR_ID(overlapped)
|
||||
STRUCT_FOR_ID(owner)
|
||||
STRUCT_FOR_ID(p)
|
||||
STRUCT_FOR_ID(pages)
|
||||
STRUCT_FOR_ID(parent)
|
||||
STRUCT_FOR_ID(password)
|
||||
STRUCT_FOR_ID(path)
|
||||
STRUCT_FOR_ID(pattern)
|
||||
STRUCT_FOR_ID(peek)
|
||||
STRUCT_FOR_ID(persistent_id)
|
||||
STRUCT_FOR_ID(persistent_load)
|
||||
STRUCT_FOR_ID(person)
|
||||
STRUCT_FOR_ID(pi_factory)
|
||||
STRUCT_FOR_ID(pid)
|
||||
STRUCT_FOR_ID(policy)
|
||||
STRUCT_FOR_ID(pos)
|
||||
STRUCT_FOR_ID(print_file_and_line)
|
||||
STRUCT_FOR_ID(priority)
|
||||
STRUCT_FOR_ID(progress)
|
||||
STRUCT_FOR_ID(progress_handler)
|
||||
STRUCT_FOR_ID(proto)
|
||||
STRUCT_FOR_ID(protocol)
|
||||
STRUCT_FOR_ID(ps1)
|
||||
STRUCT_FOR_ID(ps2)
|
||||
STRUCT_FOR_ID(quotetabs)
|
||||
STRUCT_FOR_ID(r)
|
||||
STRUCT_FOR_ID(raw)
|
||||
STRUCT_FOR_ID(read)
|
||||
STRUCT_FOR_ID(read1)
|
||||
|
@ -324,36 +534,115 @@ struct _Py_global_strings {
|
|||
STRUCT_FOR_ID(readinto)
|
||||
STRUCT_FOR_ID(readinto1)
|
||||
STRUCT_FOR_ID(readline)
|
||||
STRUCT_FOR_ID(readonly)
|
||||
STRUCT_FOR_ID(real)
|
||||
STRUCT_FOR_ID(reducer_override)
|
||||
STRUCT_FOR_ID(registry)
|
||||
STRUCT_FOR_ID(rel_tol)
|
||||
STRUCT_FOR_ID(reload)
|
||||
STRUCT_FOR_ID(repl)
|
||||
STRUCT_FOR_ID(replace)
|
||||
STRUCT_FOR_ID(reserved)
|
||||
STRUCT_FOR_ID(reset)
|
||||
STRUCT_FOR_ID(resetids)
|
||||
STRUCT_FOR_ID(return)
|
||||
STRUCT_FOR_ID(reverse)
|
||||
STRUCT_FOR_ID(reversed)
|
||||
STRUCT_FOR_ID(s)
|
||||
STRUCT_FOR_ID(salt)
|
||||
STRUCT_FOR_ID(sched_priority)
|
||||
STRUCT_FOR_ID(scheduler)
|
||||
STRUCT_FOR_ID(seek)
|
||||
STRUCT_FOR_ID(seekable)
|
||||
STRUCT_FOR_ID(selectors)
|
||||
STRUCT_FOR_ID(send)
|
||||
STRUCT_FOR_ID(sep)
|
||||
STRUCT_FOR_ID(sequence)
|
||||
STRUCT_FOR_ID(server_hostname)
|
||||
STRUCT_FOR_ID(server_side)
|
||||
STRUCT_FOR_ID(session)
|
||||
STRUCT_FOR_ID(setcomp)
|
||||
STRUCT_FOR_ID(setpgroup)
|
||||
STRUCT_FOR_ID(setsid)
|
||||
STRUCT_FOR_ID(setsigdef)
|
||||
STRUCT_FOR_ID(setsigmask)
|
||||
STRUCT_FOR_ID(setstate)
|
||||
STRUCT_FOR_ID(shape)
|
||||
STRUCT_FOR_ID(show_cmd)
|
||||
STRUCT_FOR_ID(signed)
|
||||
STRUCT_FOR_ID(size)
|
||||
STRUCT_FOR_ID(sizehint)
|
||||
STRUCT_FOR_ID(sleep)
|
||||
STRUCT_FOR_ID(sock)
|
||||
STRUCT_FOR_ID(sort)
|
||||
STRUCT_FOR_ID(sound)
|
||||
STRUCT_FOR_ID(source)
|
||||
STRUCT_FOR_ID(src)
|
||||
STRUCT_FOR_ID(src_dir_fd)
|
||||
STRUCT_FOR_ID(stacklevel)
|
||||
STRUCT_FOR_ID(start)
|
||||
STRUCT_FOR_ID(statement)
|
||||
STRUCT_FOR_ID(status)
|
||||
STRUCT_FOR_ID(stderr)
|
||||
STRUCT_FOR_ID(stdin)
|
||||
STRUCT_FOR_ID(stdout)
|
||||
STRUCT_FOR_ID(step)
|
||||
STRUCT_FOR_ID(store_name)
|
||||
STRUCT_FOR_ID(strategy)
|
||||
STRUCT_FOR_ID(strict)
|
||||
STRUCT_FOR_ID(strict_mode)
|
||||
STRUCT_FOR_ID(string)
|
||||
STRUCT_FOR_ID(sub_key)
|
||||
STRUCT_FOR_ID(symmetric_difference_update)
|
||||
STRUCT_FOR_ID(tabsize)
|
||||
STRUCT_FOR_ID(tag)
|
||||
STRUCT_FOR_ID(target)
|
||||
STRUCT_FOR_ID(target_is_directory)
|
||||
STRUCT_FOR_ID(task)
|
||||
STRUCT_FOR_ID(tb_frame)
|
||||
STRUCT_FOR_ID(tb_lasti)
|
||||
STRUCT_FOR_ID(tb_lineno)
|
||||
STRUCT_FOR_ID(tb_next)
|
||||
STRUCT_FOR_ID(tell)
|
||||
STRUCT_FOR_ID(template)
|
||||
STRUCT_FOR_ID(term)
|
||||
STRUCT_FOR_ID(text)
|
||||
STRUCT_FOR_ID(threading)
|
||||
STRUCT_FOR_ID(throw)
|
||||
STRUCT_FOR_ID(timeout)
|
||||
STRUCT_FOR_ID(times)
|
||||
STRUCT_FOR_ID(top)
|
||||
STRUCT_FOR_ID(trace_callback)
|
||||
STRUCT_FOR_ID(traceback)
|
||||
STRUCT_FOR_ID(trailers)
|
||||
STRUCT_FOR_ID(translate)
|
||||
STRUCT_FOR_ID(truncate)
|
||||
STRUCT_FOR_ID(twice)
|
||||
STRUCT_FOR_ID(txt)
|
||||
STRUCT_FOR_ID(type)
|
||||
STRUCT_FOR_ID(tz)
|
||||
STRUCT_FOR_ID(uid)
|
||||
STRUCT_FOR_ID(unlink)
|
||||
STRUCT_FOR_ID(unraisablehook)
|
||||
STRUCT_FOR_ID(uri)
|
||||
STRUCT_FOR_ID(usedforsecurity)
|
||||
STRUCT_FOR_ID(value)
|
||||
STRUCT_FOR_ID(values)
|
||||
STRUCT_FOR_ID(version)
|
||||
STRUCT_FOR_ID(warnings)
|
||||
STRUCT_FOR_ID(warnoptions)
|
||||
STRUCT_FOR_ID(wbits)
|
||||
STRUCT_FOR_ID(week)
|
||||
STRUCT_FOR_ID(weekday)
|
||||
STRUCT_FOR_ID(which)
|
||||
STRUCT_FOR_ID(who)
|
||||
STRUCT_FOR_ID(withdata)
|
||||
STRUCT_FOR_ID(writable)
|
||||
STRUCT_FOR_ID(write)
|
||||
STRUCT_FOR_ID(write_through)
|
||||
STRUCT_FOR_ID(x)
|
||||
STRUCT_FOR_ID(year)
|
||||
STRUCT_FOR_ID(zdict)
|
||||
} identifiers;
|
||||
struct {
|
||||
PyASCIIObject _ascii;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue