[fidl] Directly index into union coding table fields

This changes coding tables:
- Remove the ordinal field
- Generate entries for reserved union fields

Walker/Union/LastSet/1/WallTime                                                                        faster            0.981-0.991    27.124 +/- 0.066 ns  26.749 +/- 0.072 ns
Walker/Union/LastSet/16/WallTime                                                                       faster            0.732-0.792    35.2 +/- 1.3 ns      26.784 +/- 0.063 ns
Walker/Union/LastSet/256/WallTime                                                                      faster            0.171-0.187    150.99 +/- 0.76 ns   27.0 +/- 1.1 ns
LLCPP/Encode/Union/LastSet/1/Steps.Encode/WallTime                                                     slower            1.003-1.048    142.4 +/- 1.6 ns     145.9 +/- 1.5 ns
LLCPP/Encode/Union/LastSet/16/Steps.Encode/WallTime                                                    faster            0.927-0.950    155.87 +/- 0.96 ns   146.32 +/- 0.92 ns
LLCPP/Encode/Union/LastSet/256/Steps.Encode/WallTime                                                   faster            0.414-0.428    350.7 +/- 2.6 ns     147.6 +/- 1.3 ns
LLCPP/Decode/Union/LastSet/1/Steps.Setup/WallTime                                                      faster            0.924-0.988    20.52 +/- 0.32 ns    19.60 +/- 0.35 ns
LLCPP/Decode/Union/LastSet/16/Steps.Decode/WallTime                                                    faster            0.874-0.920    81.4 +/- 1.5 ns      72.99 +/- 0.46 ns
LLCPP/Decode/Union/LastSet/256/Steps.Decode/WallTime                                                   faster            0.354-0.371    201.1 +/- 3.2 ns     72.86 +/- 0.54 ns

Total binary size decreases by 21k

Test: coded_types_generator_tests.cc, conformance tests, validating_tests.cc, etc

Change-Id: I216a4f18d2e207989fe34562e1d1e5c369177741
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/398855
Commit-Queue: Benjamin Prosnitz <bprosnitz@google.com>
Reviewed-by: Pascal Perez <pascallouis@google.com>
API-Review: Pascal Perez <pascallouis@google.com>
Testability-Review: Pascal Perez <pascallouis@google.com>
18 files changed
tree: 9533b1356232b032f0cc524874ffcf7944c8e9b5
  1. boards/
  2. build/
  3. bundles/
  4. cts/
  5. docs/
  6. examples/
  7. garnet/
  8. products/
  9. scripts/
  10. sdk/
  11. src/
  12. third_party/
  13. tools/
  14. zircon/
  15. .clang-format
  16. .clang-tidy
  17. .gitattributes
  18. .gitignore
  19. .gn
  20. .style.yapf
  21. AUTHORS
  22. BUILD.gn
  23. CODE_OF_CONDUCT.md
  24. CONTRIBUTING.md
  25. LICENSE
  26. OWNERS
  27. PATENTS
  28. README.md
  29. rustfmt.toml
README.md

Fuchsia

Pink + Purple == Fuchsia (a new operating system)

What is Fuchsia?

Fuchsia is a modular, capability-based operating system. Fuchsia runs on modern 64-bit Intel and ARM processors.

Fuchsia is an open source project with a code of conduct that we expect everyone who interacts with the project to respect.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.