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
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
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
e589f58163
delegate.protocols: clean up input-stream-protocol
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
bd50acf424
unix.stat: bind to fstat
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
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
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
a9ab3db167
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
7caed69d26
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
5c945595ee
io.encodings.string: faster decode and encode
...
stream-contents is apparently way slow for decoders. Write decode out more directly as a read1/push loop so it's faster. encode isn't quite as bad, but we can still get a 25% speed improvement by writing to an appropriately sized byte-vector.
2011-10-17 21:23:02 -07:00
Joe Groff
055196d4b7
io.streams.(limited,throwing): read-unsafe methods
2011-10-17 21:23:00 -07:00
Joe Groff
01419b3e6b
io.streams.null: read-unsafe methods
2011-10-17 21:23:00 -07:00
Joe Groff
a3b15543e1
io.ports: implement read-unsafe operations
2011-10-17 21:22:59 -07:00
Joe Groff
7e9dbde99f
io.buffers: factor out buffer-read-unsafe word
...
buffer-read-unsafe returns a length and a pointer into the buffer instead of a copy.
2011-10-17 21:22:59 -07:00
Joe Groff
b79d7158be
io.streams.memory: implement stream-read-unsafe
...
(The actual method is in alien.data due to bootstrap load order issues.)
2011-10-17 21:22:59 -07:00
Joe Groff
d5f4b6f155
io.streams.sequence: change to provide read-unsafe
...
Change io.streams.sequence and its children io.streams.byte-array and io.streams.string to implement the -unsafe protocol and mixin noncopying-reader.
2011-10-17 21:22:59 -07:00
Joe Groff
5a072c57a6
bootstrap, io.streams.c: use new fread primitive
...
Change the fread primitive to fread-unsafe, matching the new primitive in the VM, and update the implementation of c-reader to implement stream-read-unsafe and stream-read in terms of fread-unsafe
2011-10-17 21:22:58 -07:00
John Benediktsson
38a54cb8df
math.functions: improve stack effect names for gcd*.
2011-10-17 20:37:36 -07:00
John Benediktsson
ac98269f53
math.functions: faster gcd means faster ratios.
2011-10-17 20:36:28 -07:00
Doug Coleman
a2804ebf54
find-dlist-node was returning duplicated information -- node/f tells you enough, no need for another boolean return value
2011-10-17 18:58:14 -07:00
Doug Coleman
f21fee3b73
Rename complete-effect to scan-effect
2011-10-17 10:25:27 -07:00
Doug Coleman
db1d499a6f
Fix typo in tools.deploy.windows.ico
2011-10-16 23:06:11 -07:00
John Benediktsson
81714b8dc3
More lint cleanups.
2011-10-16 19:33:16 -07:00
John Benediktsson
470e0be3e1
ui.tools.listener: call insert-newline directly.
2011-10-16 13:39:15 -07:00
John Benediktsson
fb9612ef73
sequences.deep: find drop >boolean is any?
2011-10-16 13:15:05 -07:00
John Benediktsson
c8732657b7
Cleanup more lint warnings.
2011-10-16 13:01:58 -07:00
John Benediktsson
6f1c44b46d
Cleanup some lint warnings.
2011-10-15 19:19:44 -07:00
John Benediktsson
ed72c670b9
bootstrap.image: disable auto-use. Fixes #263 .
2011-10-15 10:34:34 -07:00
John Benediktsson
37deaec528
random: random integers is 90% faster.
2011-10-14 18:52:41 -07:00
John Benediktsson
7d31da68b8
debugger: remove double namespace using.
2011-10-14 15:45:31 -07:00
Joe Groff
f39f97840a
stack-checker: update tests
...
[ bi ] infer now hits the row polymorphism checker before it hits the unknown-macro-input checker because of the effect on keep. Change the test to more directly test that call fails with an unknown input.
2011-10-14 15:35:29 -07:00
John Benediktsson
cc49bbfb27
math.bitwise: bits is clearer this way.
2011-10-14 13:54:08 -07:00
John Benediktsson
2b21f01918
Remove trim-whitespace in favor of [ blank? ] trim.
2011-10-14 13:22:28 -07:00
John Benediktsson
d61de12011
Cleanup more lint warnings.
2011-10-14 12:31:46 -07:00
Doug Coleman
623ccb95e6
Remove some duplication in lists
2011-10-14 12:08:48 -07:00
John Benediktsson
378786599d
Cleanup lint warnings.
2011-10-14 11:47:24 -07:00
Doug Coleman
933319f401
Cleanups found with lint tool
2011-10-14 10:15:13 -07:00
John Benediktsson
312704ae68
math.parser: cleanup uses of 16/8/2 >base/base>.
2011-10-14 10:09:12 -07:00
John Benediktsson
0965d9be41
webapps.help: remove frames. Fixes #242 .
2011-10-13 22:09:30 -07:00
John Benediktsson
f20e5df501
io.files.info.unix.linux: fix more M: stack effects.
2011-10-13 17:55:30 -07:00
John Benediktsson
2d8e7c77e8
io.files.info.unix.linux: fix M: stack effect.
2011-10-13 17:38:30 -07:00
John Benediktsson
6417f36397
namespaces: adding a "with-global" word to replace "global [ ] bind".
2011-10-13 17:21:59 -07:00
John Benediktsson
422f427a87
Fix M:: stack effects.
2011-10-13 16:44:30 -07:00
John Benediktsson
4558bf3414
Change method parsing to validate stack effects. Fixes #236 .
2011-10-13 16:41:17 -07:00