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
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
8a3f512746
Experimental changes to janet_call to make it faster.
...
Remove setjmp and fiber creationg from janet_call. This
adds the constraint to janet_call can only be called when there
is already a current fiber.
2019-02-01 11:56:25 -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
798c88b4c8
Update peg to allow functions over captures. Update C API
...
to make janet function calls easier and faster from C (still
needs an object pool for fibers, though). Fix bug in scan-number
and add many more peg tests.
2019-01-12 17:31:15 -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
6b4824c2ab
Fix error behavior when calling functions with incorrect arities.
2018-12-30 18:41:44 -05:00
Calvin Rose
2c94aa1a6a
Update min fiber size.
2018-12-23 23:38:49 -05:00
Calvin Rose
55c091e898
Update core.janet
2018-12-23 14:13:27 -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
11cd1279d7
Update Makefile and fix fiber issues. When
...
creating an invalid fiber with the C api, the
program could segfault. This protects against this kind
of segafault.
2018-12-02 15:29:21 -05:00
Calvin Rose
4e4dd31164
Change syntax for namespaces.
...
Add quasiquote, unquote, and unquote-splicing
as specials rather than a macro.
2018-11-30 22:49:21 -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
b20cbdfde6
Add os module documentation. Fix some fiber documentation.
2018-11-16 02:34:50 -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
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
f3480c1c1d
Try to silence some appveyor warnings.
2018-08-05 21:32:32 -04:00
Calvin Rose
06c755c98a
Be stricter with function arity.
2018-08-03 13:41:44 -04:00
Calvin Rose
a018f9f54a
Major refactor. Move files around, merge compiler into
...
core and other changes, work on inlining many c functions.
2018-07-03 23:07:35 -04:00
Calvin Rose
28cf753fa2
Source mapping v4 (line and column instead of byte offsets).
2018-06-29 11:13:06 -04:00
Calvin Rose
bb406133de
New sourcemaps v1.
2018-06-28 23:37:04 -04:00
Calvin Rose
0cf10946b0
Add first version of marsh (marshaling).
2018-06-12 14:24:45 -04:00
Calvin Rose
2a87dada47
Rename fiber.resume and fiber.yield to
...
resume and yield.
2018-06-09 13:08:30 -04:00
Calvin Rose
63baa52392
Add fiber.maxstack and fiber.setmaxstack to core library
2018-06-03 14:00:05 -04:00
Calvin Rose
f295692b50
Update copyright to 2018. Add string methods.
2018-05-17 23:41:20 -04:00
Calvin Rose
51bdc41014
Change fiber signal model to add user signals. This
...
should allow easier implementations of eventloops,
threadpools, or custom data flows with fibers.
2018-05-16 22:09:36 -04:00
Calvin Rose
dafc121f4d
Change c function macros to be explicitly non functional by
...
capitalizing them.
2018-05-12 20:31:28 -04:00
Calvin Rose
ee01547b3a
Add some more fiber functions.
...
Add fiber.current and fiber.lineage
2018-05-10 20:25:49 -04:00
Calvin Rose
932a0324ee
More work on renaming functions. Change long string syntax to use
...
backticks. Allow custom masks in fibers for custom error and debug
handling.
2018-05-09 17:01:58 -04:00
Calvin Rose
f47323c915
Change convention for naming modules and functions.
2018-05-08 19:40:28 -04:00
Calvin Rose
53f9c18669
More work on improving errors.
2018-04-29 20:13:04 -04:00
Calvin Rose
0fd55282d8
Add error reporting to repl (initial stack traces)
2018-03-21 20:53:39 -04:00
Calvin Rose
2a0dc5f1ad
Switch to assymetric coroutines instead of symmetric.
2018-03-11 15:35:23 -04:00
Calvin Rose
0c3b0673ff
Enable debug opcode in vm and debug state for fibers.
2018-03-09 17:14:26 -05:00
Calvin Rose
1551bf6b48
Use flatter representation for function and environments.
2018-02-13 16:14:55 -05:00
Calvin Rose
2f4fd23884
Add per fiber stack limit.
2018-02-12 17:36:29 -05:00
Calvin Rose
a614816a04
Update func env representation to not store envs in function
...
objects.
2018-02-12 16:43:59 -05:00
Calvin Rose
3e1f031576
Self host the repl, remove linenoise, and selfhost the
...
main client.
2018-02-07 00:44:51 -05:00
bakpakin
30f62ca454
Major refactor and restructure. Add CMake for anticipated windows
...
support.
2018-01-19 16:43:19 -05:00