unicorn/qemu
Eric Blake 2e1e2c4d51
qapi: Track enum values by QAPISchemaMember, not string
Rather than using just an array of strings, make enum.values be
an array of the new QAPISchemaMember type, and add a helper
member_names() method to get back at the original list of names.
Likewise, creating an enum requires wrapping strings, via a new
QAPISchema._make_enum_members() method. The benefit of wrapping
enum members in a QAPISchemaMember Python object is that we now
share the existing code for C name clash detection (although the
code is not yet active until a later commit removes the earlier
ad hoc parser checks).

In a related change, the QAPISchemaMember._pretty_owner() method
needs to learn about one more implicit type name: the generated
enum associated with a simple union.

In the interest of keeping the changes of this patch local to one
file, the visitor interface still passes just a list of names
rather than the full list of QAPISchemaMember instances. We may
want to revisit this in the future, if the consistency with
visit_object_type() is worth it.

Backports commit 93bda4dd461358b4fc05dfd8e2d6419cdd574789 from qemu
2018-02-19 22:07:17 -05:00
..
crypto
default-configs
docs
fpu
hw
include qapi: Shorter visits of optional fields 2018-02-19 22:03:23 -05:00
qapi qapi: Shorter visits of optional fields 2018-02-19 22:03:23 -05:00
qobject qapi: Convert QType into QAPI built-in enum type 2018-02-19 21:47:05 -05:00
qom qapi: Consistent generated code: prefer visitor 'v' 2018-02-19 18:21:53 -05:00
scripts qapi: Track enum values by QAPISchemaMember, not string 2018-02-19 22:07:17 -05:00
target-arm
target-i386
target-m68k
target-mips
target-sparc
tcg
util
aarch64.h
aarch64eb.h
accel.c
arm.h
armeb.h
CODING_STYLE
configure
COPYING
COPYING.LIB
cpu-exec-common.c
cpu-exec.c
cpus.c
cputlb.c
exec.c
gen_all_header.sh
glib_compat.c
HACKING
header_gen.py
ioport.c
LICENSE
m68k.h
Makefile qapi: Turn generators' mandatory option -i into an argument 2018-02-19 15:22:27 -05:00
Makefile.objs
Makefile.target
memory_mapping.c
memory.c
mips64.h
mips64el.h
mips.h
mipsel.h
powerpc.h
qapi-schema.json qapi: Lazy creation of array types 2018-02-19 18:55:35 -05:00
qemu-log.c
qemu-timer.c
rules.mak
softmmu_template.h
sparc64.h
sparc.h
tcg-runtime.c
translate-all.c
translate-all.h
translate-common.c
unicorn_common.h
VERSION
vl.c
vl.h
x86_64.h