Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serialization #255

Open
wants to merge 105 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
de0938e
Added --read-write switch
GreyCat Mar 24, 2017
d24a36d
JavaMain: ensure that exceptions are really thrown, even on compile s…
GreyCat Mar 24, 2017
0b757b9
Started PoC seq writer support in JavaCompiler
GreyCat Mar 24, 2017
93b37a1
JavaCompiler: very basic bytes writing support
GreyCat Mar 24, 2017
75ec0c2
Allow simple serialization of FixedBytesType
GreyCat Mar 24, 2017
eed5d07
Translators: added strToBytes, implemented in Java translator
GreyCat Mar 24, 2017
5cf4edd
Added _i iteration number identifier
GreyCat Mar 24, 2017
4a3535f
JavaTranslator: added translation of `_i`
GreyCat Mar 24, 2017
568964d
ClassTypeProvider: use constants + added ITERATOR_I handling
GreyCat Mar 24, 2017
9e7bffa
Writing: added string handling, some repeat-expr handling, BytesEos h…
GreyCat Mar 24, 2017
8fd1002
Serialization: basic support for user types and BytesLimitType
GreyCat Mar 27, 2017
0d73de2
Merge branch 'master' into serialization
GreyCat Mar 27, 2017
ea06fec
Serialization: implemented unprocess and slightly better user type wr…
GreyCat Mar 27, 2017
9c1793e
AllocateIOLocalVar: Added allocation of fixed and growing IOs
GreyCat Mar 28, 2017
9f0e331
Serialization: implemented fixed-size preallocated IO buffers
GreyCat Mar 28, 2017
969401c
JavaCompiler: generate new Readable/Writable interface implements
GreyCat Mar 28, 2017
885469f
Serialization: more intricate process-on-top-of-user-type support
GreyCat Mar 28, 2017
0f3a2aa
JavaCompiler: implemented writing of repeat-eos
GreyCat Mar 29, 2017
e4a56f1
Serialization: implemented switch types support, reworked JavaCompile…
GreyCat Mar 29, 2017
44185e1
Added basic _check implementation, added checks for a proper number o…
GreyCat Mar 30, 2017
769dabc
Added String#to_b(encoding) and ByteArray#size methods + JavaTranslat…
GreyCat Mar 30, 2017
040b689
Added limited byte / string sizing checks
GreyCat Mar 30, 2017
28e8d06
Translators: added BytesType#first and #last, implemented for Java
GreyCat Mar 30, 2017
1b66897
GenericChecks: implemented tons of checks for BytesLimitType - bounda…
GreyCat Mar 30, 2017
7d2295f
Merge branch 'master' into serialization
GreyCat Apr 3, 2017
dd0880e
Merge branch 'master' into serialization
GreyCat Apr 4, 2017
d73ec6b
JavaCompiler: only use ReadOnly when _read is public, i.e. when debug…
GreyCat Apr 5, 2017
2081fb2
Merge branch 'master' into serialization
GreyCat Apr 7, 2017
7dee284
Merge branch 'master' into serialization
GreyCat Apr 27, 2017
75729f7
WIP
generalmimon Oct 27, 2019
6e6bdda
Merge branch 'master' into serialization
generalmimon Nov 3, 2019
9eb2ab5
Merge pull request #177 from generalmimon/serialization
GreyCat Nov 10, 2019
2e2e985
Stop generating empty constructor when autoRead
generalmimon Nov 16, 2019
e46cc95
Use common loop for all repetitions
generalmimon Nov 16, 2019
9d8f2d3
Merge pull request #182 from generalmimon/serialization-common-loop
GreyCat Dec 14, 2019
e4ad9aa
Revert "Stop generating empty constructor when autoRead"
generalmimon Dec 14, 2019
d8adcc5
Disable autoRead automatically in readWrite mode
generalmimon Feb 2, 2020
cfba0cc
Merge pull request #180 from generalmimon/serialization-autoread-empt…
GreyCat Feb 3, 2020
d26e37b
Extract changes from https://github.com/kaitai-io/kaitai_struct_compi…
generalmimon Sep 19, 2020
ead02a4
Merge tag '0.10' into serialization
generalmimon Aug 1, 2022
5c70d8f
Fix build errors after upgrading to the 0.10 codebase
generalmimon Aug 1, 2022
0867d51
Remove `FixedBytesType` as intended in the 0.9 `valid` design
generalmimon Aug 16, 2022
939cf98
Refactor EveryWriteIsExpression to use Ast.expr.InternalName
generalmimon Aug 28, 2022
83b1fa7
Delete unused attrFixedContentsParse (_io.ensure_fixed_contents())
generalmimon Sep 4, 2022
caea2b7
Fix writing of a field with `terminator` + `consume: false`
generalmimon Sep 4, 2022
c1d391a
Fix broken consistency check for repeated byte arrays
generalmimon Sep 5, 2022
43d044a
Java: fix bytesSubscript to give unsigned byte values (finally!)
generalmimon Sep 5, 2022
8404319
Drop `expr` argument of condIfFooter method
generalmimon Sep 8, 2022
2acf924
Java: include term if `include: true` && `terminator` == `pad-right`
generalmimon Sep 8, 2022
73b0347
Fix & add missing `terminator`/`pad-right` consistency checks
generalmimon Sep 10, 2022
d721d08
Reuse the byte array write method for strings
generalmimon Sep 11, 2022
50d6556
Add repeat-until last element check
generalmimon Sep 12, 2022
72ca925
Refactor access to the last array item in attrAssertUntilCond
generalmimon Sep 12, 2022
426a38d
Merge pull request #183 from generalmimon/serialization-repeat-until-…
generalmimon Sep 12, 2022
def6650
Extend repeat-until consistency check to all elements
generalmimon Sep 12, 2022
306bfb2
Add consistency check for *non-empty* `repeat: until` array
generalmimon Sep 12, 2022
849fc1c
Fix "Object cannot be converted to byte[]" errors in type switches
generalmimon Sep 13, 2022
74d553c
Fix locale-sensitive String#toUpperCase call in writeHeader
generalmimon Sep 14, 2022
604359d
Java: finally solve boxed numeric type casting issues consistently
generalmimon Sep 15, 2022
f8bb577
Add _invalidate*() for value and set*() for parse instances
generalmimon Sep 17, 2022
16374cc
Add _write*() and _check*() for parse instances
generalmimon Sep 17, 2022
070391c
Set write flags of parse instances at the beginning of `_write`
generalmimon Oct 28, 2022
9897818
_write(): use special loops for each repetition type again
generalmimon Oct 28, 2022
69e4a12
Java: make {_read,_write}{BE,LE}() `private` even if autoRead is off
generalmimon Oct 28, 2022
2710191
Fix instance write flags (previous attempt led to infinite recursion)
generalmimon Oct 28, 2022
7dce0c3
Rename _write{,LE,BE}() methods to _write_Seq{,LE,BE}()
generalmimon Oct 28, 2022
826b242
Rename {writeExprAsExpr=>itemExpr}(), move to EveryReadIsExpression
generalmimon Oct 29, 2022
ca012b6
Add _fetchInstances() method to recursively fetch parse instances
generalmimon Oct 29, 2022
3b08efe
Write substreams to parent only after all fields have been written
generalmimon Nov 26, 2022
544cad0
Add set{Inst}_ToWrite() setter to select what instances to write
generalmimon Nov 26, 2022
11da92f
Add support for writing substreams with `process` and/or `terminator`
generalmimon Dec 23, 2022
175c278
Fix handling `size-eos: true` with `terminator`/`pad-right`
generalmimon Dec 23, 2022
b5c2e92
Java: call writeBitsInt{Be,Le}(), disable calls to alignToByte()
generalmimon Dec 28, 2022
bda1842
Move consistency checks from _check() to _write() if needed
generalmimon Dec 31, 2022
a5dd1f9
Add a _write() check on EOF after a `size-eos: true` field
generalmimon Dec 31, 2022
ecb5757
Add a _write() check on EOF states of `repeat: eos`
generalmimon Dec 31, 2022
37f432b
Generate byte array checks for substreams in _write()
generalmimon Dec 31, 2022
4fdf21d
Add write support for `eos-error: false`
generalmimon Jan 1, 2023
a8e4c03
Convert Identifier to id in ConsistencyError using `humanReadable`
generalmimon Jan 1, 2023
08ac809
Remove unused `isRaw` parameter in `itemExpr` method
generalmimon Jan 1, 2023
cf26f3e
Generate checks for SwitchType as well
generalmimon Jan 1, 2023
37da6dd
Add checks for user `params`, set `io`/`io[]` params in _write()
generalmimon Jan 1, 2023
2accf38
Add checks for `_root` and `_parent` built-in parameters
generalmimon Jan 2, 2023
5afa962
Add `valid` checks as in _read() to _check()/_write()
generalmimon Jan 2, 2023
793f58b
Add necessary fixes after testing on https://github.com/kaitai-io/kai…
generalmimon Jan 3, 2023
533aaa8
Going forward, starting 0.11-SNAPSHOT
GreyCat Aug 1, 2022
52812f9
Fix superfluous footer in Lua, Perl, PHP, Python and Ruby
generalmimon Feb 14, 2023
203613b
Delete unused method attrWriteStreamToStream
generalmimon Feb 15, 2023
d1f16dd
Port serialization support to Python
generalmimon Feb 26, 2023
d986731
Fix Python 2 compatibility when creating a fixed stream
generalmimon Feb 26, 2023
fca43d9
Python: disable calls to alignToByte()
generalmimon Mar 6, 2023
e776c98
Python: use `self` as default `_root` only in top-level types
generalmimon Mar 7, 2023
00c831f
Add "implies --no-auto-read" to --read-write CLI option description
generalmimon Jul 27, 2023
f1dc857
Add "Java and Python only" to --read-write CLI option description
generalmimon Jul 27, 2023
952c89c
Merge branch 'master' into serialization
generalmimon Jul 31, 2023
9142a1b
Improve setting `zeroCopySubstream` to false in `readWrite` mode
generalmimon Aug 1, 2023
2eca3de
Bring back init of instance flags in non-`readWrite` mode (C++, C#)
generalmimon Aug 1, 2023
a477800
PythonCompiler: fix "{alignToByte => align_to_byte}()" in comment
generalmimon Aug 5, 2023
8b258e2
Remove alignToByte() insertion logic when writing
generalmimon Aug 5, 2023
cb0c1eb
Endianness.fromString(): revert incorrect `case {None => _}` change
generalmimon Aug 7, 2023
0179199
Stop using `_io` when throwing validation errors from _check()
generalmimon Sep 24, 2023
31f1359
Merge branch 'master' into serialization
generalmimon Oct 12, 2023
7d830fa
Fix Java 7 compat: add `final` in allocateIOFixed()
generalmimon Oct 13, 2023
dea74e1
Merge branch 'master' into serialization
generalmimon Oct 21, 2023
4066d1e
Merge branch 'master' into serialization
generalmimon Jan 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into serialization
GreyCat committed Apr 3, 2017
commit 7d2295f8e2df3f5d0f6463b952f8f507053d1afd

This merge commit was added into this branch cleanly.

There are no new changes to show, but you can still view the diff.