qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 7e9c17: qapi: Tweak "command returns a nice t


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] 7e9c17: qapi: Tweak "command returns a nice type" check fo...
Date: Thu, 16 Jan 2020 06:00:14 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 7e9c1707e14e50d5447cc6c3d3b20a641331ad18
      
https://github.com/qemu/qemu/commit/7e9c1707e14e50d5447cc6c3d3b20a641331ad18
  Author: Markus Armbruster <address@hidden>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi: Tweak "command returns a nice type" check for clarity

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 0cc0e2689498e2b731330980b1cecb83987b1bc8
      
https://github.com/qemu/qemu/commit/0cc0e2689498e2b731330980b1cecb83987b1bc8
  Author: Markus Armbruster <address@hidden>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M tests/Makefile.include

  Log Message:
  -----------
  tests/Makefile.include: Fix missing test-qapi-emit-events.[ch]

Commit 5d75648b56 "qapi: Generate QAPIEvent stuff into separate files"
added tests/test-qapi-emit-events.[ch] to the set of generated files,
but neglected to update tests/.gitignore and tests/Makefile.include.
Commit a0af8cee3c "tests/.gitignore: ignore test-qapi-emit-events.[ch]
for in-tree builds" fixed the former.  Now fix the latter.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 00ca24ff9e5fc3c6ae608226908e6864ad8193a8
      
https://github.com/qemu/qemu/commit/00ca24ff9e5fc3c6ae608226908e6864ad8193a8
  Author: Markus Armbruster <address@hidden>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M .gitignore
    M Makefile
    M docs/devel/qapi-code-gen.txt
    M monitor/misc.c
    M qapi/Makefile.objs
    M qga/Makefile.objs
    M qga/main.c
    M scripts/qapi/commands.py
    M tests/.gitignore
    M tests/Makefile.include
    M tests/test-qmp-cmds.c

  Log Message:
  -----------
  qapi: Generate command registration stuff into separate files

Having to include qapi-commands.h just for qmp_init_marshal() is
suboptimal.  Generate it into separate files.  This lets
monitor/misc.c, qga/main.c, and the generated qapi-commands-FOO.h
include less.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
[Typos in docs/devel/qapi-code-gen.txt fixed]
Reviewed-by: Eric Blake <address@hidden>


  Commit: a9f1dd7ee001b645b81ad67217b582e51a44d545
      
https://github.com/qemu/qemu/commit/a9f1dd7ee001b645b81ad67217b582e51a44d545
  Author: Markus Armbruster <address@hidden>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M scripts/qapi/schema.py

  Log Message:
  -----------
  qapi: Proper intermediate representation for modules

Modules are represented only by their names so far.  Introduce class
QAPISchemaModule.  So far, it merely wraps the name.  The next patch
will put it to more interesting use.

Once again, arrays spice up the patch a bit.  For any other type,
@info points to the definition, which lets us map from @info to
module.  For arrays, there is no definition, and @info points to the
first use instead.  We have to use the element type's module instead,
which is only available after .check().

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 3e7fb5811baab213dcc7149c3aa69442d683c26c
      
https://github.com/qemu/qemu/commit/3e7fb5811baab213dcc7149c3aa69442d683c26c
  Author: Markus Armbruster <address@hidden>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M scripts/qapi/schema.py
    M tests/qapi-schema/empty.out
    M tests/qapi-schema/include-repetition.out
    M tests/qapi-schema/qapi-schema-test.out

  Log Message:
  -----------
  qapi: Fix code generation for empty modules

When a sub-module doesn't contain any definitions, we don't generate
code for it, but we do generate the #include.

We generate code only for modules that get visited.
QAPISchema.visit() visits only modules that have definitions.  It can
visit modules multiple times.

Clean this up as follows.  Collect entities in their QAPISchemaModule.
Have QAPISchema.visit() call QAPISchemaModule.visit() for each module.
Have QAPISchemaModule.visit() call .visit_module() for itself, and
QAPISchemaEntity.visit() for each of its entities.  This way, we visit
each module exactly once.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 3bef3aaec91815b75a78a4c12ca92ac3cec53faf
      
https://github.com/qemu/qemu/commit/3bef3aaec91815b75a78a4c12ca92ac3cec53faf
  Author: Markus Armbruster <address@hidden>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M scripts/qapi/commands.py
    M scripts/qapi/events.py
    M scripts/qapi/gen.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py

  Log Message:
  -----------
  qapi: Simplify QAPISchemaModularCVisitor

Since the previous commit, QAPISchemaVisitor.visit_module() is called
just once.  Simplify QAPISchemaModularCVisitor accordingly.

Signed-off-by: Markus Armbruster <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: e021e6fe5294939f286021b3f870666ccb979aa2
      
https://github.com/qemu/qemu/commit/e021e6fe5294939f286021b3f870666ccb979aa2
  Author: Peter Maydell <address@hidden>
  Date:   2020-01-14 (Tue, 14 Jan 2020)

  Changed paths:
    M .gitignore
    M Makefile
    M docs/devel/qapi-code-gen.txt
    M monitor/misc.c
    M qapi/Makefile.objs
    M qga/Makefile.objs
    M qga/main.c
    M scripts/qapi/commands.py
    M scripts/qapi/events.py
    M scripts/qapi/gen.py
    M scripts/qapi/schema.py
    M scripts/qapi/types.py
    M scripts/qapi/visit.py
    M tests/.gitignore
    M tests/Makefile.include
    M tests/qapi-schema/empty.out
    M tests/qapi-schema/include-repetition.out
    M tests/qapi-schema/qapi-schema-test.out
    M tests/test-qmp-cmds.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2020-01-14' into 
staging

QAPI patches for 2020-01-14

# gpg: Signature made Tue 14 Jan 2020 10:15:22 GMT
# gpg:                using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653
# gpg:                issuer "address@hidden"
# gpg: Good signature from "Markus Armbruster <address@hidden>" [full]
# gpg:                 aka "Markus Armbruster <address@hidden>" [full]
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-qapi-2020-01-14:
  qapi: Simplify QAPISchemaModularCVisitor
  qapi: Fix code generation for empty modules
  qapi: Proper intermediate representation for modules
  qapi: Generate command registration stuff into separate files
  tests/Makefile.include: Fix missing test-qapi-emit-events.[ch]
  qapi: Tweak "command returns a nice type" check for clarity

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/3a63b24a1bbf...e021e6fe5294



reply via email to

[Prev in Thread] Current Thread [Next in Thread]