Calvin Rose
bfd3845218
Fix cfunction debugging issue
...
Cfunction were not describing themselves very well, as
their names were not be added to the registry.
2019-03-27 00:14:51 -04:00
Calvin Rose
94a2084723
Add tostring method for abstract types.
...
This lets abstract types customize how they
print for debugging.
2019-03-19 13:36:26 -04:00
Calvin Rose
95e54c66b6
Use one tag type true and false
...
We moved the literals true and false into one tag
type, so we an extra tag for raw pointer types
(light userdata). These can be used from the C API via
janet_wrap_pointer and janet_unwrap_pointer.
2019-03-13 14:50:25 -04:00
Calvin Rose
a363dce943
Allow proper overriding of cfunctions in the core.
...
Allow overriding functions in the core libray to provide better
functionality on startup. Used to include our getline function in
the repl but use a simpler version in the core library.
2019-03-08 11:39:18 -05:00
Calvin Rose
0382dc976b
More code to better integrate with size_t
...
Typed arrays use proper size_t support in more
places now.
2019-03-08 00:44:26 -05:00
J.-F. Cap
9c1c7fb384
Remove AT id use name as tag
2019-02-24 02:51:34 +01:00
J.-F. Cap
af48912f11
Simplify Abstract type introspection
2019-02-24 02:02:54 +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
J.-F. Cap
7cb1c7cef2
added ta marshalling
2019-02-22 17:41:27 +01:00
J.-F. Cap
db9ac6dba5
marshal buffer ok
2019-02-22 15:57:48 +01:00
J.-F. Cap
59e4b15fad
added some abstract type instrospection capabilities
...
registering abstract type in vm_register table
2019-02-22 10:54:22 +01: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
J.-F. Cap
86ba69c16b
Merge remote-tracking branch 'upstream/master' into crazy-brackets
2019-02-08 23:45:55 +01: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
J.-F. Cap
8ab60e475a
typo in janet_indexed_view
...
(no consequence but look strange)
2019-02-08 01:10:07 +01: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
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
337a498edb
Fix some keyword related issues.
2019-01-02 22:08:51 -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
fe22a8db39
Fix 32 bit platforms janet number handling.
2018-12-30 14:23:52 -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
4d119e4e03
Begin adding more complete documentation.
2018-11-15 15:45:41 -05: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
1ba3aeb3cd
Make stacktrace part of public API.
2018-09-09 21:20:33 -04: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
75c66ea6dd
Refactor native module declarations. marshal can now
...
serialize entire environment.
2018-08-26 14:35:01 -04:00
Calvin Rose
1b009b4f1f
Fix dst_register.
2018-08-22 22:12:47 -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
634ec85b07
Fix funcdef flags when marshaling.
2018-08-21 15:07:37 -04:00
Calvin Rose
910cfd7ddf
Lots of updates. Function marshaling WIP.
2018-08-19 20:21:27 -04:00
Calvin Rose
547529ebb2
Refactor dst_view_* functions.
2018-07-04 13:21:30 -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
363a17ff8c
Convert get, put and length to normal functions, not c functions.
2018-06-17 13:55:02 -04:00
Calvin Rose
0cf10946b0
Add first version of marsh (marshaling).
2018-06-12 14:24:45 -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
dafc121f4d
Change c function macros to be explicitly non functional by
...
capitalizing them.
2018-05-12 20:31:28 -04:00
Calvin Rose
181a38f412
Add sqlite3 native module to repo.
2018-05-05 23:51:29 -04:00
Calvin Rose
53f9c18669
More work on improving errors.
2018-04-29 20:13:04 -04:00
Calvin Rose
10934bcfb9
Add errorhandling helper functions and macros for writing c functions.
2018-04-28 18:10:57 -04:00
Calvin Rose
027b2a81c2
Shrink the public interface by hiding internal state.
2018-03-31 16:42:41 -04:00
Calvin Rose
855787b292
Add macroexpand and macroexpand1
2018-03-18 14:01:58 -04:00
Calvin Rose
35ddc70888
Move ast into parser. Map keywords to symbols instead of
...
strings.
2018-02-03 13:55:55 -05:00
bakpakin
911b0b15e8
Fix some bugs with inner closures.
2018-01-21 14:39:32 -05:00