Calvin Rose
e4bf27b01c
Macro hack for meson-min build.
2023-06-03 14:22:16 -05:00
Calvin Rose
7d48b75f81
Update README.md
2023-06-03 14:19:02 -05:00
Calvin Rose
5f56bf836c
Update meson.build file.
2023-06-03 13:55:49 -05:00
Ico Doornekamp
c0f5f97ddb
Added misc tests to increase test coverage
2023-06-03 19:06:51 +02:00
Calvin Rose
15177ac2e9
Merge pull request #1162 from sogaiu/reorg-tests-new
...
Reorganize tests
2023-06-03 08:01:34 -05:00
Calvin Rose
8360bc93ac
Merge pull request #1177 from zevv/zevv-isatty
...
added os/isatty, do not enable colors if stdout is not a tty
2023-06-03 07:58:16 -05:00
Ico Doornekamp
e0ea844d50
added os/isatty, do not enable colors if stdout is not a tty
2023-06-02 16:59:54 +02:00
sogaiu
9675411f35
Reorganize tests
2023-06-02 07:04:07 +09:00
Calvin Rose
e97299fc65
Fix #1174 - bad debug info causing stack traversal to segfault.
...
Coming from commit 77189b6e66
, relating
to changes in source mapping debug info, this caused a segfault when
traversing a stack frame where the birth_pc was incredibly large due
to wrap around. This fix prevents the wrap around and does saturating
subtraction to 0.
2023-06-01 13:01:59 -05:00
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