Commit Graph

22577 Commits (01419b3e6bd4280d910ce713b1c355cb5cb80a0f)

Author SHA1 Message Date
Joe Groff 01419b3e6b io.streams.null: read-unsafe methods 2011-10-17 21:23:00 -07:00
Joe Groff 8261c941c2 io: non-copying each-block and contents variants
each-(stream-)block* is like each-block but takes a buffer object and reads into it repeatedly. (stream-)contents* determines the stream length then does a single stream-read-unsafe into a preallocated buffers. Both functions currently only work for byte-arrays (and contents* only for seekable streams), so they can't replace the non-starred versions completely just yet.
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 66bb07bbcf io, io.streams.c: factor noncopying-reader mixin
Instances of the mixin implement stream-read and stream-read-partial in terms of stream-read-unsafe and stream-read-partial-unsafe, respectively.
2011-10-17 21:22:58 -07:00
Joe Groff 2518f1c0e9 io.streams.c: Document fputc primitive 2011-10-17 21:22:58 -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
Joe Groff ef8a179f34 io: non-copying binary stream read generics
Add generics stream-read-unsafe and stream-read-partial-unsafe, which take a buffer pointer and return a count of bytes read instead of returning a freshly allocated byte array.
2011-10-17 21:22:57 -07:00
Joe Groff fde782cff6 vm: non-copying primitive_fread
primitive_fread now takes a buffer pointer argument and returns a count of bytes read instead of allocating a byte array.
2011-10-17 21:22:57 -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
John Benediktsson d947553df8 benchmarks: tcp/udp should take less time for now (until it gets sped up). 2011-10-17 17:47:28 -07:00
Doug Coleman 7ffd51c485 A little ambitious on the tcp-echo2 benchmark. Reduce 20mil to 20k 2011-10-17 16:47:21 -07:00
John Benediktsson bd0278cf63 lint: enable checks for quotations of length 2, and add some ignores. 2011-10-17 11:30:01 -07:00
Doug Coleman 5836634922 Rename echo benchmark to udp-echo. Rename file-server benchmark to tcp-echo. Add more benchmarks for different loads. 2011-10-17 10:25:28 -07:00
Doug Coleman 98979fc51c Remove initializers from extra/constructors, add C:-like form that requires a stack effect 2011-10-17 10:25:27 -07:00
Doug Coleman f21fee3b73 Rename complete-effect to scan-effect 2011-10-17 10:25:27 -07:00
John Benediktsson 54e075c76c lint: fix unit tests. 2011-10-17 10:15:48 -07:00
Doug Coleman db1d499a6f Fix typo in tools.deploy.windows.ico 2011-10-16 23:06:11 -07:00
John Benediktsson 3582e9c168 More lint fixes. 2011-10-16 21:23:21 -07:00
John Benediktsson 4919339721 project-euler.150: 20% faster. 2011-10-16 21:21:07 -07:00
John Benediktsson 81714b8dc3 More lint cleanups. 2011-10-16 19:33:16 -07:00
John Benediktsson 45aeea52ce lint: filter a bit better. 2011-10-16 19:32: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 ea4240cea0 lint: cleanup, deep compare, print clickable words. 2011-10-16 13:01:36 -07:00
John Benediktsson 6f1c44b46d Cleanup some lint warnings. 2011-10-15 19:19:44 -07:00
John Benediktsson df2000d8e7 random.blum-blum-shub: fix tests for recent random-integer change. 2011-10-15 10:39:16 -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 d773d99de5 benchmark.splay: adding a splay-tree benchmark. 2011-10-14 18:10:49 -07:00
John Benediktsson ce1d69aa0a trees.splay: fix delete-at. 2011-10-14 17:52:24 -07:00
John Benediktsson 7d31da68b8 debugger: remove double namespace using. 2011-10-14 15:45:31 -07:00
John Benediktsson dc06efe2a4 webapps.mason: redirect index to dashboard. Fix #178. 2011-10-14 15:43:38 -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
Joe Groff 9894a6ade5 continuations: document full effect of cleanup
We can't yet apply the effect because of #138 but we can at least document it.
2011-10-14 14:45:21 -07:00
John Benediktsson cc49bbfb27 math.bitwise: bits is clearer this way. 2011-10-14 13:54:08 -07:00
John Benediktsson 4fb66c0f05 brainfuck: cleanup. 2011-10-14 13:53:55 -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
Joe Groff f8ec85fd06 kernel: higher-order effects for *keep 2011-10-14 10:45:02 -07:00
Doug Coleman 933319f401 Cleanups found with lint tool 2011-10-14 10:15:13 -07:00
Doug Coleman e563824cd2 Don't report aliases as having a duplicate word definition as the word they alias in lint. 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