1. 17 12月, 2015 6 次提交
    • M
      qapi: Simplify QAPISchemaObjectTypeMember.check() · e564e2dd
      Markus Armbruster 提交于
      QAPISchemaObjectTypeMember.check() currently does four things:
      
      1. Compute self.type
      
      2. Accumulate members in all_members
      
         Only one caller cares: QAPISchemaObjectType.check() uses it to
         compute self.members.  The other callers pass a throw-away
         accumulator.
      
      3. Accumulate a map from names to members in seen
      
         Only one caller cares: QAPISchemaObjectType.check() uses it to
         compute its local variable seen, for self.variants.check(), which
         uses it to compute self.variants.tag_member from
         self.variants.tag_name.  The other callers pass a throw-away
         accumulator.
      
      4. Check for collisions
      
         This piggybacks on 3: before adding a new entry, we assert it's new.
      
         Only one caller cares: QAPISchemaObjectType.check() uses it to
         assert non-variant members don't clash.
      
      Simplify QAPISchemaObjectType.check(): move 2.-4. to
      QAPISchemaObjectType.check(), and drop parameters all_members and
      seen.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1446559499-26984-2-git-send-email-armbru@redhat.com>
      [rebase to earlier changes that moved tag_member.check() of
      alternate types, commit message typo fix]
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-6-git-send-email-eblake@redhat.com>
      e564e2dd
    • M
      qapi: Drop obsolete tag value collision assertions · fff5f231
      Markus Armbruster 提交于
      Union tag values can't clash with member names in generated C anymore
      since commit e4ba22b3, but QAPISchemaObjectTypeVariants.check() still
      asserts they don't.  Drop it.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1446559499-26984-1-git-send-email-armbru@redhat.com>
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-5-git-send-email-eblake@redhat.com>
      fff5f231
    • E
      qapi-types: Simplify gen_struct_field[s] · 7d9586f9
      Eric Blake 提交于
      Simplify gen_struct_fields() back to a single iteration over a
      list of fields (like it was prior to commit f87ab7f9), by moving
      the generated comments to gen_object().  Then, inline
      gen_struct_field() into its only caller.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-4-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      7d9586f9
    • E
      qapi-types: Consolidate gen_struct() and gen_union() · 570cd8d1
      Eric Blake 提交于
      These two methods are now close enough that we can finally merge
      them, relying on the fact that simple unions now provide a
      reasonable local_members.  Change gen_struct() to gen_object()
      that handles all forms of QAPISchemaObjectType, and rename and
      shrink gen_union() to gen_variants() to handle the portion of
      gen_object() needed when variants are present.
      
      gen_struct_fields() now has a single caller, so it no longer
      needs an optional parameter; however, I did not choose to inline
      it into the caller.
      
      No difference to generated code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-3-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      570cd8d1
    • E
      qapi: Track simple union tag in object.local_members · da34a9bd
      Eric Blake 提交于
      We were previously creating all unions with an empty list for
      local_members.  However, it will make it easier to unify struct
      and union generation if we include the generated tag member in
      local_members.  That way, we can have a common code pattern:
      visit the base (if any), visit the local members (if any), visit
      the variants (if any).  The local_members of a flat union
      remains empty (because the discriminator is already visited as
      part of the base).  Then, by visiting tag_member.check() during
      AlternateType.check(), we no longer need to call it during
      Variants.check().
      
      The various front end entities now exist as follows:
      struct: optional base, optional local_members, no variants
      simple union: no base, one-element local_members, variants with tag_member
        from local_members
      flat union: base, no local_members, variants with tag_member from base
      alternate: no base, no local_members, variants
      
      With the new local members, we require a bit of finesse to
      avoid assertions in the clients.
      
      No change to generated code.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Message-Id: <1447836791-369-2-git-send-email-eblake@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      da34a9bd
    • P
      Update version for v2.5.0 release · a8c40fa2
      Peter Maydell 提交于
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a8c40fa2
  2. 12 12月, 2015 1 次提交
  3. 11 12月, 2015 2 次提交
  4. 10 12月, 2015 4 次提交
  5. 08 12月, 2015 4 次提交
  6. 07 12月, 2015 7 次提交
  7. 05 12月, 2015 3 次提交
  8. 04 12月, 2015 13 次提交