Calvin Rose
a87015598c
Make janet_equals and janet_compare non recursive
...
This makes these operatios use constant stack space rather
than linear stackspace given the size of the inputs. This is important
to prevent certain parser input from causing a stack overflow - in
general, we try to avoid unbounded recursion.
2020-04-24 16:18:31 -05:00
Calvin Rose
8bc2987a71
(struct ...) with duped keys will use last value.
2020-04-11 13:42:25 -05:00
Calvin Rose
a68ee7aac6
Update Copyright 2020.
2020-01-12 10:50:37 -06:00
Calvin Rose
6c7f376410
Try to remove potential overflow bugs.
...
Also make integer to size_t casts explicit rather than relying on
int32_t * sizeof(x) = size_t. This is kind of a personal preference for
this problem.
2020-01-02 22:08:17 -06:00
Calvin Rose
9dd152dc28
Add features.h for feature test macros.
...
Because we use an amalgated build, feature
test macros should be set in a single file that
is included before any other headers, and is placed
at the top of the amalgamated build.
2019-12-30 19:06:15 -05:00
Calvin Rose
00a47dc0cb
Begin work on new memory layout for all objects and GC.
...
The layout should actually be very similar to the old layout, but
the code will be much easier to change and should be more portable.
2019-02-21 11:22:29 -05:00
Calvin Rose
9d4effc02e
Add make format to format code.
...
A consistent style should help with contributors and
readability. We use astyle as the formatter as can make a pretty
good approximation of the current style and my preferred style.
Astyle can be found at http://astyle.sourceforge.net/astyle.html
2019-02-19 20:51:34 -05:00
Calvin Rose
ed72dcf82d
Rename the header <janet/janet.h> to <janet.h>
...
Makes it easier to use and remember, and makes the
variable `module/*headerpath*` make more sense.
2019-02-18 20:13:35 -05:00
Calvin Rose
46c540b93e
Add math headers for emscripten
...
We now check for NaN in table.c and struct.c
as we disallow NaN keys.
2019-01-29 18:18:14 -05:00
Calvin Rose
38a7e4faf1
Disallow NaN as table/struct key.
...
Fix bugs and add tests for denormalized tables
and structs.
2019-01-28 11:50:33 -05:00
Calvin Rose
611543c48b
Add source amalgamation
...
The amalgamated source concatenates all sources
to a file janet.c which can be used for
embedding janet, much in the same way as sqlite
or mongoose.
2019-01-24 00:15:58 -05:00
Calvin Rose
6f3bc3d577
Update copyright date, fix types, remove trailing whitespace.
2019-01-06 03:23:03 -05:00
Calvin Rose
338b31f5a2
Add janet_fixarity. Update emscripten source.
2019-01-05 20:45:24 -05:00
Calvin Rose
56c3b8aa94
Add ability to index into structs and dictionaries generically.
2018-09-09 12:13:32 -04:00
Calvin Rose
c8ef2a0d88
Rename to janet
2018-09-05 22:18:42 -04:00
Calvin Rose
d95941597f
Fix help.
2018-08-15 22:48:35 -04:00
Calvin Rose
2e472ec9a3
Version 2 of new source mapping.
2018-06-29 01:16:46 -04:00
Calvin Rose
fb409201b4
Strip trailing whitespace from many files.
...
Add native modules to import with module.native-path.
2018-05-19 21:16:00 -04:00
Calvin Rose
f295692b50
Update copyright to 2018. Add string methods.
2018-05-17 23:41:20 -04:00
Calvin Rose
3e1e258546
Fix a compiler bug in the do special form.
2018-03-19 14:51:18 -04:00
Calvin Rose
5f0bd1e082
Update code.
2018-03-14 21:46:56 -04:00
Calvin Rose
c0ac44a650
Fix description semantics. describe returns string, does not print.
2018-03-14 18:57:26 -04:00
bakpakin
30f62ca454
Major refactor and restructure. Add CMake for anticipated windows
...
support.
2018-01-19 16:43:19 -05:00