Commit Graph
21 Commits
Author SHA1 Message Date
Ivan Dlugos a6eeeb3b9c Dart - inline small functions to increase performance (#6755)
~25 % for reading
~30-35 % for writing
2021-07-26 10:09:46 -07:00
Ivan Dlugos ac23482022 Dart - fixup writeString() return type after previous merges (#6753) 2021-07-26 09:54:13 -07:00
Ivan Dlugos c36672d803 Dart - optimize writeString for ASCII (#6736)
* Dart - optimize writeString for ASCII

* Dart - writeString() ASCII optimization optional
2021-07-22 10:36:37 -07:00
Ivan Dlugos 2bfc8e9f01 Dart - make writeString() argument non-nullable (#6737) 2021-07-20 07:54:48 -07:00
Ivan Dlugos 65700441d3 Dart - make vTable fixed size (expect the number of fields when creating) (#6735) 2021-07-19 11:27:01 -07:00
Ivan Dlugos dd5bb55cad Dart - make vTable deduplication optional (#6734) 2021-07-15 15:50:12 -07:00
Ivan Dlugos e8423da1b7 Dart - regenerate example after recent flatc changes (#6733) 2021-07-15 13:03:27 -07:00
Ivan Dlugos e73fab27d4 Dart - store empty vectors instead of NULL (#6728) 2021-07-09 12:44:40 -07:00
Ivan Dlugos 92ae532e43 Dart - finish/lowFinish/buffer changes (#6712)
* Dart - change Builder "lowFinish()" to "buffer" and "finish()" to not void return

Aligning the API with other languages, e.g. c++ and allowing custom use-cases to avoid creating a Uint8List

* Dart - change builder.buffer to check that finish() was already called

* Dart - builder - move !finished assertion to _prepare() which is run from all other functions
2021-07-09 11:45:45 -07:00
Ivan Dlugos 3f77dc9a0e Dart - unpack() must use eager list reader (#6723) 2021-07-09 09:55:34 -07:00
Ivan Dlugos 838c93b843 Dart - fix flex-builder compilation error (#6722)
* Dart - fix flex-builder compilation error

* DartTest.sh - run all tests
2021-07-09 09:53:27 -07:00
Ivan Dlugos 089f48a4a6 Dart - make sure added padding is zeroed, same as in C++ (#6716) 2021-07-09 09:06:40 -07:00
Ivan Dlugos 8ab35b2a5f Dart - add custom allocator support (#6711)
* Dart - add custom allocator support

* Dart - only copy written bytes during resize, not the whole old buffer.
2021-07-08 13:02:09 -07:00
Ivan Dlugos a6ee335574 Dart null safety (#6696)
* Dart null-safety - prepare migration annotations in library files

* Dart null-safety - apply migration

* Dart null-safety - update flatc to generate valid code

* Dart null-safety - fix flatc generated code and adjust tests

* Dart null-safety - update example and the generated code in the tests folder

* Dart null safety - minor review changes

* Dart - apply `dartfmt -w .`
2021-06-22 08:54:57 -07:00
Ivan Dlugos 4e3a66c141 Dart object API (#6682)
* dart test scripts - generate with `--gen-object-api`

* Dart object API, pack and unpack methods (WIP)

* Dart flatc - extract Builder code to separate functions to reuse it in Pack()

* Dart flatc - use builder field-building implementation in pack()

* Dart flatc - add pack() as an intance method of the "T" class

* Dart object API - make inner fields unpacked as well

* Dart object API - use pack() when collecting field offsets

* Dart object API - use packOnce() for fields that are structs or vectors of structs

* Dart object API - remove obsolete union support TODO

* Dart object API - minor review changes, test and fixes

* Dart object API - revert packOnce() - not supported by other object API implementations

* Dart object API - update docs

* update dart generated code in tests/ to fix CI failure on ./scripts/check-generated-code.sh

* Dart flatc - fix compilation for old MSVC and c++0x
2021-06-14 10:15:56 -07:00
Ivan Dlugos d959e23208 dart - change Builder.reset() to reuse an existing buffer (#6661) 2021-06-13 08:07:08 -07:00
Ivan Dlugos 337eb8b8f7 update docs - structs can't be roots (#6690) 2021-06-11 15:20:10 -07:00
Ivan Dlugos b4e67f9bf0 Dart test fix (#6660)
* Dart cppData test - fix path on Dart v2.12 (Linux)

* Dart cppData test - fix expected data mismatch

* add Dart CI test in GH Actions
2021-05-20 12:00:51 -07:00
Ivan Dlugos ad3a729f96 dart Builder - expose finished buffer size (#6403) 2021-01-21 16:06:11 -08:00
Ivan Dlugos 08d2ce844b fix Dart Builder._writeString() - always write trailing zero byte (#6390) 2021-01-07 11:40:47 -08:00
Ivan Dlugos a15a8d930d fix Dart Builder.reset() - clear vTables (#6386) 2021-01-07 11:28:33 -08:00