Calvin Rose
b032d94877
Add sandboxing API.
...
The sandboxing API is meant to make janet a bit more attractive
for certain application embedding use cases. The sandboxing API
puts limits on what system resources the interpreter can access.
2023-02-06 09:05:57 -06:00
Calvin Rose
9476016741
Update asm.c
2023-02-05 23:49:18 -06:00
Calvin Rose
7a1c9c7798
Add support for debugging upvalues.
...
Upvalues are stored in the symbol slots structure as well, but
since they are always live, we repurpose the death_pc field to
refer to the environment index that we want to look at at runtime.
2023-02-05 15:30:01 -06:00
Calvin Rose
c7fb7b4451
Merge branch 'master' into localbindings
2023-02-05 11:36:57 -06:00
Calvin Rose
9582d3c623
Allow infinite wait to work without issues.
2023-02-05 09:29:39 -06:00
Calvin Rose
0079500713
Merge branch 'master' into localbindings
2023-02-04 13:39:24 -06:00
Calvin Rose
55af6ce834
Fix write after free with printing to files.
2023-02-04 13:36:30 -06:00
Calvin Rose
3e82fdc125
Update symbolmapping code with marshal/unmarshal.
2023-02-03 17:33:11 -06:00
Calvin Rose
7344a6cfc0
Fix null check.
2023-02-03 16:24:50 -06:00
Calvin Rose
0aded71343
Fix issue with environments in asm.c
2023-02-03 16:24:50 -06:00
Calvin Rose
7663b1e703
Fix null check.
2023-02-02 22:03:18 -06:00
Calvin Rose
282546c03f
Fix issue with environments in asm.c
2023-02-02 21:12:17 -06:00
Calvin Rose
f4bc89d1c0
Progress.
2023-02-02 21:08:48 -06:00
Jona Ekenberg
c0c8ab25e6
added symbolslots to asm
2023-02-01 21:12:42 +01:00
Jona Ekenberg
ce31db09e4
symbolslots should be gc'd, local_symbols always pushed in case *debug* is set in middle of function
2023-02-01 11:45:13 +01:00
Jona Ekenberg
624a6cf619
symbolslots nil when there are no symbols, changed debugger to not have special case
2023-02-01 11:25:52 +01:00
Jona Ekenberg
587aa87d28
symbolslots now use janet_v vectors, flat structure
2023-02-01 11:06:33 +01:00
Jona Ekenberg
88813c4f87
initial slotsyms implementation
2023-02-01 09:39:24 +01:00
Calvin Rose
dacbe29771
Allow round-tripping more functions with disasm and asm.
...
Nested functions that captured with environments didn't
work well with asm.
2023-01-30 09:04:42 -06:00
Calvin Rose
05e7f974e3
Add os/compiler to the core.
...
Allows querying what compiler was used to compile Janet.
2023-01-28 14:00:02 -06:00
Calvin Rose
0dbef65a73
Merge pull request #1065 from sogaiu/comment-tweaks
...
Misc comment tweaks
2023-01-27 11:26:05 -06:00
Calvin Rose
9106228787
Add :riscv32 and :riscv32 values for os/arch.
2023-01-27 11:23:57 -06:00
sogaiu
310bcec260
Misc comment tweaks
2023-01-25 18:45:19 +09:00
Calvin Rose
8c4cc4e671
Merge pull request #1064 from sogaiu/realpath-doc-tweak
...
Update os/realpath docstring
2023-01-24 09:50:44 -06:00
Calvin Rose
c6eaaa83ed
Buffer initialized with janet_buffer_init will not be gced.
...
Set an internal flag that disables garbage collection on such
buffers. For all currently correct usage, this should have no effect,
and will fix use cases where buffers are initialized this way and then
passed to the interpreter.
2023-01-23 20:57:30 -06:00
sogaiu
8f598d6f96
Update os/realpath docstring
2023-01-23 12:55:04 +09:00
alectroemel
1acf4c3ab7
add int32_t type for file flags, just like header
...
Signed-off-by: alectroemel <alectroemel@hotmail.com>
Signed-off-by: alectroemel <alec@mirusresearch.com>
2023-01-22 10:24:46 -06:00
Calvin Rose
07a3158fba
Merge pull request #1060 from ianthehenry/doc-typos
...
Fix some docstring typos
2023-01-21 16:21:57 -06:00
bakpakin
a490937cd9
Add :mingw value when getting the OS setting when compiled with mingw.
2023-01-21 11:50:03 -06:00
bakpakin
8ee5942481
Fix windows build with JANET_NO_NET - #1055
2023-01-21 10:56:20 -06:00
bakpakin
93b469885a
Initial Mingw support with Makefile.
...
Also add a macro JANET_MSVC to distinguish between
a windows build (JANET_WINDOWS) and a build with msvc.
2023-01-21 10:37:34 -06:00
Calvin Rose
d8d1de2dcb
Don't compile library loading code on windows if it is disabled.
2023-01-21 09:36:03 -06:00
Ian Henry
ab224514f0
Fix some docstring typos.
2023-01-18 19:41:56 -08:00
Calvin Rose
75179de8da
Merge pull request #1056 from fd00/use-dev-urandom-on-cygwin
...
Use `/dev/urandom` for `janet_cryptorand` on cygwin
2023-01-08 09:29:52 -06:00
Calvin Rose
b73855b193
Merge branch 'master' of github.com:janet-lang/janet
2023-01-07 15:05:16 -06:00
Calvin Rose
a0f40042cb
Update copyright year.
2023-01-07 15:03:35 -06:00
Daisuke Fujimura (fd0)
3254c2c477
Use /dev/urandom for janet_cryptorand on cygwin
2023-01-07 08:58:35 +09:00
Calvin Rose
a8a78d4525
Merge pull request #1052 from dressupgeekout/cpu_count_reduced_os
...
(os/cpu-count) should not be defined at all with JANET_REDUCED_OS
2022-12-16 11:11:30 -06:00
Calvin Rose
f0672bdc59
Merge pull request #1051 from sogaiu/math-abs-vs-fabs-issue
...
Tweak math/abs to improve doc result
2022-12-16 09:51:43 -06:00
Charlotte Koch
23de953fbd
(os/cpu-count) should not be defined at all with JANET_REDUCED_OS
2022-12-15 20:16:43 -08:00
Calvin Rose
d5ee6cf521
Add malloc and free to ffi.
...
Very "unsafe", but a good tool of last resort. In most cases
a buffer is preferable, but the lifetime can be a bit unclear.
This allows very granular control over memory.
2022-12-15 21:35:44 -06:00
sogaiu
fb7981e053
Tweak math/abs to improve doc result
2022-12-11 00:09:50 +09:00
Calvin Rose
90f212df92
Add length method ffi/jitfn abstract values.
2022-12-04 11:08:17 -06:00
Calvin Rose
aa60c1f36a
Add ffi jit example.
2022-12-03 17:52:23 -06:00
Calvin Rose
c731f01067
Address windows compilation warning.
2022-12-03 12:10:22 -06:00
Calvin Rose
6c9c1cdb30
MAP_ANON(YMOUS) not strictly needed.
2022-12-03 11:45:33 -06:00
Calvin Rose
9ba2b40e87
Add MAP_ANON instead of MAP_ANONYMOUS for mac
2022-12-03 11:31:04 -06:00
Calvin Rose
7a3d055012
Add ffi/jitfn for JIT compilation.
...
Convert a byte sequence of machine code to an
an executable pointer that can be used with ffi/call.
2022-12-03 11:26:23 -06:00
Calvin Rose
0824f45e29
Format compile.c
2022-11-27 10:15:01 -06:00
Calvin Rose
07fe9bcdf6
Update state header to include pthread
2022-11-11 11:48:50 -06:00