J.-F. Cap
db64a682be
fix incompatibilities with upstream/master changes in marsh.c
2019-02-23 17:54:09 +01:00
J.-F. Cap
4d3c655058
Merge remote-tracking branch 'upstream/master' into typed-array
2019-02-23 17:36:38 +01:00
J.-F. Cap
2becebce92
fix C source format
2019-02-23 17:13:43 +01:00
J.-F. Cap
0cc6c6ff33
implement typed array marshal/unmarshal and
...
generic marshaling capabilities to abstract types.
2019-02-23 16:58:47 +01:00
Calvin Rose
9d60e8b343
Address issue #54
...
Bug when marshalling function environments that were still on a fiber
stack.
2019-02-22 10:16:32 -05:00
Calvin Rose
340a6c4d8d
Update marsh.c to use janet_panic for errors.
...
Before, we used a local setjmp/longjmp for error handling.
Using janet_panic means errors can be more easily expressive and
code can be smaller.
However, we still need to make vector memory get gc collected, as
panics can cause the runtime to skip janet_v_frees.
2019-02-22 10:12:25 -05:00
J.-F. Cap
e5a4c6fc2b
Merge remote-tracking branch 'upstream/master' into ta-with-marshal
2019-02-22 15:58:47 +01:00
J.-F. Cap
db9ac6dba5
marshal buffer ok
2019-02-22 15:57:48 +01:00
Calvin Rose
1147482e62
Address #53 - marshalling fiber strangeness
...
The unmarshaller was not tracking fibers in references.
2019-02-21 19:11:28 -05:00
J.-F. Cap
4d07176f1c
work in progress
2019-02-21 20:52:39 +01: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
bdf03b4706
Fix unmarshalling integers directly, not through readint.
2019-02-15 14:01:32 -05:00
Calvin Rose
c6edf03ae8
Fix some code style, add tuple/type function.
...
We need to be able to detect tuple type from janet code, otherwise
tuples will contain hidden state. The tuple/type function is able
to detect the flags in the tuple so the programmer can access them
if needed.
2019-02-09 12:21:11 -05:00
J.-F. Cap
5020a1bae9
Added marshalling code to save tuple_flag
2019-02-09 17:00:35 +01:00
Calvin Rose
114a45306d
Add more specialization for marshaling integers.
...
This decreases the core image size by about 16.5k.
2019-02-08 10:14:36 -05:00
Calvin Rose
fe27df528c
Boot core library from image rather than source
...
This should speed up start time and reduce malloc/free
usage to about 15% of what is what previously for startup.
The current cost is slightly larger binary as the representaion
of the image is currently less compact than source code.
2019-02-08 00:44:30 -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
5865692401
Surround embedded documentation with a macro so it
...
can be disabled in a future build.
2019-01-06 01:49:56 -05:00
Calvin Rose
338b31f5a2
Add janet_fixarity. Update emscripten source.
2019-01-05 20:45:24 -05:00
Calvin Rose
b60e3e302a
Update C API to use friendlier functions rather than macros.
...
Error handling is implemented with setjmp/longjmp so code
can be more concise. This required a very large but straight forward refactor for all
of the libraries.
2019-01-05 20:09:03 -05:00
Calvin Rose
e9c94598e6
Add native keyword type to replace symbols with leading ':'
...
character.
2019-01-02 19:41:07 -05:00
Calvin Rose
d724c5b959
Update number representation so that wrapping numbers isn't
...
doesn't need to check for NaNs. Change ordering of types.
2018-12-30 12:37:50 -05:00
Calvin Rose
6b95326d7c
First commit removing the integer number type. This should
...
remove some complexity and unexpected behavior around numbers in
general as all numbers are the same number type, IEEE 754 double
precision numbers. Also update examples and tests, some of which were
out of date.
Some more testing may be needed for new changes to numbers.
2018-12-27 13:05:29 -05:00
Calvin Rose
e8c0dcd14e
Make source mapping use byte offset instead of line and col
...
for better debugging support in repl. Add debug module for better
debugging support.
2018-12-13 18:46:53 -05:00
Calvin Rose
64d842d2ef
Update build script, remove windows build issues.
2018-12-08 17:40:05 -05:00
Calvin Rose
f860b950fc
Fix pointer incorrect pointer manipulation that happened
...
to work on a x86-64
2018-11-26 18:01:50 -05:00
Calvin Rose
8bfea73ee7
Fix web build again, simplify fibers and fiber
...
implementation code.
2018-11-26 09:03:26 -05:00
Calvin Rose
fcbd24cedc
Add lots of documentation for all functions.
2018-11-16 16:24:10 -05:00
Calvin Rose
945b72468c
Add a lot of documentation for functions.
2018-11-16 02:09:38 -05:00
Calvin Rose
4d119e4e03
Begin adding more complete documentation.
2018-11-15 15:45:41 -05:00
Calvin Rose
ecb9196e7b
Fix cfunctions not printing with whole name im some cases.
2018-10-22 01:28:39 -04:00
Calvin Rose
92202e1c8b
Add invert and simplify
...
env-lookups to env-lookup
2018-10-21 11:46:36 -04:00
Calvin Rose
98f2c6feab
Add lookups for marshalling and unmarshalling.
...
Allow generating lookup tables from the current environment.
2018-10-21 01:35:07 -04:00
Calvin Rose
ba82290bae
Fix memory leaks in marsh.c - missing frees.
2018-10-04 17:33:44 -04:00
Calvin Rose
c8ef2a0d88
Rename to janet
2018-09-05 22:18:42 -04:00
Calvin Rose
75c66ea6dd
Refactor native module declarations. marshal can now
...
serialize entire environment.
2018-08-26 14:35:01 -04:00
Calvin Rose
ecdef8de8b
Working fiber marshaling.
2018-08-24 11:35:08 -04:00
Calvin Rose
b8a6cd84c0
Work on marshaling fiber.
2018-08-24 08:22:43 -04:00
Calvin Rose
510feeed7f
Allow marshaling of more functions for core.
...
Fix indentation in some files.
2018-08-22 21:41:25 -04:00
Calvin Rose
50aefc8865
Preliminary fiber marshaling
2018-08-21 16:36:49 -04:00
Calvin Rose
634ec85b07
Fix funcdef flags when marshaling.
2018-08-21 15:07:37 -04:00
Calvin Rose
600292fad4
Working function marhsaling
2018-08-21 14:16:55 -04:00
Calvin Rose
4e65eede1c
Update marsh.c
2018-08-21 13:59:01 -04:00
Calvin Rose
5464fd5173
Fix some bugs.
2018-08-21 13:09:01 -04:00
Calvin Rose
08236af578
Update marsh for functions still WIP.
2018-08-19 20:40:42 -04:00
Calvin Rose
910cfd7ddf
Lots of updates. Function marshaling WIP.
2018-08-19 20:21:27 -04:00
Calvin Rose
0cf10946b0
Add first version of marsh (marshaling).
2018-06-12 14:24:45 -04:00