1. 26 Feb, 2018 1 commit
    • Kamil Rojewski's avatar
      Not generating imports/ns prefixes with --gen-all (#4644) · 48d82325
      Kamil Rojewski authored
      * Eclipse ignore
      
      * TypeScript support
      
      * Prefixing enums
      
      * Test results
      
      * Merged JS and TS generators
      
      * Fixed AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Changed TS flag to options struct
      
      * Storing options by value
      
      * Removed unneeded const
      
      * Re-export support for unions
      
      * Uint support
      
      * Casting bools to numbers for mutation
      
      * TS shell tests
      
      * Reverted generates js test file to original version
      
      * Backing up js tests and properly generating test data
      
      * Not importing flatbuffers for TS test generation
      
      * Not overwriting generated js for tests
      
      * AppVeyor test fixes
      
      * Generating the most strict TS code possible
      
      * Not returning null when creating vectors
      
      * Not returning null from struct contructors
      
      * Vector of unions for ts/js
      
      * Sanity check for languages
      
      * Indentation fix + output test files
      
      * Vectors of unions for php
      
      * Fixes to union vector handling + tests
      
      * Fix for strictPropertyInitialization
      
      * Fix for new aligned operator new for gcc >= 7.1
      
      * Not generating imports/ns prefixes with --gen-all
      48d82325
  2. 23 Feb, 2018 2 commits
  3. 22 Feb, 2018 3 commits
    • Philip S Doctor's avatar
      When Java raises a CharacterCodingException, the catch block rethrows this… · b24c0b07
      Philip S Doctor authored
      When Java raises a CharacterCodingException, the catch block rethrows this exception as a java.lang.Error.  Per the docs https://docs.oracle.com/javase/8/docs/api/java/lang/Error.html an Error is a serious problem that applications should not attempt to catch such as ThreadDeath.  In this case, it is reasonable for a consumer to try to catch this error as it likely indicates a problem with the underlying data. (#4630)
      
      As Error does not inherit from Exception, a generic `catch(Exception ex)` will not catch this error.
      
      A simple change from `Error` to `Exception` is not sufficient as an `Exception` is checked by the compiler, so in order to keep this issue unchecked, I am proposing raising a `RuntimeException` which is not checked, but is still a subclass of `Exception`.
      
      The only possible breaking change would be if a consumer was explicitly catching `Error` already for this library.
      
      https://github.com/google/flatbuffers/issues/4629
      b24c0b07
    • Christian Helmich's avatar
      added support for parsing hash on vector elements (#4502) · 59e26017
      Christian Helmich authored
      * added support for parsing hash on vector elements
      
      reversed check for scalar to check for vector
      
      added C++ generation of cpp_type vectors
      
      removed ctor call for vector fields
      added condition !vector for cpp_type check
      
      added Pack() and UnPack() code generation for vector of hashes
      
      * schema change:
      added table Referrable and weak references towards it from Monster
      
      added single_weak_reference to Monster table
      changed order with vector_of_weak_references
      
      * re-generated monster schema dependent code
      
      added Referrable.cs to FlatBuffers.Test.csproj
      59e26017
    • desqaz's avatar
      Add new c++ helpers to ease usage of size prefixed FlatBuffers (#4626) · 132e6a82
      desqaz authored
      It was missing some helpers when we choose to use
      size prefixed FlatBuffers.
      
      * Add general helper : GetPrefixedSize
      * Add generated helpers :
       * GetSizePrefixedXXX
       * VerfifySizePrefixedXXXBuffer
       * FinishSizePrefixedXXXBuffer
      132e6a82
  4. 16 Feb, 2018 1 commit
  5. 15 Feb, 2018 2 commits
    • Alexander Gallego's avatar
      C++: mini_reflect: Add DefaultTypeTable (#4614) · 36f85648
      Alexander Gallego authored
      * mini_reflect: Add DefaultTypeTable
      
      Currently it's very easy to make a mistake when it comes to
      instantiating the TypeTable to print a buffer because it is not type
      safe.
      
      This will allow us to write safer cpp code:
      
      flatbuffers::FlatBufferToString(reinterpret_cast<const uint8_t *>(&t),
                                      decltype(t)::DefaultTypeTable());
      
      * c++: mini_reflect: update generated code
      
      * Ensure types and names are set for mini_reflect
      
      * c++: mini_refelct: update unit tests with new typed TypeTable
      
      * Adding PR feedback of sylte and naming convention
      36f85648
    • Dmitry Volosnykh's avatar
  6. 12 Feb, 2018 1 commit
    • Kamil Rojewski's avatar
      Fix for aligned new for gcc >= 7.1 (#4621) · 474ba68b
      Kamil Rojewski authored
      * Eclipse ignore
      
      * TypeScript support
      
      * Prefixing enums
      
      * Test results
      
      * Merged JS and TS generators
      
      * Fixed AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Fixed more AppVeyor build problems
      
      * Changed TS flag to options struct
      
      * Storing options by value
      
      * Removed unneeded const
      
      * Re-export support for unions
      
      * Uint support
      
      * Casting bools to numbers for mutation
      
      * TS shell tests
      
      * Reverted generates js test file to original version
      
      * Backing up js tests and properly generating test data
      
      * Not importing flatbuffers for TS test generation
      
      * Not overwriting generated js for tests
      
      * AppVeyor test fixes
      
      * Generating the most strict TS code possible
      
      * Not returning null when creating vectors
      
      * Not returning null from struct contructors
      
      * Vector of unions for ts/js
      
      * Sanity check for languages
      
      * Indentation fix + output test files
      
      * Vectors of unions for php
      
      * Fixes to union vector handling + tests
      
      * Fix for strictPropertyInitialization
      
      * Fix for new aligned operator new for gcc >= 7.1
      474ba68b
  7. 08 Feb, 2018 2 commits
  8. 05 Feb, 2018 2 commits
    • Sergey Avseyev's avatar
      Fix compiler errors in parser (#4612) · 6a1acdc2
      Sergey Avseyev authored
      src/idl_parser.cpp: In member function 'flatbuffers::CheckedError flatbuffers::Parser::ParseHexNum(int, uint64_t*)':
      src/idl_parser.cpp:220:62: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
           if (!isxdigit(static_cast<const unsigned char>(cursor_[i])))
                                                                    ^
      src/idl_parser.cpp: In member function 'flatbuffers::CheckedError flatbuffers::Parser::Next()':
      src/idl_parser.cpp:260:62: error: type qualifiers ignored on cast result type [-Werror=ignored-qualifiers]
               if(!isdigit(static_cast<const unsigned char>(*cursor_))) return NoError();
                                                                    ^
      cc1plus: all warnings being treated as errors
      6a1acdc2
    • Joe Schafer's avatar
      Add initial Bazel WORKSPACE and BUILD (#4608) · c6964225
      Joe Schafer authored
      For #4574.
      
      To test:
      
          bazel test --verbose_failures //:flatbuffers_test
      c6964225
  9. 29 Jan, 2018 1 commit
    • Wouter van Oortmerssen's avatar
      Cleaned up & fixed buffer alignment handling. · e93d2bda
      Wouter van Oortmerssen authored
      - Fixed ForceVectorAlignment (and possibly other call-sites) not
        setting minalign_.
      - Fixed flipped alignment parameters in CopyTable (reflection).
      - Made aligment for FlatBufferBuilder internal buffer configurable
        (useful when reading a constructed buffer directly).
      - Ensured Alignment rounding is always up.
      
      Change-Id: I33ca4887d92a09cb11a369c14a109f4b07ae707a
      Tested: on Linux.
      e93d2bda
  10. 22 Jan, 2018 4 commits
  11. 18 Jan, 2018 7 commits
  12. 16 Jan, 2018 1 commit
  13. 12 Jan, 2018 1 commit
  14. 11 Jan, 2018 1 commit
    • Wouter van Oortmerssen's avatar
      Reduced FlatBufferBuilder from 3 buffers to 1 · 79b80f84
      Wouter van Oortmerssen authored
      Previously, FlatBufferBuilder used 3 resizable buffers:
      - serialization (vector_downward)
      - field offsets (std::vector)
      - vtable offsets (std::vector)
      
      Since the serialization buffer grows downwards, the bottom part of
      it can be used as a "scratchpad" storage for the other two. Since
      field offsets are only accumulated during table construction, and
      vtable offsets only after table construction, the two can trivially
      share the same storage.
      
      Not only does this reduce the amount of allocation, it also removes
      the bulk of std::vector usage from FlatBufferBuilder which was
      the #1 cause of slow-down in debug mode, see e.g.:
      https://stackoverflow.com/questions/36085285/any-way-to-improve-flatbuffer-performance-in-debug-c-msvc
      
      Change-Id: I0224cf2f2a863d2d7ef762bc9163b52fdc149522
      Tested: on Linux.
      79b80f84
  15. 08 Jan, 2018 1 commit
  16. 05 Jan, 2018 1 commit
  17. 04 Jan, 2018 4 commits
  18. 28 Dec, 2017 4 commits
  19. 21 Dec, 2017 1 commit
    • Yuri Finkelstein's avatar
      fixed java codegen bug documented in #4563 (#4565) · a4dbe134
      Yuri Finkelstein authored
      * grpc bindings generator for Java and a few minor supporting changes in improvements
      
      * restored formatting before my previous changes for ease of review
      
      * Fixed grpc java code generation bug resulting in duplicate extractor declarations in case the same is used in more than a single RPC method
      
      * fixed previous merge issue
      
      * removed extra space
      
      * restored extra space
      
      * restored extra space
      
      * fixed java codegen bug documented in https://github.com/google/flatbuffers/issues/4563
      a4dbe134