Commit Graph

22635 Commits (f2741b34a4b82600f7965cfa0f6eae6d4f4ffe24)

Author SHA1 Message Date
John Benediktsson f2741b34a4 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 d95420c7cb io.files.windows: fix can-seek? and length 2011-10-18 12:42:53 -07:00
John Benediktsson bca5841ffe webapps.mason: link crashed and broken to latest build reports. Fixes #274. 2011-10-18 11:57:03 -07:00
John Benediktsson 6a096a1e71 ui.gadgets.editors: implement Ctrl-A/E/K to be more compatible. 2011-10-18 11:38:08 -07:00
John Benediktsson 599f08f05d math.functions: when gcd is inlined, "gcd nip" is almost as good as "gcd*". 2011-10-18 10:30:39 -07:00
Doug Coleman a1b5e2a5b1 Report which file doesn't get deleted on Windows. 2011-10-18 00:59:57 -07:00
Doug Coleman 1771f18998 Try without-limits in mason.report. Fixes #275. 2011-10-18 00:52:46 -07:00
Doug Coleman 06b4f3a60b 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 89e98cd99b io.encodings.utf16: auto-use strikes again 2011-10-17 21:46:08 -07:00
John Benediktsson 844eacce00 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 71370f9e33 io.sockets: rename (receive) to (receive-unsafe) 2011-10-17 21:23:37 -07:00
Joe Groff aedc291345 io.ports: lift common methods onto buffered-port 2011-10-17 21:23:37 -07:00
Joe Groff 44b49d54a0 ui.tools.listener: remove redundant method 2011-10-17 21:23:37 -07:00
Joe Groff 35a5bdabc3 formatting 2011-10-17 21:23:36 -07:00
Joe Groff 97d2898d5c 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 1214c004da io.sockets: remove unix.ffi inserted by auto-use 2011-10-17 21:23:36 -07:00
Joe Groff ffaaf2912f io.sockets: receive directly into byte array 2011-10-17 21:23:11 -07:00
Joe Groff 77b6a1328d 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 49cf017399 io.encodings.utf16: guess-*coded-length hints 2011-10-17 21:23:11 -07:00
Joe Groff 6d6864b47c 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 7adce45340 io.streams.sequence: missed a USING: 2011-10-17 21:23:10 -07:00
Joe Groff a3d9990255 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 e07f2d0c8d specialized-arrays: fill in missing manifest bits 2011-10-17 21:23:10 -07:00
Joe Groff a73dc7b4b5 io: remove higher-order stack effects
More stack checker breakage
2011-10-17 21:23:10 -07:00
Joe Groff 7b4e62b87f 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 d35c67dde4 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 10bcb933db io: document new words 2011-10-17 21:23:09 -07:00
Joe Groff 0c225d1e8d io.streams.c: help-lint 2011-10-17 21:23:08 -07:00
Joe Groff a3bc7195e8 delegate.protocols: clean up input-stream-protocol 2011-10-17 21:23:08 -07:00
Joe Groff 21e2fdc25c 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 17760cbbb8 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 440130d618 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 372f7c6614 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 d54de50dd6 unix.stat: bind to fstat 2011-10-17 21:23:07 -07:00
Joe Groff c4d9599a00 io: get variables out of stream-copy loop 2011-10-17 21:23:07 -07:00
Joe Groff 7cf22250ce 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 2e1f72697f 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 6f47c1c430 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 e7009459bf 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 28af1529bc 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 0303d4d1de 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 1e37b525a3 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 fcfbcde5a1 mongodb.gridfs: leave an unmaintained-reason.txt 2011-10-17 21:23:04 -07:00
Joe Groff 5f47ec2d57 io.streams.peek: read-unsafe protocol 2011-10-17 21:23:04 -07:00
Joe Groff a0d49d9ff3 ui.tools.listener: read-unsafe for interactor†
†there's a failing test with this patch that needs investigation:

===
resource:basis/ui/tools/listener/listener-tests.factor: 90

Unit Test: { [ t ] [ "promise" get 2 seconds ?promise-timeout text = ] }

wait-timeout
===
2011-10-17 21:23:04 -07:00
Joe Groff df6140eb93 delegate.protocols: update input-stream-protocol
Add stream-read-unsafe and stream-read-partial-unsafe to input-stream-protocol.
2011-10-17 21:23:04 -07:00
Joe Groff e2e9ce991d io: remove each-block* because it's not useful 2011-10-17 21:23:03 -07:00
Joe Groff af370097a4 io.encodings: decoders can't really seek or tell 2011-10-17 21:23:03 -07:00
Joe Groff 92edf6f98a io.encodings: re-encrypt into stack-ese for core 2011-10-17 21:23:03 -07:00
Joe Groff 991e08c880 io.encodings: read-unsafe for decoders†
† currently uses locals, so not bootstrappable
2011-10-17 21:23:02 -07:00