Doug Coleman
117d57ad92
issue #358 : Rename all of the words depends-on-* to add-depends-on*
2012-06-21 08:35:45 -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
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
f6b54c50cc
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
Doug Coleman
acff4eee0c
Rename the STRUCT: point word to something else because it conflicts with other unit tests which define a point word in scratchpad. The struct point is redefined to a tuple point and causes the macro-expansion to error out now that structs are properly reset, so instead we just give it a unique name so it doesnt get redefined. Perhaps examples should define their own vocabularies instead of using scratchpad.
2011-10-03 17:13:20 -07:00
John Benediktsson
e47ae99a85
alien.data: need to mark ">c-array" inline.
2011-09-26 13:34:42 -07:00
John Benediktsson
0e3d598e69
specialized-arrays: performed some cleanup.
...
Specifically,
• Created >c-array to be replacement for >T-array.
• Created cast-array to be generic replacement for all T-array-cast words.
• Created c-array@ to be generic replacement for T-array@ words.
• Replaced usages of <T-array> with T <c-array>
• Replaced usages of <direct-T-array> with T <c-direct-array>
• Replaced usages of >T-array with T >c-array
• Replaced usages of T-array-cast with T cast-array
• Replaced usages of malloc-T-array with T malloc-array.
• Removed malloc-T-array.
• Removed T-array-cast.
• Removed T-array@.
• Removed >T-array.
I also added (but didn't change any code to use):
• T c-array-type, returns T-array
• T c-array?, returns T-array?
• c-array{ T ... }, returns T-array{ ... }
Bootstraps just find on Mac OS X. Also `load-all test-all` works for me.
2011-09-26 11:37:51 -07:00
John Benediktsson
01bd3439c6
alien.data: removing unused (and broken?) "require-c-array".
2011-09-23 13:15:09 -07:00
Slava Pestov
25fb472f73
Fix unit test failures caused by alien.data change
2010-12-25 22:34:12 -08:00
Slava Pestov
55fd15c45a
Move <ref>, deref and little-endian? from alien.c-types to alien.data, remove <c-object>
2010-12-25 16:55:36 -08:00
Slava Pestov
d865b366dd
Remove stream-peek and stream-peek1, re-implement dns vocab to not need this abstraction
2010-10-08 18:55:13 -07:00
Doug Coleman
1c344420ce
Implement and document stream-peek
2010-10-08 06:34:19 -07:00
Slava Pestov
1beb6d1653
alien.data: remove deprecated malloc-object word
2010-09-20 21:36:20 -07:00
Slava Pestov
206508e016
classes.struct: fields with a type that's an array of pointers (eg int*[3]) now work
2010-08-15 02:44:21 -07:00
Slava Pestov
cf6b910c9f
alien.data: remove second quotation parameter from with-out-parameters, now all values are copied properly and calling 'clone' on structs in this quotation is not necessary
2010-07-16 17:32:05 -04:00
Slava Pestov
4cec681146
alien.data: document with-scoped-allocation and with-out-parameters, and add initial: syntax
2010-07-16 17:13:38 -04:00
Slava Pestov
d877037c32
alien.data: fix unit test failure
2010-06-11 15:38:57 -04:00
Joe Groff
2ab97370da
alien.data: make binary-zero? public and move it from classes.struct.private
2010-06-10 17:05:43 -07:00
Slava Pestov
b8ec5c6176
Stack allocation improvements
...
- New with-out-parameters combinator
- Inhibit tail call optimization in frames with local allocation, to ensure that passing a stack allocated value to the last word in the quotation works
- local allocations are now aligned properly
- spill slots are now aligned properly aligned in frames which have parameter and local allocation areas
2010-05-22 02:37:00 -04:00
Slava Pestov
84e7076474
alien.data: add with-scoped-allocation combinator for stack-allocating C data
2010-05-19 00:33:36 -04:00
Slava Pestov
ae24eb8f97
alien.c-types: cleanup
2010-05-04 19:33:55 -04:00
Joe Groff
00e4503982
doll up ENUM: docs
2010-04-21 21:33:04 -07:00
Joe Groff
5aecd92c37
C-ENUM: -> ENUM:
2010-04-19 20:07:16 -07:00
Slava Pestov
28a9cf79ff
io.encodings: add a fast-path for ascii, utf8 and 8-bit encodings when string only contains ASCII characters
2010-04-19 01:14:00 -05:00
Joe Groff
482850c7d1
rearrange stuff in alien.arrays and alien.data to eliminate libc dependency from alien.arrays, and by extension, alien.syntax
2010-04-14 21:40:29 -07:00
Slava Pestov
64cbe8b80b
Document (free), move it out of libc.private and mention it in the "c-strings" help article (reported by Blei)
2010-03-30 17:32:51 -04:00
Slava Pestov
2dde82ffff
Slices over specialized arrays can now be passed to C functions, written to binary output streams, and given to malloc-byte-array
2010-02-25 04:50:31 +13:00
Slava Pestov
c1e7a3ffc2
Specialized arrays, structs and other objects responding to the >c-ptr / byte-length protocol can now be written to binary streams
2010-02-24 20:18:41 +13:00
Joe Groff
7ba1dcebf5
typo in alien.data docs
2010-02-23 12:20:47 -08:00
Joe Groff
96ab4492d2
rename current string-mangling "char*" to "c-string". char* is now just a boring old pointer to char
2010-02-23 11:42:02 -08:00
Slava Pestov
7714be60a9
Move platform-specific c-type initialization out of cpu.* vocabularies and into alien.c-types so that the vm vocabulary, which is loaded before cpu.*, will have correct struct offsets
2009-11-05 01:36:14 -06:00
Joe Groff
f9d22d0fab
delete malloc-file-contents 'cause it sucks and nobody likes it
2009-10-07 19:30:06 -05:00
Keith Lazuka
8f79ea91ba
docs: change $subsection to $subsections
2009-10-02 12:15:48 -04:00
Slava Pestov
ba029a88ff
io.mmap: fix obsolete tests and get code to inline better
2009-09-28 03:18:27 -05:00
Slava Pestov
1b26a1c87c
alien: improve documentation
2009-09-26 21:28:11 -05:00
Joe Groff
3613e6838c
update alien docs to talk about C types as words
2009-09-21 13:20:01 -05:00
Joe Groff
4a1422e7fe
move some allocation words that don't really have much to do with c types out of alien.c-types into a new alien.data vocab
2009-09-17 22:36:05 -05:00