Make string/vector field serialization order not depend on optimizer.

Multiple calls of e.g. CreateString inside a call to a CreateTable
could cause those strings to end up in different locations in the
wire format, since order or argument evaluation is undefined.

This is allowed by the FlatBuffer format, but it is not helpful,
especially when debugging the contents of binaries, or comparing
against a "golden" binary for tests etc.

Now making sure that all the CreateTableDirect calls first serialize
sub strings/vectors before calling CreateTable.

Also made similar changes to the serialization of "binary schemas".

Change-Id: I5747c4038b37a0d400aca2bc592bec751cf5c172
7 files changed
tree: 3574a6c6474316723d41ed650821ba94a8a3e3a2
  1. .appveyor/
  2. .github/
  3. .travis/
  4. android/
  5. CMake/
  6. conan/
  7. dart/
  8. docs/
  9. go/
  10. grpc/
  11. include/
  12. java/
  13. js/
  14. lobster/
  15. lua/
  16. net/
  17. php/
  18. python/
  19. reflection/
  20. rust/
  21. samples/
  22. src/
  23. tests/
  24. .clang-format
  25. .editorconfig
  26. .gitattributes
  27. .gitignore
  28. .travis.yml
  29. appveyor.yml
  30. BUILD
  31. CMakeLists.txt
  32. composer.json
  33. conanfile.py
  34. CONTRIBUTING.md
  35. LICENSE.txt
  36. package.json
  37. pom.xml
  38. readme.md
  39. WORKSPACE
readme.md

logo FlatBuffers

Join the chat at https://gitter.im/google/flatbuffers Build Status Build status

FlatBuffers is a cross platform serialization library architected for maximum memory efficiency. It allows you to directly access serialized data without parsing/unpacking it first, while still having great forwards/backwards compatibility.

Go to our landing page to browse our documentation.

Supported operating systems

  • Windows
  • MacOS X
  • Linux
  • Android
  • And any others with a recent C++ compiler.

Supported programming languages

  • C++
  • C#
  • C
  • Dart
  • Go
  • Java
  • JavaScript
  • Lobster
  • Lua
  • PHP
  • Python
  • Rust
  • TypeScript

and more in progress...

Contribution

To contribute to this project, see CONTRIBUTING.

Licensing

Flatbuffers is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.