unicorn/qemu
Eric Blake f5c93aa7ab
qapi-visit: Less indirection in visit_type_Foo_fields()
We were passing 'Foo **obj' to the internal helper function, but
all uses within the helper were via reads of '*obj'. Refactor
things to pass one less level of indirection, by having the
callers dereference before calling.

For an example of the generated code change:

|-static void visit_type_BalloonInfo_fields(Visitor *v, BalloonInfo **obj, Error **errp)
|+static void visit_type_BalloonInfo_fields(Visitor *v, BalloonInfo *obj, Error **errp)
| {
| Error *err = NULL;
|
|- visit_type_int(v, "actual", &(*obj)->actual, &err);
|+ visit_type_int(v, "actual", &obj->actual, &err);
| error_propagate(errp, err);
| }
|
|@@ -261,7 +261,7 @@ void visit_type_BalloonInfo(Visitor *v,
| if (!*obj) {
| goto out_obj;
| }
|- visit_type_BalloonInfo_fields(v, obj, &err);
|+ visit_type_BalloonInfo_fields(v, *obj, &err);
| out_obj:

The refactoring will also make it easier to reuse the helpers in
a future patch when implicit structs are stored directly in the
parent struct rather than boxed through a pointer.

Backports commit 655519030b5d20967ae3afa1fe91ef5ad4406065 from qemu
2018-02-20 16:00:37 -05:00
..
crypto
default-configs
docs
fpu all: Clean up includes 2018-02-19 01:34:28 -05:00
hw
include qom: Correct object_property_get_int() description 2018-02-20 11:52:16 -05:00
qapi qmp: Don't abuse stack to track qmp-output root 2018-02-20 08:09:56 -05:00
qobject qapi: Convert QType into QAPI built-in enum type 2018-02-19 21:47:05 -05:00
qom cpu: Add callback to check architectural watchpoint match 2018-02-20 11:43:56 -05:00
scripts qapi-visit: Less indirection in visit_type_Foo_fields() 2018-02-20 16:00:37 -05:00
target-arm target-arm: Add PMUSERENR_EL0 register 2018-02-20 15:36:31 -05:00
target-i386 target-i386: Implement FSGSBASE 2018-02-20 14:45:58 -05:00
target-m68k
target-mips
target-sparc sparc: Clean up includes 2018-02-19 00:52:41 -05:00
tcg target-i386: Implement BNDMK 2018-02-20 14:02:31 -05:00
util error: New error_fatal 2018-02-20 08:22:27 -05:00
aarch64.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
aarch64eb.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
accel.c all: Clean up includes 2018-02-19 01:34:28 -05:00
arm.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
armeb.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
CODING_STYLE import 2015-08-21 15:04:50 +08:00
configure
COPYING
COPYING.LIB
cpu-exec-common.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
cpu-exec.c exec: Clean up includes 2018-02-19 00:49:55 -05:00
cpus.c
cputlb.c
exec.c
gen_all_header.sh
glib_compat.c
HACKING
header_gen.py target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
ioport.c all: Clean up includes 2018-02-19 01:34:28 -05:00
LICENSE
m68k.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
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 all: Clean up includes 2018-02-19 01:34:28 -05:00
memory.c qom: Swap 'name' next to visitor in ObjectPropertyAccessor 2018-02-19 23:14:37 -05:00
mips64.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
mips64el.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
mips.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
mipsel.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
powerpc.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
qapi-schema.json qapi: Lazy creation of array types 2018-02-19 18:55:35 -05:00
qemu-log.c all: Clean up includes 2018-02-19 01:34:28 -05:00
qemu-timer.c all: Clean up includes 2018-02-19 01:34:28 -05:00
rules.mak
softmmu_template.h exec.c: Pass MemTxAttrs to iotlb_to_region so it uses the right AS 2018-02-17 23:19:00 -05:00
sparc64.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
sparc.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00
tcg-runtime.c all: Clean up includes 2018-02-19 01:34:28 -05:00
translate-all.c all: Clean up includes 2018-02-19 01:34:28 -05:00
translate-all.h
translate-common.c
unicorn_common.h
VERSION
vl.c
vl.h
x86_64.h target-arm: Implement checking of fired watchpoint 2018-02-20 11:50:29 -05:00