Slava Pestov
527db8995a
Specialized array overhaul
...
- Replace hand-written specialized-arrays.* subvocabularies with new system; instead of USE:ing specialized-arrays.T, do SPECIALIZED-ARRAY: T
- Ditto for specialized-vectors; use SPECIALIZED-VECTOR:
- io.mmap.functor: removed entirely, use <mapped-array> instead
- struct-arrays and struct-vectors have been removed because specialized arrays and vectors subsume them entirely
2009-09-09 22:33:34 -05:00
Slava Pestov
0b35d79aee
compiler.tree.propagation.call-effect: stronger call( inlining; now can inline 'a [ b ] curry call(' where 'a' is literal, [ b ] doesn't infer, but [ a b ] does infer. This simplifies classes.struct:memory>struct
2009-09-07 17:45:03 -05:00
Slava Pestov
430f4a83f9
specialized-arrays.direct is no more; instead, every specialized-array.<foo> vocabulary has a <direct-T-array> constructor
2009-09-04 22:01:55 -05:00
Joe Groff
7a429a530e
forget the old struct class when redefining a struct class so the old accessors get purged
2009-09-03 11:12:58 -05:00
Joe Groff
f58abdcea2
put a more useful mirror over structs
2009-08-31 22:26:03 -05:00
Doug Coleman
9ae457d499
make-mirror method on structs. fix typo on struct-slots stack effect. don't filter initial values in struct>assoc because structs are more low-level and you want to see the entire layout of the struct you're working with, imo.
2009-08-31 18:51:47 -05:00
Joe Groff
57ed942dfa
hashcode* for structs
2009-08-31 10:51:45 -05:00
Joe Groff
d5516991bf
oops—fix STRUCT: functor
2009-08-30 22:40:18 -05:00
Joe Groff
69f258c521
refactor struct slot parsing so that there's a <struct-slot-spec> word for easily constructing struct slots outside classes.struct
2009-08-30 22:37:37 -05:00
Joe Groff
486f04607c
Merge branch 'master' of git://factorcode.org/git/factor
2009-08-30 21:14:33 -05:00
Slava Pestov
29374bb1d9
classes.struct: add more unit tests for clone method, and fix clone breakage when the struct class word is not a symbol
2009-08-30 21:01:44 -05:00
Joe Groff
4fb204b00e
likewise, an S@ word for structs
2009-08-30 20:46:31 -05:00
Slava Pestov
57add8aa9f
classes.struct: make <struct>, malloc-struct, and clone work in deployed images where C type info has been stripped out
2009-08-30 20:13:54 -05:00
Joe Groff
77eeb3e5a9
fix alien.complex unboxer
2009-08-29 23:18:31 -05:00
Joe Groff
2156abac58
privatize classes.struct's shameful bits
2009-08-29 22:59:13 -05:00
Joe Groff
3a7e6b157f
implement clone on struct classes to copy the struct contents
2009-08-29 22:54:56 -05:00
Joe Groff
400e01d390
change malloc-struct to initialize struct from initial values; add (malloc-struct) and (struct) words that leave their memory uninitialized
2009-08-29 22:40:13 -05:00
Joe Groff
a0f96f3d55
refactor functors so that new functor syntax words can be added outside of functors vocab, and move STRUCT: functor syntax to classes.struct to break a circular dependency
2009-08-29 21:04:19 -05:00
Joe Groff
2203b0c9fa
use calloc in malloc-struct for consistency with malloc-object and malloc-array
2009-08-29 17:17:25 -05:00
Joe Groff
5cd24e5002
support { type dimension } c-type syntax in STRUCT: definitions
2009-08-27 21:39:43 -05:00
Joe Groff
5cc1ce3d8a
throw a friendlier error when attempting to create a struct without slots
2009-08-26 22:37:59 -05:00
Joe Groff
f28b6ccf68
make struct-prototype foldable so that <struct> compiles efficiently
2009-08-26 21:27:12 -05:00
Joe Groff
629e8bc89b
add a partial eval for memory>struct so that it compiles efficiently when the struct class is known
2009-08-26 21:18:19 -05:00
Joe Groff
8dbd25b6cd
fix struct-array of struct class; inline memory>struct so the compiler can optimize a little better
2009-08-26 19:20:20 -05:00
Joe Groff
3bb895dcdf
bitwise equal? for struct objects
2009-08-26 18:05:38 -05:00
Joe Groff
e9a0c96563
box elements of struct-arrays when a struct class is used as the element type
2009-08-26 17:19:30 -05:00
Joe Groff
1bab289258
move classes.struct from extra to basis
2009-08-26 15:55:01 -05:00