Paul J. Davis
3fb115039c
Replace build system with port_compiler
It appears that whatever previous prevented me from using the rebar3
port_compiler is no longer an issue. This change allows rebar2 and
rebar3 compilation by relying on port_compiler for rebar3 and
reverting to standard rebar2 otherwise.
3 anos atrás
Paul J. Davis
ec198b19c2
Use rebar3 for building and testing Jiffy directly
3 anos atrás
Paul J. Davis
60043d5604
Jiffy 1.0.9
3 anos atrás
Mojken
a6bc8ee730
Fix typo in README
5 anos atrás
Nick Vatamaniuc
73ba656378
Update enc to exclude linking with erl_interface.lib on Windows
2c92afb029
Compiled with the oldest supported OTP R15B03-1
3 anos atrás
Paul J. Davis
37039ba32e
Fix support for R16
4 anos atrás
Paul J. Davis
effc3c9a68
Jiffy 1.0.8
4 anos atrás
Paul J. Davis
3f478cf0c5
Remove unnecessary `maybe_map/1`
Thought slightly harder and realized this was unnecessary.
4 anos atrás
Paul J. Davis
a3c36d652c
Jiffy 1.0.7
4 anos atrás
Paul J. Davis
6c88f830fd
Fixes #206
4 anos atrás
Paul J. Davis
1388db4e64
Finally write down the package uplaod command
4 anos atrás
Paul J. Davis
046035068f
Jiffy 1.0.6
4 anos atrás
Paul J. Davis
f74b04fd11
Fix bug in bytes_per_red option
Turns out this was never implemented correctly since it was referring to
the original bytes_per_iter atom.
4 anos atrás
Paul J. Davis
6dadc0cd22
Jiffy 1.0.5
4 anos atrás
Paul J. Davis
685f14ef60
Silence compiler warnings for tests
4 anos atrás
Paul J. Davis
1df5ac5997
Update rebar/enc binaries to R15B03-1
The recent release of Erlang 23.0 removed support for loading beam
modules compiled under R14 and earlier. Thus we're now forced to abandon
support for R13 and R14.
4 anos atrás
Paul J. Davis
2f73ba9afd
1.0.4
5 anos atrás
Paul J. Davis
0ba322e421
Fix binary leak when encoding large strings
This bug was due to an interaction between two optimizations. If we
attempt to flush the buffer before any bytes are used we refused.
However, in enc_ensure we were not checking whether the buffer was
actually flushed so we would allocate a new buffer for the request.
The easiest way to encounter this issue was by encoding a raw binary
longer than 2041 bytes (i.e., `jiffy:encode(<<"stuff...">>).`).
5 anos atrás
Paul J. Davis
e60916fb15
Version 1.0.3
5 anos atrás
Joan Touzet
265be337f8
Force Windows to export inlined functions
5 anos atrás
Paul J. Davis
4c30454f8d
Only use -flto when supported
This adds a dynamic check to see if -flto is supported by the compiler.
Co-Authored-By: JianBo He <heeejianbo@gmail.com>
5 anos atrás
Paul J. Davis
fbf43f7231
Update Travis-CI Matrix
Apparently Travis-CI has dropped some of the older Erlang versions. I've
also added a run on 22.x
5 anos atrás
Paul J. Davis
ba09da7904
1.0.1
6 anos atrás
Paul J. Davis
4a3785eb70
Use from_array instead of positional versions
6 anos atrás
Paul J. Davis
591448da47
Fix backwards compatibility
6 anos atrás
Paul J. Davis
9ea3b106ca
Remove accidentally commited rebar state
6 anos atrás
Paul J. Davis
56b25bb6b7
Fix R14 support
6 anos atrás
Paul J. Davis
dd831c4f2c
Fix support of VMs pre-17.x
6 anos atrás
Paul J. Davis
37b41dcdc5
Fix support for Erlang 17.x
6 anos atrás
Paul J. Davis
ea54777856
1.0.0
6 anos atrás
Paul J. Davis
bd687813e4
Update readme with the exception type change
6 anos atrás
Paul J. Davis
8813ee3eec
Upgrade to double-converson 3.1.4
6 anos atrás
Paul J. Davis
496d7f0ccd
Change errors for bignums to be more explicit
Co-Authored-By: Stephan Renatus <srenatus@chef.io>
6 anos atrás
John Högberg
48ff666091
Remove -fno-strict-aliasing
We don't do fishy things like type punning so it really isn't
necessary, and supplying it prevents certain optimizations.
6 anos atrás
John Högberg
a3b03d5aec
Get rid of separate unsigned/signed buffers
6 anos atrás
John Högberg
a1196ba754
Never expand the encode buffer; emit and restart
This greatly increases the performance of long string encodes as
we won't need to copy intermediate results over and over.
6 anos atrás
John Högberg
0a72ec40ba
Fix erroneous state check in the decoder
If the input contained a mismatched end-of-array/object, the stack
could become empty before a call to dec_curr, which would look
beyond the bounds of the stack. If the value at this invalid
position happened to be st_array, we would pop too much from the
stack and overwrite the data that came before it.
This commit fixes this by letting dec_pop return the previous
state or st_invalid if the stack is empty, letting us exit
gracefully if the state isn't what we expect it to be.
dec_pop_assert is identical to the old dec_pop, tearing down the
emulator on internal errors.
6 anos atrás
John Högberg
feaf10f2d5
Enable link-time optimization on *nix platforms
6 anos atrás
John Högberg
ac950d657b
Move all atom checks under enif_is_atom
6 anos atrás
John Högberg
6bc427e405
Use the result map for key dedupe
This is a wee bit more cache-friendly than using a std::set with
string keys.
6 anos atrás
John Högberg
58c49522da
Refactor trapping and trap more often during decode
6 anos atrás
John Högberg
706527d100
Skip erroneous UTF-8 validation for atoms
We requested atoms in latin1 and then handled them as utf-8,
erroring out on some valid atoms and performing pointless
validation on others.
6 anos atrás
John Högberg
182393ff6a
Use enif_is_identical for equality checks
6 anos atrás
John Högberg
596a61ebfc
Replace sprintf with a dedicated integer print routine
6 anos atrás
John Högberg
ae712b58c5
Skip redundant enif_is_empty_list checks during encode
enif_get_list_cell fails when the list is empty.
6 anos atrás
John Högberg
798e4a7dd2
Use realloc instead of doing it manually
6 anos atrás
John Högberg
e274565cf1
Walk through strings once when encoding
6 anos atrás
John Högberg
4ab9a68313
Use an array for the position stack rather than an Erlang list
6 anos atrás
John Högberg
4ad1eb3a6d
sizeof(char) == 1 by definition
6 anos atrás
Paul J. Davis
830688f523
0.15.2
7 anos atrás