1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-16 21:54:48 +00:00
Commit Graph

59 Commits

Author SHA1 Message Date
bakpakin
6df88f225f More work on c library interface and io library. 2018-01-15 20:14:54 -05:00
bakpakin
3262316e60 Factor CFunction args into struct. 2018-01-14 12:10:45 -05:00
bakpakin
59bed71a2c Make some unit tests pass. Fix transfer to new fiber. 2018-01-12 16:25:24 -05:00
bakpakin
f8174f192c Fix some vararg behavior in tail calls. 2018-01-12 13:54:37 -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
2d781ef21b Compiler is coming along. Work on Slot system and general compiler strategy. 2017-12-16 01:17:53 -05:00
bakpakin
a2ee6ffe5c New custom strtod implementation. 2017-12-08 15:57:02 -05:00
Calvin Rose
b568a6bc88 WIP integrating nanbox support back into code. 2017-11-28 18:27:55 -05:00
Calvin Rose
d84cc5342e Fix write after free bug.
Remove caching from strings, tuples, and structs.
Keyword style strings removed, now are just symbols. The
compiler can decide to treat symbols with a leading ':'
differently for mostly the same effect. This was done because
as strings are no longer interned, symbols are cheaper to look
up and check for equality.
2017-11-27 14:03:34 -05:00
bakpakin
68f5ea4361 Add test nanbox implementation. Works for 32 bit and 64 bit x86 2017-11-26 19:31:40 -05:00
bakpakin
412d40d09f Work on interpreter. adding more opcodes and syscalls. 2017-11-24 23:17:04 -05:00
bakpakin
6ca6949c2d Getting more work done on assembler, parer, and unit tests. 2017-11-20 21:39:44 -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
53cead0bab Remove vm crash return and use error instead. 2017-07-09 16:15:44 -04:00
bakpakin
eef8a42ae7 Remove tostring in favor of string. 2017-07-03 22:20:39 -04:00
bakpakin
eeeb660120 Can only enter pending threads. 2017-07-03 16:15:16 -04:00
bakpakin
0cf278994d Make coloring changes to the repl 2017-07-02 20:51:52 -04:00
bakpakin
bfadf6ff12 Remove scratch memory functionality. 2017-07-02 19:52:44 -04:00
bakpakin
3481ee5747 Whitespace 2017-07-01 21:51:16 -04:00
Calvin Rose
171c0ce49e Allow yielding by transfering to nil 2017-07-01 11:25:13 -04:00
Calvin Rose
957a513fd6 More changes to threading model. 2017-07-01 11:17:29 -04:00
Calvin Rose
21bd960865 Add more tests
Reuse threads on gst_run when possible
change name of getline to gst_getline
2017-06-29 21:57:09 -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
70478a410b Add errorParent to threads. 2017-06-19 23:01:34 -04:00
Calvin Rose
f066047112 Fix serilaization bug. Still need to serialize c functions. 2017-05-23 14:48:54 -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
b7083f6f18 More work on dogfood repl. 2017-05-09 20:06:53 -04:00
Calvin Rose
fd72219a2a Add tran keyword to allow for continuations. 2017-05-09 19:21:30 -04:00
Calvin Rose
0e29b52d96 Add robinhood hashing to structs.
This corrects changes in internal structure when values
were inserted in different orders (which was previously
incorrect.) Robinhood hashing should correct this by
making the internal structure of the hashtable invariant
of insertion order. This, in turn, allows naive and deterministic equality, comparison, and hashing of structs.
2017-05-09 13:20:28 -04:00
Calvin Rose
96a605fbc0 Fix variadic functions. 2017-05-07 16:48:35 -04:00
Calvin Rose
14f8b12706 Use 32 bit unsigned integers for stackframes. 2017-04-25 12:26:58 -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
c33d4da994 Fix bug with calling convention.
Stack frames were increasing with size every function
call and overwriting other stuff, resulting in some issues with gc.
2017-04-24 18:42:08 -04:00
Calvin Rose
652b250718 Finish simple pretty printer in gst.
Discovered memory leaks. Seems to have to do with improper marking of
the stack and or the VM messes up the stack.
2017-04-24 18:09:23 -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
81987dca45 More work. 2017-04-24 13:12:55 -04:00
Calvin Rose
5845434529 Add readline to repl for better experience 2017-04-19 12:56:29 -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
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