Frank Benkstein [Thu, 11 Oct 2018 17:33:12 +0000 (19:33 +0200)]
better output on TestError (#4979)
Print a slightly better error message when a TestError fails.
Rikard Lundmark [Mon, 8 Oct 2018 22:29:22 +0000 (23:29 +0100)]
Add @javax.annotation.Generated to generated flatbuffer Java types (#4986)
* Add @javax.annotation.Generated to generated flatbuffer Java types.
* Updating test goldens.
Frank Benkstein [Mon, 8 Oct 2018 21:37:35 +0000 (23:37 +0200)]
don't crash when calling EnumNameXXX on sparse enum (#4982)
Make an out-of-bounds check for enum values before using them to index the
names array. For consistency with non-sparse enums an empty string is
returned.
Fixes #4821
Michael Edwards [Mon, 8 Oct 2018 21:29:29 +0000 (23:29 +0200)]
Fix expected type of enum values in reflection tables (#4944)
Fixes #4930
kostya-sh [Mon, 8 Oct 2018 21:25:37 +0000 (22:25 +0100)]
Use enum types in generated read/mutate methods for Go (#4978)
cor3ntin [Mon, 8 Oct 2018 19:52:01 +0000 (21:52 +0200)]
Add missing const on Reference::As<> (#4975)
Reference::As<> was needlessly mutable wich made them
less safe and harder to use
Stewart Miles [Mon, 8 Oct 2018 19:43:57 +0000 (12:43 -0700)]
Disable armeabi builds for Android and re-enable CI builds. (#4970)
armeabi support was removed from the Android NDK so we should no
longer build it. Since this fixes the Android build failures this
commit also re-enables Travis Android builds.
While re-enabling Android builds, some recent changes broke C++98
support so this fixes those issues as well which include:
- Conditionally compiling use of move constructors, operators and
std::move.
- Changing sample to use flatbuffers::unique_ptr rather than
std::unique_ptr.
Finally, added the special "default_ptr_type" value for the
"cpp_ptr_type" attribute. This expands to the value passed to
the "--cpp-ptr-type" argument of flatc.
Taj Morton [Thu, 4 Oct 2018 17:37:22 +0000 (10:37 -0700)]
In Javascript, generate bidirectional mappings for enums, between Name: Value and between Value: Name. (#4960)
Vladimir Glavnyy [Thu, 4 Oct 2018 16:27:37 +0000 (23:27 +0700)]
Fix recursion counter check. Add control to override depth of nested … (#4953)
* Fix recursion counter check. Add control to override depth of nested objects.
* Change if-condition to `>=`
Wouter van Oortmerssen [Wed, 3 Oct 2018 19:48:47 +0000 (12:48 -0700)]
Bumped version to 1.10.1 for all languages.
Change-Id: I9a6256d90ea800834a887afdcf888df412018933
Wouter van Oortmerssen [Wed, 3 Oct 2018 19:27:27 +0000 (12:27 -0700)]
Updated TestAll.sh with Rust.
Change-Id: I751f3bbd85eb1b521e1533c68f95442af0d18b8a
Jason Neufeld [Wed, 3 Oct 2018 19:09:30 +0000 (12:09 -0700)]
Adds __reset method to Struct and Table (#4966)
This allow recycling/pooling instances without leaking ByteBuffers, by
providing a mechanism to reset instance to newly constructed state.
Vladimir Glavnyy [Wed, 3 Oct 2018 19:04:14 +0000 (02:04 +0700)]
Assert tests on the first failure. (#4952)
* Assert tests on the first failure. Disable pop-up message box on assertion.
* Fix format and code style
* Move MSVC dependent code to ifdef
kostya-sh [Wed, 3 Oct 2018 18:19:40 +0000 (19:19 +0100)]
Use standard header for generated Go files (#4961)
As recommended by https://golang.org/pkg/cmd/go/internal/generate/:
To convey to humans and machine tools that code is generated,
generated source should have a line early in the file that
matches the following regular expression (in Go syntax):
^// Code generated .* DO NOT EDIT\.$
Taj Morton [Mon, 1 Oct 2018 23:27:54 +0000 (16:27 -0700)]
Allow tables that are entirely composed of native inlines to be copied. (#4958)
Sumant Tambe [Mon, 1 Oct 2018 22:59:04 +0000 (15:59 -0700)]
Turn on gRPC tests in travis build (#4955)
Download and build with a known grpc version
Vladimir Glavnyy [Mon, 1 Oct 2018 21:57:36 +0000 (04:57 +0700)]
Parser error message reports both the line number and the cursor position. (#4954)
Matt Mastracci [Sat, 29 Sep 2018 03:11:05 +0000 (21:11 -0600)]
Remove lifetime specifier on table getter methods (#4949)
With the old-style code, the test fails with a borrow-checker error:
```
#[inline]
pub fn name(&'a self) -> &'a str {
self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Monster::VT_NAME, None).unwrap()
}
```
```
error[E0597]: `e` does not live long enough
--> tests/integration_test.rs:273:57
|
273 | let enemy_of_my_enemy = monster.enemy().map(|e| e.name());
| ^ - `e` dropped here while still borrowed
| |
| borrowed value does not live long enough
274 | assert_eq!(enemy_of_my_enemy, Some("Fred"));
275 | }
| - borrowed value needs to live until here
```
kzvi [Fri, 28 Sep 2018 03:56:49 +0000 (20:56 -0700)]
loosen lifetimes in type signature of Table::get (#4925)
Shivendra Agarwal [Thu, 27 Sep 2018 19:34:27 +0000 (01:04 +0530)]
Add more apis to query vector types from a reference (#4823)
* Add more apis to query vector types from a reference
https://github.com/google/flatbuffers/issues/4818
* changing order of apis
* another reordering
* removed vector element type api as not needed as for now
Vladimir Glavnyy [Thu, 27 Sep 2018 19:31:43 +0000 (02:31 +0700)]
Add missed defined(clang) and fix the wrong placement of #pragma push/pop for MSVC compiler (#4946)
kzvi [Thu, 27 Sep 2018 04:11:25 +0000 (21:11 -0700)]
don't return Option from required table field accessors (#4926)
jean-airoldie [Wed, 26 Sep 2018 20:35:02 +0000 (16:35 -0400)]
rust: Fixed MakeCamelCase (#4932) (#4936)
* Fixed MakeCamelCase behavior when supplied Upper_Camel_Case,
snake_case and UPPERCASE strings.
* Modified the rust integration test to reflect changes.
Sumant Tambe [Mon, 24 Sep 2018 19:03:31 +0000 (12:03 -0700)]
Add FlatBufferBuilder move semantics tests to the main test suite (#4902)
* Add FlatBufferBuilder move semantics tests to main
Do not eagerly delete/reset allocators in release and release_raw functions
Update android, vs2010 build files
New tests for various types of FlatBufferBuilders and move semantics
* Improve test failure output with function names
Michael Edwards [Mon, 24 Sep 2018 16:29:49 +0000 (18:29 +0200)]
ToStringVisitor settings to allow pretty formatted JSON (#4933)
Thomas [Fri, 21 Sep 2018 23:53:59 +0000 (01:53 +0200)]
Add compare operator to code generated for c++ (#4940)
* Add operator== for c++ genated code
New "--gen-compare" option for flatc to generate compare operators. The operators are defined based on object based api types.
Inspired by issue #263.
* Improve compare operator for c++.
Thanks for the code review.
- Improve robustness against future schema extensions
- Code style
- Fix --rust generation in generate_code.sh
Wouter van Oortmerssen [Fri, 21 Sep 2018 17:42:00 +0000 (10:42 -0700)]
Updated readme.md
Change-Id: I9b0664a3bde44a4ee44ef0fd117d0e4bedc132d9
Wouter van Oortmerssen [Fri, 21 Sep 2018 16:41:11 +0000 (09:41 -0700)]
Changed JS/TS codegen to use stable non-compiler dependent hash.
Different implementations of std::hash kept littering commits with
namespace changes.
Change-Id: Ic2d4fdcd76f8fef9802bc1572eb74ae7427085e3
Wouter van Oortmerssen [Fri, 21 Sep 2018 16:40:04 +0000 (09:40 -0700)]
Added missing Dart codegen files.
Change-Id: Ic97f5b50fa191f967672c404f737d302462fc6ac
Christopher Cifra [Thu, 20 Sep 2018 22:07:03 +0000 (17:07 -0500)]
[C#] Fix compile issue when compiling with older versions of C# (#4938)
* C# support for directly reading and writting to memory other than byte[]. For example, ByteBuffer can be initialized with a custom allocator which uses shared memory / memory mapped files.
Public access to the backing buffer uses Span<T> instead of ArraySegment<T>.
Writing to the buffer now supports Span<T> in addition to T[].
To maintain backwards compatibility ENABLE_SPAN_T must be defined.
* Remove usage of expression bodied method so that ByteBuffer can be compiled with older version of C#.
Robert [Wed, 12 Sep 2018 18:44:51 +0000 (11:44 -0700)]
Add Rust to Appveyor config. (#4928)
Enrico Olivelli [Thu, 6 Sep 2018 18:08:08 +0000 (20:08 +0200)]
Add ByteBufferFactory#releaseByteBuffer (#4914)
This adds the ability to dispose unused buffers or to return them to an object pool
Robert [Thu, 6 Sep 2018 01:15:30 +0000 (18:15 -0700)]
rust: more builder lifetimes predicates (#4923)
Robert [Wed, 5 Sep 2018 04:53:39 +0000 (21:53 -0700)]
rust: more builder lifetimes logic (#4917)
Onur Karaman [Tue, 4 Sep 2018 21:30:31 +0000 (14:30 -0700)]
fix rust flatbuffers create_vector docs (#4913)
Manual vector creation begins with start_vector, not create_vector.
Robert [Tue, 4 Sep 2018 21:29:27 +0000 (14:29 -0700)]
rust generator: fix builder lifetime switch (#4912)
Robert [Tue, 4 Sep 2018 20:52:31 +0000 (13:52 -0700)]
rust generator: fix enum member comments (#4911)
Robert [Tue, 4 Sep 2018 06:38:41 +0000 (23:38 -0700)]
readme.md: add Rust as a supported language
Robert [Tue, 4 Sep 2018 02:42:25 +0000 (19:42 -0700)]
Update Cargo.toml for Crates.io package
Robert [Tue, 4 Sep 2018 02:33:38 +0000 (19:33 -0700)]
delete and ignore Cargo.lock files (#4906)
Chris Holcombe [Tue, 4 Sep 2018 02:09:38 +0000 (19:09 -0700)]
Fix extern crate in root namespace (#4905)
Imports the Rust FlatBuffers runtime crate even when not using a namespace in a schema.
Robert [Tue, 4 Sep 2018 01:01:31 +0000 (18:01 -0700)]
Rust: Add basic crate-level documentation
Robert [Tue, 4 Sep 2018 00:13:10 +0000 (17:13 -0700)]
Update Rust runtime crate version for publishing
Robert [Mon, 3 Sep 2018 00:05:50 +0000 (17:05 -0700)]
Port FlatBuffers to Rust (#4898)
This is a port of FlatBuffers to Rust. It provides code generation and a
runtime library derived from the C++ implementation. It utilizes the
Rust type system to provide safe and fast traversal of FlatBuffers data.
There are 188 tests, including many fuzz tests of roundtrips for various
serialization scenarios. Initial benchmarks indicate that the canonical
example payload can be written in ~700ns, and traversed in ~100ns.
Rustaceans may be interested in the Follow, Push, and SafeSliceAccess
traits. These traits lift traversals, reads, writes, and slice accesses
into the type system, providing abstraction with no runtime penalty.
Sumant Tambe [Thu, 30 Aug 2018 23:43:22 +0000 (16:43 -0700)]
Add move semantics to MessageBuilder, FlatBufferBuilder, SliceAllocator, and vector_downward (#4893)
Unit tests
Update flatbuffers + gRPC build instructions
Update CMakeLists.txt with cmake variables for grpc and protobuf install paths
Update tests for travis build
Gabriel Nützi [Fri, 24 Aug 2018 17:57:57 +0000 (19:57 +0200)]
DetachedBuffer cannot be rewrapped (#4885)
* Simple ReleaseRaw implemented
* [doc]
* clear_buffer and clear_allocator introduced
* auto
* typos
* rename because of -Werror=shadow
Christopher Cifra [Thu, 23 Aug 2018 17:05:31 +0000 (12:05 -0500)]
C# support for directly reading and writting to memory other than byte[]. For example, ByteBuffer can be initialized with a custom allocator which uses shared memory / memory mapped files. (#4886)
Public access to the backing buffer uses Span<T> instead of ArraySegment<T>.
Writing to the buffer now supports Span<T> in addition to T[].
To maintain backwards compatibility ENABLE_SPAN_T must be defined.
Derek Bailey [Thu, 23 Aug 2018 16:48:03 +0000 (09:48 -0700)]
Updated preprocessor check for template aliases. (#4888)
Derek Bailey [Mon, 20 Aug 2018 23:31:44 +0000 (16:31 -0700)]
Mono Fix for Unsafe Mode (#4887)
* Added preprocessor define for C++ if Template Aliases are supported by the compiler
* Revert "Revert "Performance Increase of Vector of Structures using .NET BlockCopy (#4830)""
This reverts commit
1f5eae5d6a135ff6811724f6c57f911d1f46bb15.
* Put<T> method was inside #if UNSAFE_BYTEBUFFER which caused compilation failure when building in unsafe mode
* Revert "Added preprocessor define for C++ if Template Aliases are supported by the compiler"
This reverts commit
a75af7352127c261baf0b6cca5cb823e13e78f11.
Wouter van Oortmerssen [Mon, 20 Aug 2018 19:08:21 +0000 (12:08 -0700)]
Revert "Performance Increase of Vector of Structures using .NET BlockCopy (#4830)"
This reverts commit
7b50004ec9a1b86db2b1b61a9906e52227f62b35.
Change-Id: I09d6869c16aa3c7fadc537fc9c76eaa3cf7ee7ea
Wouter van Oortmerssen [Mon, 20 Aug 2018 18:54:37 +0000 (11:54 -0700)]
Added missing dart/ts test changes.
Change-Id: I836091193485b890710f1df779d4d770f729a27a
Andy Martin [Thu, 16 Aug 2018 22:25:33 +0000 (23:25 +0100)]
Add C#/Java generator behaviour for 'private' attribute (#4882)
* Added 'private' attribute, supported when generating C# and Java
* Added use of 'private' attribute in monster_test
Uilian Ries [Thu, 16 Aug 2018 19:17:52 +0000 (16:17 -0300)]
Conan build packages on CI (#4590) (#4594)
* Build Conan package on Travis CI (#4590)
- Added multi package support on Linux, running on Travis CI
- Only upload when branch is a tag and named "vX.Y.Z"
- Replace Conan injection by Conan wrapper
- Removed os_build os_arch -- Conan 1.0.1 hotfix
Signed-off-by: Uilian Ries <uilianries@gmail.com>
* Build Conan package on OSX (#4590)
- Added jobs to build Flatbuffers on OSX running on Travis
Signed-off-by: Uilian Ries <uilianries@gmail.com>
* Build Conan package on Windows (#4590)
- Added support necessary to build Flatbuffers on Windows (conan)
- Added Appveyor jobs to build Conan package
- Only build Conan package when release (tag)
Signed-off-by: Uilian Ries <uilianries@gmail.com>
* Reduce Conan CI support to simple scripts (#4590)
- Removed msvc 10 x86_64 workaround
- Updated conan remote address
- Added Bincrafters' package tools
Signed-off-by: Uilian Ries <uilianries@gmail.com>
* Add fPIC option on Conan recipe (#4590)
- Add fPIC as optional. It works on Linux and OSX
- Update recipe metadata: author, homepage, license
- Checking for flatc and flathash on Conan package
Signed-off-by: Uilian Ries <uilianries@gmail.com>
* Build Conan package on CI (#4590)
- Add rule to run conan job only for tags
- Run Conan on Linux, OSX and Windows
- Update package tool to new interface
Signed-off-by: Uilian Ries <uilianries@gmail.com>
* Update Conan username (#4590)
- Use google as default username
Signed-off-by: Uilian Ries <uilianries@gmail.com>
* Update OSX version on CI (#4590)
- Use latest OSX 9.3 version to build Conan package
Signed-off-by: Uilian Ries <uilianries@gmail.com>
kulswanand [Mon, 13 Aug 2018 23:36:11 +0000 (05:06 +0530)]
Proposing use of C++ header files and functions (#4869)
* Proposing use of C++ header files and functions
Proposing use of C++ header files and functions instead of C header file and functions.
Here are few examples for comparison :
C C++
<cstdio> <iostream> & <fstream>
printf() cout
fopen() ifstream
etc ...
Please let me know if there are any comments.
* Updated diff based on review comments
iceboy [Mon, 13 Aug 2018 23:19:51 +0000 (16:19 -0700)]
Use string_view if _HAS_CXX17 is true (#4876)
Current version of VC2017 is not setting __cplusplus to correct value, instead they use _MSC_VER, _MSVC_LANG and _HAS_CXX17 macros.
Wouter van Oortmerssen [Mon, 13 Aug 2018 16:24:13 +0000 (09:24 -0700)]
Fixed use of uoffset_t in verifier could cause wrap around.
The verifier must be resilient against any corrupt data, so
now using size_t thru-out to ensure any 64-bit offsets can
be represented.
Also added verification of alignment.
Change-Id: I87a22aa6b045c2d83b69b47a47153f2e15ad7e06
Tested: on Linux, also with libfuzzer.
Matias Cudich [Fri, 10 Aug 2018 22:27:51 +0000 (15:27 -0700)]
Update JavaScript IDL generator to remove invalid Closure JSDoc comments (#4873)
* Update JavaScript IDL generator to remove invalid Closure JSDoc comments
* Revert erroneous changes
* A few more tweaks
* Updated generated code
iceboy [Fri, 10 Aug 2018 20:43:48 +0000 (13:43 -0700)]
Remove FLATBUFFERS_COPTS from bazel BUILD (#4872)
fixes #4868
cubeleo [Fri, 10 Aug 2018 20:41:32 +0000 (13:41 -0700)]
Correctly generate identifier for enums. (#4871)
This should allow the EnumName* function to work with enums generated
using the --scoped-enum flag.
Andrew Selle [Fri, 10 Aug 2018 17:55:54 +0000 (10:55 -0700)]
Clarify flatbuffer reflection struct sizes to be less error-prone. (#4870)
iceboy [Fri, 10 Aug 2018 15:21:17 +0000 (08:21 -0700)]
Add licenses to BUILD (#4867)
This allows to build flatbuffers from third_party directory.
Dan Field [Thu, 9 Aug 2018 16:50:54 +0000 (12:50 -0400)]
Ensure strings are null terminated when written from Dart (#4862)
* Update for Dart 2.x constants
* Fix strings, update test, add CHANGELOG for Dart
Wouter van Oortmerssen [Mon, 6 Aug 2018 23:51:28 +0000 (16:51 -0700)]
Temporarily disabled Android CI until fix.
Change-Id: I0c6758db7b4007e84b7ab8daaecd233711df8cab
Vladimir Glavnyy [Mon, 6 Aug 2018 21:59:29 +0000 (04:59 +0700)]
Attach header directory information to the "flatbuffers" library target (#4849)
* Attach header directory information to the "flatbuffers" library target, if the CMake version supports it.
* Cleanup and documentation update
Kamil Rojewski [Mon, 6 Aug 2018 19:45:35 +0000 (21:45 +0200)]
Publishing flatc with conan (#4852)
* 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
* TypeScript docs
* Missing imports of enums
* Missing TS links
* Enabled vector of unions for java, since it seems to work
* Added jitpack config
* Added obj to vector of unions getter
* Removed unneeded accessor
* Bumped jdk version in pom.xml
* Vector of unions support for c#
* Missing TypeScript doc processing
* Option to NOT force libc++ when building with clang
* Publishing flatc with conan
Charlie Harrison [Mon, 6 Aug 2018 19:08:49 +0000 (15:08 -0400)]
Remove using namespace std; (#4851)
Wouter van Oortmerssen [Mon, 6 Aug 2018 19:06:59 +0000 (12:06 -0700)]
Fixed VS2010 compile error.
Change-Id: Ibd970d30b51f77a2ac9c125e400c9f1b19a81cbc
aardappel [Tue, 24 Jul 2018 02:03:11 +0000 (19:03 -0700)]
FlatBuffers implementation for the Lobster programming language
Language, see: http://strlen.com/lobster/ and https://github.com/aardappel/lobster
shassani [Fri, 27 Jul 2018 19:45:12 +0000 (12:45 -0700)]
Adds multi-line to FLatBufferToString (#4847)
Adding multi-line option to FlatBufferToString method in minireflect to allow more readable output for larger flatbuffers.
Wouter van Oortmerssen [Fri, 27 Jul 2018 19:40:44 +0000 (12:40 -0700)]
Fixed FlatBufferBuilder::Required not checking vtable size.
As reported in: https://github.com/google/flatbuffers/issues/4846
Tested: on Linux.
Change-Id: Id5e82dc5a46a681119cfe5a15415d522aac0e1f2
cubeleo [Fri, 27 Jul 2018 15:32:19 +0000 (08:32 -0700)]
For sparse enums, use a switch statement to generate EnumNameXXX(). (#4845)
Robert [Thu, 26 Jul 2018 23:57:01 +0000 (16:57 -0700)]
Merge pull request #4843 from rw/2018-07--explicit-enumish-types
go: give enums their own scalar types
rw [Thu, 26 Jul 2018 23:40:56 +0000 (16:40 -0700)]
go: give enums their own scalar types
Paul Reimer [Thu, 26 Jul 2018 22:40:41 +0000 (15:40 -0700)]
Update FLATBUFFERS_HAS_STRING_VIEW __cplusplus checks to the versions provided by the standard feature test macros. (#4841)
Robert [Thu, 26 Jul 2018 22:35:45 +0000 (15:35 -0700)]
Merge pull request #4820 from nairb774/master
[Go] encode.go performance changes
Dan Field [Thu, 26 Jul 2018 21:21:23 +0000 (17:21 -0400)]
Update for Dart 2.x constants (#4842)
Derek Bailey [Thu, 26 Jul 2018 20:44:40 +0000 (13:44 -0700)]
Performance Increase of Vector of Structures using .NET BlockCopy (#4830)
* Added Get<vector_name>Array() method for accessing vectors of structures in C# using Buffer.Blockcopy().
* Added Get<vector_name>Array() method for accessing vectors of structures in C# using Buffer.Blockcopy().
Added Create<Name>VectorBlock() method to add a typed array using Buffer.BlockCopy() to speed up creation of vector of arrays
New Lua files for namespace test
* fixed c++ style issue
Wouter van Oortmerssen [Mon, 23 Jul 2018 23:36:21 +0000 (16:36 -0700)]
Fixed minalign in Lua being reset on StartObject
Change-Id: I9cd62b38c8dc526f069726a88baef63e4b0dae57
Robert [Mon, 23 Jul 2018 23:34:08 +0000 (16:34 -0700)]
go: do not clobber minalign when we create objects (#4834)
Robert [Mon, 23 Jul 2018 23:29:45 +0000 (16:29 -0700)]
python: do not clobber minalign when we create objects (#4833)
Evan Moran [Mon, 23 Jul 2018 23:28:49 +0000 (16:28 -0700)]
Add missing public header `minireflect.h` to bazel build (#4832)
Evan Moran [Mon, 23 Jul 2018 23:28:09 +0000 (16:28 -0700)]
Fixing bazel build's missing lua file (#4831)
shassani [Thu, 19 Jul 2018 23:00:31 +0000 (16:00 -0700)]
Adds ForceStringAlignment to flatbuffers. (#4828)
ForceStringAlignment is useful for memory aligning string fields in flatbuffers.
Shivendra Agarwal [Thu, 19 Jul 2018 21:59:06 +0000 (03:29 +0530)]
Restricting (typed=false, fixed=true) combination in flexbuffer CreateVector (#4825)
https://github.com/google/flatbuffers/issues/4815
Shivendra Agarwal [Thu, 19 Jul 2018 21:55:06 +0000 (03:25 +0530)]
Fixing an assert in flexbuffers CreateVector (#4824)
An assert was blocking the creation of typedvectors. It was wrongly checking for limited types even though vector was not of fixedTyped.
Kamil Rojewski [Thu, 19 Jul 2018 16:40:28 +0000 (18:40 +0200)]
Option to NOT force libc++ when building with clang (#4826)
* 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
* TypeScript docs
* Missing imports of enums
* Missing TS links
* Enabled vector of unions for java, since it seems to work
* Added jitpack config
* Added obj to vector of unions getter
* Removed unneeded accessor
* Bumped jdk version in pom.xml
* Vector of unions support for c#
* Missing TypeScript doc processing
* Option to NOT force libc++ when building with clang
Wouter van Oortmerssen [Mon, 16 Jul 2018 23:44:49 +0000 (16:44 -0700)]
Missing Lua generated files
Change-Id: Id668ade474805dd9c7e108a478db3551d6a62b48
Wouter van Oortmerssen [Mon, 16 Jul 2018 23:41:38 +0000 (16:41 -0700)]
Renamed Verifier methods
The name Verify was getting too overloaded, and confused
the VS compiler
Change-Id: I26423a4d513e4def2f4e41d7f278bb683fc12518
Wouter van Oortmerssen [Mon, 16 Jul 2018 23:39:33 +0000 (16:39 -0700)]
Dart generated code changes
Change-Id: I1110974a375acb9668552294632658d9d1779772
shassani [Mon, 16 Jul 2018 23:05:06 +0000 (16:05 -0700)]
flatbuffer force-empty option (#4822)
Wouter van Oortmerssen [Mon, 16 Jul 2018 22:51:01 +0000 (15:51 -0700)]
Updated fuzzer scripts
Point to new Chromium location
Also enable UBSan
Change-Id: I4ba182e3c6a967ad89090b776d05762fa9ae6e40
Wouter van Oortmerssen [Mon, 16 Jul 2018 22:49:53 +0000 (15:49 -0700)]
Fixed assert in ParseSingleValue (found by fuzzer)
Change-Id: I84674eaab75b2b455e918b04e3027920430678ac
Wouter van Oortmerssen [Thu, 12 Jul 2018 23:26:17 +0000 (16:26 -0700)]
C++ verifier now primarily uses offsets instead of pointers.
Fix for: https://bugs.chromium.org/p/chromium/issues/detail?id=834710
Before, the verifier would create pointers to objects, and then
verify they are inside the buffer. But since even constructing pointers
that are outside a valid allocation is Undefinied Behavior in C++, this
can trigger UBSAN (with -fsanitize=pointer-overflow).
Now instead the bounds checking is first performed using offsets
before pointers are even created.
Change-Id: If4d376e90df9847e543247e70a062671914dae1b
Tested: on Linux.
xgdgsc [Mon, 16 Jul 2018 19:56:14 +0000 (03:56 +0800)]
:memo: release mode in building doc (#4819)
Damien Pontifex [Mon, 16 Jul 2018 16:13:36 +0000 (00:13 +0800)]
Convert net/FlatBuffers project to be compatible with netstandard (#4811)
Brian Atkinson [Sun, 15 Jul 2018 23:38:56 +0000 (16:38 -0700)]
[Go] Force a single, early bounds check on read and write paths.
As an example, GetInt64 used to perform 8 bounds checks, one for each
slice access. By performing a bound check on the highest index, the
number of checks is reduced to one through bounds-check-elimination.
Brian Atkinson [Sun, 15 Jul 2018 23:38:55 +0000 (16:38 -0700)]
[Go] Unroll WriteUint64 and WriteInt64.
This enables both WriteUint64 and WriteInt64 to both be inlined as
well as implemented with a single assembly instruction. The current Go
compiler refuses to inline functions with for loops. The compiler is
also not smart enough to produce a single assembly instruction for the
for-loop.
Wouter van Oortmerssen [Fri, 6 Jul 2018 19:30:43 +0000 (12:30 -0700)]
Fixed Uint() method actually storing a signed int.
Also fixed two constructors missing explicit.
Change-Id: I147b2d2517bb660d92d4b0167992c115ed65dca7
Derek Bailey [Thu, 5 Jul 2018 22:55:57 +0000 (15:55 -0700)]
Lua (5.3) Language addition (#4804)
* starting Lua port of python implmention. Syncing commit
* Bulk of Lua module port from Python done. Not tested, only static analysis. Need to work on binary strings. Started work on flatc lua code generation
* Fixed all the basic errors to produced a binary output from the builder, don't know if it is generated correctly, but it contains data, so that must be good
* fixed binary set command that was extending the array improperly
* continued improvement
* Moved lua submodules down a directory so their names don't clash with potential other modules. Added compat module to provide Lua versioning logic
* Successful sample port from Python
* working on testing Lua code with formal tests
* continued to work on tests and fixes to code to make tests pass
* Added reading buffer test
* Changed binaryarray implmentation to use a temporary table for storing data, and then serialize it to a string when requested. This double the rate of building flatbuffers compared to the string approach.
* Didn't need encode module as it just added another layer of indirection that isn't need
* profiled reading buffers, optimizations to increase read performance of monster data to ~7 monster / millisecond
* Writing profiler improvments. Get about
~2 monsters/millisecond building rate
* removed Numpy generation from Lua (came from the Python port)
* math.pow is deprecated in Lua 5.3, so changed to ^ notation. Also added .bat script for starting Lua tests
* adding results of generate_code.bat
* simple edits for code review in PR.
* There was a buffer overflow in inserting the keywords into the unorder set for both the Lua and Python code gens. Changed insertion to use iterators.
* fixed spacing issue
* basic documenation/tutorial updates. Updated sample_binary.lua to reflect the tutorial better
* removed windows-specific build step in Lua tests
Vladimir Glavnyy [Thu, 5 Jul 2018 16:23:40 +0000 (23:23 +0700)]
Issue #4799 fixed. Generator for KeyCompareWithValue is extracted. (#4802)
* Issue #4799 fixed. Generator for KeyCompareWithValue is extracted.
* format fix