Calvin Rose
67f375bea2
Small code style change to boot.janet
2023-06-04 11:10:39 -05:00
Christopher Chambers
53447e9d0b
Ensure ev/gather fibers are fully canceled on error.
2023-06-04 10:49:30 -04:00
Calvin Rose
c4c86f8671
Run boot.janet through janet-format.
2023-06-03 16:47:59 -05:00
Calvin Rose
658941d26d
Fix macro declaration.
2023-06-03 14:24:41 -05:00
Calvin Rose
e4bf27b01c
Macro hack for meson-min build.
2023-06-03 14:22: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
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
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
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
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
70f13f1b62
Merge pull request #1157 from zevv/file-lines
...
Add file/lines iterator
2023-05-26 18:16:14 -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
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
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
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
Calvin Rose
c3fd71d643
Merge pull request #1142 from tionis/thaw
...
added thaw to complement freeze
2023-05-21 08:09:47 -05:00
Ico Doornekamp
30c47d685d
Fixed :cputime because msdn does not implement clock() properly
2023-05-21 07:29:27 +02:00
Ico Doornekamp
e8e5f66f4c
Implement janet_gettime() for win32 and macos; need testing
2023-05-21 07:29:27 +02:00