Commit Graph

48 Commits (f7573bf329304d28f7cf18889ee089cfb0900e17)

Author SHA1 Message Date
Slava Pestov d450d12b2b 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 72dfb3339f classes.struct: make hashcode and equal? work on structs wrapping null pointers, to fix another obscure issues arising with tuple arrays 2010-08-06 00:15:22 -07:00
Slava Pestov 7d64fe50a1 classes.struct: remove conflict marker from unit tests 2010-06-22 14:35:49 -04:00
Doug Coleman ec2b8da7c7 conflicts 2010-06-16 16:23:29 -05:00
Joe Groff 6e9235b54b classes.struct: fix some bugs in binary-zero?, add unit tests 2010-06-16 16:23:29 -05:00
Joe Groff c8ea7ed0c7 alien.data: make binary-zero? public and move it from classes.struct.private 2010-06-10 17:05:43 -07:00
Joe Groff e84b2e8c60 classes.struct: fix some bugs in binary-zero?, add unit tests 2010-06-10 16:49:59 -07:00
Joe Groff b5cc5ef4a7 classes.struct: implement "group-words" method on struct-class so that struct classes can be used as a CONSULT: protocol 2010-06-08 12:52:46 -07:00
Slava Pestov de8e0ccd5c alien.c-types: cleanup 2010-05-04 19:33:55 -04:00
Slava Pestov 3c11991843 classes.struct, specialized-arrays: fix unit tests to work when forget-tests? is on 2010-04-12 18:29:47 -07:00
Joe Groff f2999ce778 classes.struct: raise an error in STRUCT: if there are duplicate slot names 2010-02-25 11:52:21 -08:00
Joe Groff 4cfa1a6c77 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
Joe Groff 5b726f0af9 add missing using to classes.struct tests 2010-02-21 22:04:23 -08:00
Joe Groff 5955ba06df use a "pointer" wrapper tuple to indicate pointer types instead of the current slipshod approach 2010-02-21 16:27:36 -08:00
Joe Groff 9b0530dc97 remove string c-types from classes.struct tests 2010-02-21 13:01:29 -08:00
Joe Groff 62e97c138a ditch string c-types 2010-02-21 10:58:21 -08:00
Slava Pestov 01824d41be Add support for final tuple classes which cannot be subclassed: TUPLE: foo ... ; final 2010-02-18 02:19:57 +13:00
Slava Pestov 0612bc6177 Factor source files should not be executable 2009-11-21 17:50:43 -06:00
Slava Pestov e9a7191050 Fix struct field alignment on PowerPC 2009-11-10 19:34:14 -06:00
Daniel Ehrenberg 1a2c137e41 Refactoring bitfields to not use number tower 2009-10-07 21:35:12 -05:00
Daniel Ehrenberg e0408b9b10 Adding bit fields to STRUCT: 2009-10-07 01:43:32 -05:00
Doug Coleman 5cb34724b7 Merge branch 'master' of git://factorcode.org/git/factor
Conflicts:
	basis/classes/struct/struct-tests.factor
	basis/functors/functors-tests.factor
	basis/specialized-arrays/specialized-arrays-tests.factor
2009-09-20 23:02:49 -05:00
Doug Coleman eceed177d6 replace usages of <" with """ 2009-09-20 22:42:40 -05:00
Joe Groff 076ab42dc3 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
Joe Groff 93b12d3ef4 update classes.struct tests to use word c-types 2009-09-15 22:43:11 -05:00
Joe Groff 3b4330fcf6 get things to a point where they bootstrap again 2009-09-15 21:43:18 -05:00
Joe Groff 3c541f736f fix failing classes.struct tests 2009-09-15 19:10:05 -05:00
Joe Groff 4d16c569f0 struct classes now make their own C type without help from alien.structs. remove alien.structs dependencies from everywhere outside of alien and compiler, and have the FFI handle both alien.structs and classes.struct c-types 2009-09-15 17:38:49 -05:00
Slava Pestov d5bc1ceca2 classes.struct: fix some bugs
- STRUCT: foo<ENTER> in listener threw an error
- S{ did not throw an error when used with non-struct types
- attempting to subclass a struct class now fails
- forgetting a struct class now removes the corresponding C type
- 'see'ing a struct class now indents correctly
2009-09-10 15:59:27 -05:00
Slava Pestov 7f2e2b1777 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 a1ae209f81 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 1798000335 Fix unit tests for specialized-arrays.direct change 2009-09-05 02:26:06 -05:00
Slava Pestov a054ec3d64 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 d893f3cdb7 put a more useful mirror over structs 2009-08-31 22:26:03 -05:00
Joe Groff 4cbd4d4b5c update classes.struct tests, and make struct prettyprinting work again 2009-08-31 20:46:33 -05:00
Joe Groff 43f81d3835 hashcode* for structs 2009-08-31 10:51:45 -05:00
Joe Groff 509ed99c79 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 5d56e16188 Merge branch 'master' of git://factorcode.org/git/factor 2009-08-30 21:14:33 -05:00
Slava Pestov e918e9cddc 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 82025bde30 likewise, an S@ word for structs 2009-08-30 20:46:31 -05:00
Joe Groff 20aa00f8df implement clone on struct classes to copy the struct contents 2009-08-29 22:54:56 -05:00
Joe Groff 3e51bde484 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 80a5bf7138 support { type dimension } c-type syntax in STRUCT: definitions 2009-08-27 21:39:43 -05:00
Joe Groff 69e640c55b throw a friendlier error when attempting to create a struct without slots 2009-08-26 22:37:59 -05:00
Joe Groff 64990eb23d test that array slots in structs optimize down 2009-08-26 21:50:12 -05:00
Joe Groff ecd0bdbd58 test that struct-arrays and struct construction optimize down 2009-08-26 21:38:00 -05:00
Joe Groff f4c90fdabe bitwise equal? for struct objects 2009-08-26 18:05:38 -05:00
Joe Groff 784b8c04ce move classes.struct from extra to basis 2009-08-26 15:55:01 -05:00