Calvin Rose
26a113927e
Add handling for new bytecode optimizations.
2023-06-01 12:47:59 -05:00
Calvin Rose
d0aa7ef590
Add a few asserts to quiet some of the -fanalyze calls in gcc 13.
2023-06-01 10:52:34 -05:00
Calvin Rose
5de889419f
Rename contains? and contains-key? to has-value? and has-key?
...
Shorten docstrings to be less like a tutorial. They get put into RAM
and memory ain't free.
2023-05-31 22:35:57 -05:00
Calvin Rose
0fcbda2da7
Merge pull request #1017 from Techcable/feature/helper-func-contains
...
Add `contains?` helper function to boot.janet
2023-05-31 22:28:41 -05:00
Calvin Rose
14e33c295f
Make clock tests less fragile for CI.
2023-05-31 22:21:12 -05:00
Calvin Rose
644ac8caf8
Add compiler optimizations for #1163 - eachp
...
Should result in much better bytecode in the simple case.
2023-05-31 12:26:27 -05:00
Calvin Rose
77189b6e66
Fix some symbol mapping inside nested functions.
2023-05-31 08:19:24 -05:00
Calvin Rose
4f8f7f66ee
Merge branch 'bytecode_opt'
2023-05-31 07:57:13 -05:00
Calvin Rose
b099bd97f2
Merge branch 'master' into bytecode_opt
2023-05-30 18:13:02 -05:00
Calvin Rose
961c6ea15a
Merge pull request #1172 from zevv/windows-recvfrom
...
fix for crash on windows in src/core/ev.c: initialze state->fromlen
2023-05-30 16:54:24 -05:00
Calvin Rose
9c97d8f648
Merge pull request #1171 from zevv/zevv-net-connect
...
Fixed net/connect binding address
2023-05-30 16:53:24 -05:00
Ico Doornekamp
ad7bf80611
fix for crash on windows in src/core/ev.c: initialze state->fromlen
...
before doing WSARecvFrom() to prevent crash (likely caused by the
memcpy() of `state->from` at line
2301 with the memcpy length set to -1)
2023-05-30 19:33:34 +02:00
Ico Doornekamp
40080b23ae
Fixed net/connect binding address
2023-05-30 16:57:17 +02:00
Calvin Rose
7acb5c63e0
Remove bad windows10 check.
2023-05-29 18:17:22 -05:00
Calvin Rose
fcca9bbab3
Add recursion to the pruning optimization.
2023-05-29 18:05:14 -05:00
Calvin Rose
dbb2187425
Merge pull request #1167 from zevv/janet-formatbf-fix
...
Fix janet_formatbv() type when handling %d %u int specifiers
2023-05-29 18:03:13 -05:00
Calvin Rose
82e51f9e81
Merge pull request #1169 from zevv/fix-buffer-push-at-doc
...
Updated documentation for buffer/push-at
2023-05-29 18:02:05 -05:00
Calvin Rose
4782a76bca
Add inital bytecode optimizations for #1163
...
This removes unnecessary movn, movf, lds, and a few other instructions.
Any instructions that has not side effects and writes to a slot that
isn't used can be removed. A number of other optimizations can follow
from this:
- Implement the def-aliasing-var optimization better
- This function can be iterated as a fix point until no more
instructions are removed.
- If we implement slot renaming, then we no longer need to free slots
and can simplify the initial code generation a lot.
2023-05-29 16:10:48 -05:00
Ico Doornekamp
d13788a4ed
Updated documentation for buffer/push-at
2023-05-29 22:03:37 +02:00
Ico Doornekamp
e64a0175b1
change janet_formatbv() to handle int/unsigned int instead of long/unsigned long on '%d' and '%u' format specifiers.
2023-05-29 19:50:14 +02:00
Calvin Rose
4aca94154f
Be more selective when testing FFI.
...
In the future, we really should get more FFI testing for
partially supported FFI on various platforms.
2023-05-28 15:28:17 -05:00
Calvin Rose
ac5f118dac
Merge pull request #1164 from dressupgeekout/janet_h_symlink
...
More portable method of installing janet.h -> janet/janet.h symlink
2023-05-28 15:22:12 -05:00
Charlotte Koch
a2812ec5eb
More portable method of installing janet.h -> janet/janet.h symlink
2023-05-27 14:22:11 -07:00
Calvin Rose
70f13f1b62
Merge pull request #1157 from zevv/file-lines
...
Add file/lines iterator
2023-05-26 18:16:14 -05:00
Calvin Rose
77e62a25cb
Merge pull request #1160 from primo-ppcg/mapcat-et-al
...
Allow mapcat et al to accept multiple iterable arguments
2023-05-26 18:15:09 -05:00
Ico Doornekamp
09345ec786
file/linex now only acceps a file, not a path name
2023-05-26 17:50:26 +02:00
primo-ppcg
bad73baf98
Add test cases for variadic arguments to map-like functions
2023-05-26 19:08:00 +07:00
primo-ppcg
3602f5aa5d
Update boot.janet
...
`kvs` is not yet defined at this point.
2023-05-25 18:27:31 +07:00
primo-ppcg
672b705faf
Allow mapcat et al to accept multiple iterable arguments
...
#1159
2023-05-25 18:12:38 +07:00
Ico Doornekamp
64e3cdeb2b
Add file/lines iterator
2023-05-24 16:54:04 +02:00
Calvin Rose
909c906080
Fix yields inside nested fibers.
2023-05-23 20:09:46 -05:00
Calvin Rose
71bde11e95
Allow one argument to while.
2023-05-23 20:09:46 -05:00
Calvin Rose
fc20fbed92
Merge pull request #1151 from zevv/document-string-format
...
Add docstring to string/format
2023-05-23 18:57:55 -05:00
Calvin Rose
e6b7c85c37
Merge pull request #1152 from zevv/error-messages
...
Improved various error messages when handling unexpected types.
2023-05-23 18:57:20 -05:00
Ico Doornekamp
b3a92363f8
Add docstring to string/format
2023-05-23 07:21:26 +02:00
Ico Doornekamp
e9f2d1aca7
changed some error messages 'x|y' -> 'x or y'
2023-05-23 06:58:52 +02:00
Ico Doornekamp
b4e3dbf331
Improved various error messages when handling unexpected types.
...
error: bad slot #1 , expected string|symbol|keyword|buffer, got ...
error: bad slot #1 , expected a string, symbol, keyword or buffer, got ...
bad s64 initializer: "donkey"
can not convert string "donkey" to s64
2023-05-23 06:57:12 +02:00
Calvin Rose
c3620786cf
Merge branch 'master' of github.com:janet-lang/janet
2023-05-22 20:41:05 -05:00
Calvin Rose
41943746e4
Fix #1149 - deep-not= should only return true/false.
...
Also improve perf at same time.
2023-05-22 20:40:30 -05:00
Calvin Rose
176e816b8c
Merge pull request #1153 from zevv/fix-warning
...
Fix warning in janet_gettime()
2023-05-22 18:46:55 -05:00
Ico Doornekamp
50a19bd870
Fix warning in janet_gettime()
2023-05-22 20:53:03 +02:00
Calvin Rose
57b751b994
Merge branch 'master' of github.com:janet-lang/janet
2023-05-21 16:23:44 -05:00
Calvin Rose
77732a8f44
inet_test change.
2023-05-21 13:36:11 -05:00
Calvin Rose
c47c2e538d
Merge pull request #1137 from tionis/master
...
os/proc-kill now accepts an optional signal to send
2023-05-21 13:33:24 -05:00
Calvin Rose
cc5545277d
Merge pull request #1147 from zevv/error-messages
...
improved error messages for special forms
2023-05-21 13:31:06 -05:00
Ico Doornekamp
63353b98cd
improved error messages for special forms
2023-05-21 20:18:32 +02:00
tionis
4dfc869b8a
fixed formatting in src/core/os.c
2023-05-21 15:55:11 +02:00
tionis
b4b1c7d80b
Merge branch 'janet-lang:master' into master
2023-05-21 13:51:24 +00:00
tionis
e53c03028f
ignoring signals on windows in os/proc-kill again
2023-05-21 15:50:15 +02:00
Calvin Rose
8680aef42f
Merge pull request #1146 from zevv/os-clock
...
Add clock sources to os/clock (:realtime, :monotonic, :cputime)
2023-05-21 08:35:24 -05:00