1
0
mirror of https://github.com/janet-lang/janet synced 2024-09-27 22:58:13 +00:00
Commit Graph

58 Commits

Author SHA1 Message Date
bakpakin
0531866954 Redo parser as a FSM. Again. 2018-01-18 17:25:45 -05:00
bakpakin
d373d38aee Add context functions for more uniform interface 2018-01-16 23:18:45 -05:00
bakpakin
23196ff6a2 Fix scope issue in compiler. 2018-01-15 23:31:39 -05:00
bakpakin
6df88f225f More work on c library interface and io library. 2018-01-15 20:14:54 -05:00
bakpakin
d9f24effac Fix compiler errors with upvalues. 2018-01-13 14:08:42 -05:00
bakpakin
efb5f19d27 Fix gcc errors 2018-01-12 17:38:06 -05:00
bakpakin
204caa6d8f Factor out language specials to separate files in compiler.
Add transfer special. */
2018-01-12 10:41:27 -05:00
bakpakin
605848b217 Rename DstValue to Dst for easier access. Move vector.c into
util.c and make public API smaller. Pad strings and symbols with
extra 0 byte for better interop with C.
2018-01-06 11:09:15 -05:00
bakpakin
2771171658 Much work on compiler. Fixing bugs and gradually cleaning
up code. Generalized some vector code.
2018-01-05 16:17:55 -05:00
bakpakin
e4735e14d2 More compiler bug fixes. Added some features and functions like varargs. 2018-01-03 21:36:10 -05:00
bakpakin
f273aa8b1b Add vars, split up headers, remove fiber->ret, add comparators, etc. 2017-12-30 16:46:59 -05:00
bakpakin
34a83839f5 Add utf-8 compatibility in parser. Symbols can
be valid utf-8 strings
2017-12-20 23:03:34 -05:00
bakpakin
8eea6e2a70 minor changes. 2017-12-16 23:36:21 -05:00
bakpakin
01a95426b3 More work on compiler. Add compiler unit test that currently
segfaults alot. Added dst_disasm to reconstruct dsts assembly
from a funcdef.
2017-12-16 23:11:51 -05:00
bakpakin
2d781ef21b Compiler is coming along. Work on Slot system and general compiler strategy. 2017-12-16 01:17:53 -05:00
bakpakin
1293d2e301 Initial rewrite of compiler 2017-12-14 19:33:45 -05:00
bakpakin
a2ee6ffe5c New custom strtod implementation. 2017-12-08 15:57:02 -05:00
bakpakin
14fe30b411 Add preliminary source mapping to parser (always on) 2017-12-03 12:52:09 -05:00
bakpakin
f6dcb07c8d More work. Too many changes to be listed. 2017-11-05 22:05:47 -05:00
bakpakin
a2ee028bd5 WIP 2017-11-01 17:53:43 -04:00
bakpakin
3efd400025 Huge number of changes. Still WIP. Refactoring and
changing C API model. This commit is not i a working state.
2017-09-09 14:39:51 -04:00
bakpakin
6a8ec0c895 Add -env- to repl. 2017-07-09 16:44:45 -04:00
bakpakin
1878ece2af Make compilation simpler. 2017-07-09 15:35:17 -04:00
bakpakin
891c550980 Invert recursion guard to count down instead of up. 2017-07-09 13:31:30 -04:00
bakpakin
e2c78b36d0 Add symbol type. 2017-07-02 17:17:24 -04:00
bakpakin
3481ee5747 Whitespace 2017-07-01 21:51:16 -04:00
Calvin Rose
7e46ead2f4 Add new tests. Add recursion guard to compile, serialize, and
deserialize.
2017-06-28 22:51:24 -04:00
Calvin Rose
d6967a564d Fix bug in compiler 2017-06-25 19:17:54 -04:00
Calvin Rose
1f8b671488 Replace map of vars with single element arrays 2017-06-25 16:52:15 -04:00
Calvin Rose
29a39c47b0 Add var and def. Make them behave the same
but have different implementations in top
level scope in order to enable incremental compilation and repl.
2017-06-25 16:36:20 -04:00
Calvin Rose
c3d65cb91d Remove lots of headers. Add parse c function. 2017-06-24 14:27:29 -04:00
Calvin Rose
70478a410b Add errorParent to threads. 2017-06-19 23:01:34 -04:00
Calvin Rose
abbe6b13f1 Enable serialization of c functions. 2017-06-03 11:26:17 -04:00
Calvin Rose
58edb63607 More work on serilaization 2017-05-11 21:30:18 -04:00
Calvin Rose
6220b70105 More work in serialization 2017-05-11 17:08:29 -04:00
Calvin Rose
fd72219a2a Add tran keyword to allow for continuations. 2017-05-09 19:21:30 -04:00
Calvin Rose
88a24531de Make reflective compilation less stateful 2017-05-07 18:37:19 -04:00
Calvin Rose
96a605fbc0 Fix variadic functions. 2017-05-07 16:48:35 -04:00
Calvin Rose
7b83247c07 Add vararg support to compiler. Seems to be leak in parser. 2017-05-06 17:46:28 -04:00
Calvin Rose
6adc2a5268 More work on compiler. Start defining more dynamic
module system than originally planned.
2017-05-06 13:04:36 -04:00
Calvin Rose
d47ee18b1a Fix gc mark function in compiler.
GNU readline is not valgrind clean or it
is being used incorrectly.
2017-05-05 23:33:36 -04:00
Calvin Rose
f817610d4a More work on compiler. Still has memory leak? 2017-05-05 16:52:05 -04:00
bakpakin
0a96e45c4a Change object to table type.
Tables are simpler and don't do inheritance via metatables. This means
object polymorphism will be done through a different mechanism rather
than Lua-like metatables. Perhaps smalltalk style messaging using
functions as objects, or lisp-like method dispatch.
2017-04-24 21:00:56 -04:00
Calvin Rose
a54548eaa0 Add 64 bit signed integers as a basic type. Will enable
more native bitwise operations and c integration at the expense
of complicating arithmetic.
2017-04-24 16:02:54 -04:00
Calvin Rose
fb3abf5a31 Add apply special form. TODO -
make into function.
2017-04-19 09:43:49 -04:00
Calvin Rose
01e8749f39 Redo function call bytecode interface to be simpler and allow
for an apply like structure in the language
2017-04-19 09:02:12 -04:00
Calvin Rose
f4a6f4073f Rename some fuctions in util. 2017-04-18 16:55:03 -04:00
Calvin Rose
ea432242d3 Add license header to all source files. 2017-04-17 22:40:39 -04:00
Calvin Rose
6e71984fc5 Add wrapping functions for easy conversion between c api and
internal values.
2017-04-17 18:46:28 -04:00
Calvin Rose
f52e290206 Allow parser to parse files rather than just a repl. I think
there are some memory leak issues (problems with gc).
2017-04-17 00:15:18 -04:00