Commit Graph

22841 Commits (4330a645f494d7cca28fc756be024ba3a5b82650)

Author SHA1 Message Date
Joe Groff 300a0256c8 new vocab tools.annotations.assertions
Annotates unsafe words with assertions that their inputs and outputs are valid. Provide annotations for stream-read(-partial)-unsafe and (set-)nth-unsafe to start with.
2011-10-18 15:13:34 -07:00
Joe Groff c850722cbb tools.annotations: send watch to error-stream 2011-10-18 15:13:34 -07:00
Joe Groff b4d406cfa3 ui.tools.listener: set error stream 2011-10-18 15:13:33 -07:00
Joe Groff d61f335fee io: error stream combinators
* with-error-stream(*)
* with-output+error-stream(*) -- sets output and error stream to same stream
* with-output>error -- sets output stream to error stream for scope
* with-input-output+error-streams(*) -- like with-streams, but sets output and error to same stream
2011-10-18 15:13:33 -07:00
John Benediktsson b237df3a3b Remove unused stack effects from DEFER: declarations. 2011-10-18 14:42:17 -07:00
John Benediktsson 6e00eaa3f8 Fix stack effect to not print "(( -- ))", remove stray effect from smtp. 2011-10-18 13:25:47 -07:00
John Benediktsson 80e1c8e3f2 Eliminate duplicate syntax for stack effects "(" no longer drops and is identical to the old "((", which is now removed. 2011-10-18 13:19:39 -07:00
Joe Groff 9b2634fbd7 io.files.windows: fix can-seek? and length 2011-10-18 12:42:53 -07:00
John Benediktsson 8b724d9657 webapps.mason: link crashed and broken to latest build reports. Fixes #274. 2011-10-18 11:57:03 -07:00
John Benediktsson 8d15fb1021 ui.gadgets.editors: implement Ctrl-A/E/K to be more compatible. 2011-10-18 11:38:08 -07:00
John Benediktsson cf54ce8e42 math.functions: when gcd is inlined, "gcd nip" is almost as good as "gcd*". 2011-10-18 10:30:39 -07:00
Doug Coleman 5c694767cd Report which file doesn't get deleted on Windows. 2011-10-18 00:59:57 -07:00
Doug Coleman 5771cafcee Try without-limits in mason.report. Fixes #275. 2011-10-18 00:52:46 -07:00
Doug Coleman 24a6895436 io.sockets.windows - Add a using, output count to fix compile error. Not bad for having no Windows box. 2011-10-17 23:28:22 -07:00
Joe Groff 4493d66282 io.encodings.utf16: auto-use strikes again 2011-10-17 21:46:08 -07:00
John Benediktsson 9f4eeb55f9 Revert "Optimize byte-reverse macro in alien.endian -- it was shifting each byte to the 0th bit place, bitand-ing it with HEX: ff, then shifting it to its final destination -- now we immediately shift to the proper location and bitand with the proper bitmask."
This reverts commit c701a39e89.
2011-10-17 21:39:57 -07:00
Joe Groff 90e1002349 io.sockets: rename (receive) to (receive-unsafe) 2011-10-17 21:23:37 -07:00
Joe Groff 9a812cc5c9 io.ports: lift common methods onto buffered-port 2011-10-17 21:23:37 -07:00
Joe Groff 0c74190a50 ui.tools.listener: remove redundant method 2011-10-17 21:23:37 -07:00
Joe Groff 67cccc63b3 formatting 2011-10-17 21:23:36 -07:00
Joe Groff 68621c4d79 io.sockets.windows: recv to byte-array via malloc
WSARecvFrom on Windows does its work asynchronously, so the buffer cannot be in the managed heap during the extent of the operation.
2011-10-17 21:23:36 -07:00
Joe Groff 8fc0be3c2f io.sockets: remove unix.ffi inserted by auto-use 2011-10-17 21:23:36 -07:00
Joe Groff 5d0ff43613 io.sockets: receive directly into byte array 2011-10-17 21:23:11 -07:00
Joe Groff 20e49c273f io.sockets: receive-unsafe and receive-into
Analogous to read-unsafe/read-into for streams (and thereby TCP sockets), provide receive-unsafe and receive-into words for datagram sockets that receive into a caller-supplied buffer.
2011-10-17 21:23:11 -07:00
Joe Groff 5443664df7 io.encodings.utf16: guess-*coded-length hints 2011-10-17 21:23:11 -07:00
Joe Groff 4bdef412fc io.encodings.utf16: fast path & slow path speedups
Implement M: utf16[bl]e encode-string to use a fast implementation if a string is ASCII only, and do some inlining so the slow path optimizes a bit better.
2011-10-17 21:23:11 -07:00
Joe Groff aa36db5ca8 io.streams.sequence: missed a USING: 2011-10-17 21:23:10 -07:00
Joe Groff dbda6cb40b compiler.tree.dead-code: fix test
It was using "read" in an optimization test, but since "read" is now inline, it wasn't getting the expected optimized quotation back.
2011-10-17 21:23:10 -07:00
Joe Groff f626e456dd specialized-arrays: fill in missing manifest bits 2011-10-17 21:23:10 -07:00
Joe Groff cd0eb76806 io: remove higher-order stack effects
More stack checker breakage
2011-10-17 21:23:10 -07:00
Joe Groff 0353179a92 io.streams.c: remove -seek and -tell methods
M: c-stream stream-seek was broken and bootstrap doesn't need it so save some code.
2011-10-17 21:23:10 -07:00
Joe Groff e426512534 more stream-seekable? and stream-length methods
- limited-streams and throw-on-eof-streams
- string-readers and byte-readers
2011-10-17 21:23:09 -07:00
Joe Groff 1b0b765e82 io: document new words 2011-10-17 21:23:09 -07:00
Joe Groff 3588e6e4dc io.streams.c: help-lint 2011-10-17 21:23:08 -07:00
Joe Groff e589f58163 delegate.protocols: clean up input-stream-protocol 2011-10-17 21:23:08 -07:00
Joe Groff 4d224b552f io: stream-read-into and stream-read-partial-into
Safe user-facing wrappers for stream-read-unsafe.
2011-10-17 21:23:08 -07:00
Joe Groff 863ab575e3 io.ports: stream-seekable? and stream-length
io.files.windows, io.backend.unix: platform-specific backends for those methods
2011-10-17 21:23:08 -07:00
Joe Groff 5627492f9b io.encodings: stream-contents method for decoder
stream-contents on decoder is much faster implemented using a read1 loop than with the default implementation.
2011-10-17 21:23:07 -07:00
Joe Groff 225d10b4dd io: stream-contents, -seekable?, -length generics
stream-contents is extremely slow on decoder streams when implemented with each-block, and it can be implemented very quickly for streams of known length using stream-read-unsafe. Make it generic and provide some off-the-shelf implementations using each-block, a read1 loop, or length + read-unsafe. Provide new stream-seekable? and stream-length generics that can be implemented by stream implementations that know their size.
2011-10-17 21:23:07 -07:00
Joe Groff bd50acf424 unix.stat: bind to fstat 2011-10-17 21:23:07 -07:00
Joe Groff 1c85631611 io: get variables out of stream-copy loop 2011-10-17 21:23:07 -07:00
Joe Groff 09f55f82fa clean up forwarding stream-read-partial-unsafe
Now that "io" provides a method on object for stream-read-partial-unsafe that forwards to stream-read-unsafe, individual stream class that don't implement partial reads don't need to provide such a method themselves.
2011-10-17 21:23:06 -07:00
Joe Groff 805b0372da io: default methods for extended stream protocols
Provide default implementations of all the input-stream methods in terms of stream-read1 and of all the output-stream methods in terms of stream-write1.
2011-10-17 21:23:06 -07:00
Joe Groff 8322ff9452 io.streams.peek: test with memory-stream
Some binary stream types use memcpy to implement read-unsafe, while element-agnostic wrapper streams have to use copy. Make sure peek-stream works with both when it has to divide a read between the peek buffer and the underlying buffer (it does).
2011-10-17 21:23:06 -07:00
Joe Groff ae6d6ba951 specialized-arrays: direct-slice for byte-arrays
Implement nth-c-ptr and direct-like for byte-arrays so that direct-slice over a byte-array makes a uchar-array{ } over a part of the byte-array
2011-10-17 21:23:06 -07:00
Joe Groff aaec2eb1ac io: add read-unsafe and read-partial-unsafe words
Add shortcut words to operate on the input-stream like the other stream methods have. Make all those words inline too just for fun.
2011-10-17 21:23:05 -07:00
Joe Groff c3c382e45c ui.tools.listener: fix stream-read-unsafe
It was returning the number of requested bytes even if eof was encountered.
2011-10-17 21:23:05 -07:00
Joe Groff 6f12322bda kill noncopying-reader mixin, stream-read generic
Now that all streams have been updated to implement the stream-read-unsafe protocol, take out the noncopying-reader shim. Turn stream-read and stream-read-partial into plain functions over the -unsafe generics.
2011-10-17 21:23:05 -07:00
Joe Groff cd00603e2d mongodb.gridfs: leave an unmaintained-reason.txt 2011-10-17 21:23:04 -07:00
Joe Groff 6828eeb27e io.streams.peek: read-unsafe protocol 2011-10-17 21:23:04 -07:00