Doug Coleman
b78fa2c9d9
Define reset-class for struct-classes, add unit tests. Fixes #206 .
2011-10-02 20:08:23 -07:00
Doug Coleman
94f3ca3b8c
Remove all non-core uses of (scan-token)
...
Add scan-datum
Add scan-number
Document more words
Fixes #225 .
2011-10-02 12:00:08 -07:00
Doug Coleman
300138eb4d
Refactor the lexer/parser to expose friendlier words for scanning tokens. The preferred top-level words now throw an exception on EOF.
...
CREATE -> scan-new
CREATE-CLASS -> scan-new-class
CREATE-WORD -> scan-new-word
CREATE-GENERIC -> scan-new-generic
scan -> (scan-token)
scan-token now throws on eof
(scan-word) returns word/number/f
scan-word now throws on eof
scan-word-name expects a non-number
Fixes #183 .
Fixes #209 .
2011-09-29 11:28:28 -07:00
Doug Coleman
ced1795a04
Fixes the symptom but not the problem. See bug #201 .
2011-09-26 17:32:34 -07:00
Doug Coleman
4c3418b3ee
Trim down a few using lists
2011-09-26 13:42:46 -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
9da1297c57
classes.struct: add test cases for see on structs.
2011-09-25 17:25:28 -07:00
John Benediktsson
1432d49feb
classes.struct: Fix prettyprint for PACKED-STRUCT. Fixes #162 .
2011-09-24 17:55:13 -07:00
Slava Pestov
eea41b6d17
Merge classes.struct.packed into classes.struct and remove duplication
2011-08-25 21:02:25 -07:00
Erik Charlebois
1ed2bc6231
32 and 64 bit Linux PPC support
2011-05-23 23:36:14 -04: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
bd473cb970
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
e935681743
Add a scan-token word which is like scan, except throws an error on EOF; document scan-object word; mention that scan-token/scan-object are preferred over scan/scan-word
2010-07-06 16:20:08 -04:00
Slava Pestov
c7e5055eb3
classes.struct: remove conflict marker from unit tests
2010-06-22 14:35:49 -04:00
Doug Coleman
2403486156
conflicts
2010-06-16 16:23:29 -05:00
Joe Groff
99bc1b483e
classes.struct: fix some bugs in binary-zero?, add unit tests
2010-06-16 16:23:29 -05: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
Joe Groff
7e0ade0972
classes.struct: fix some bugs in binary-zero?, add unit tests
2010-06-10 16:49:59 -07:00
Joe Groff
e45373d1ce
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
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
35bd2bca06
FFI rewrite part 5: return value boxing and callback parameter boxing now uses vregs; simplify return value unboxing
2010-05-16 03:43:23 -04:00
Slava Pestov
5a102c717d
Eliminate compiler.alien
2010-05-11 23:24:47 -04:00
Slava Pestov
b92c67fc2c
Move flatten-c-type to death row so that it can be executed in part 5
2010-05-11 22:26:31 -04:00
Slava Pestov
5054bb4b25
FFI rewrite part 4: parameter and return value unboxing redesign
2010-05-11 19:11:44 -04:00
Slava Pestov
3d66820344
FFI rewrite part 1: split up ##alien-invoke and friends into smaller instructions
2010-05-09 21:36:52 -04:00
Slava Pestov
d2d466de29
Language change: tuple slot setter words with stack effect ( value object -- ) are now named FOO<< instead of (>>FOO)
2010-05-06 17:21:02 -04:00
Slava Pestov
7e8add87fe
More FFI cleanups
2010-05-05 01:13:45 -04:00
Slava Pestov
ae24eb8f97
alien.c-types: cleanup
2010-05-04 19:33:55 -04:00
Daniel Ehrenberg
4cf75e97b5
Documenting bitfields in structs
2010-04-25 18:09:58 -05:00
Daniel Ehrenberg
d9878f81d7
Changing require-when usages to the new syntax for require-when
2010-04-18 14:29:24 -05:00
Slava Pestov
f733693ec7
classes.struct, specialized-arrays: fix unit tests to work when forget-tests? is on
2010-04-12 18:29:47 -07:00
Daniel Ehrenberg
f2f80dadc7
Updating code to use require-when rather than vocab [ require ] when
2010-03-18 01:13:37 -04:00
Joe Groff
0f34795200
classes.struct: raise an error in STRUCT: if there are duplicate slot names
2010-02-25 11:52:21 -08: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
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
Joe Groff
9a79427f00
classes.struct: reader-quot was checking struct-slot-spec for array-ness, not the type! derp
2010-02-22 23:57:10 -08:00
Joe Groff
4875169d0c
alien.arrays/classes.struct: ensure specialized array types for struct array slots get instantiated at parse time
2010-02-22 12:21:29 -08:00
Joe Groff
21936bfe20
classes.struct: set dependency on slot types in slot accessors, so that accessors update when types change. enables pointers to make circular references between struct types
2010-02-21 22:46:52 -08:00
Joe Groff
4d89097467
add missing using to classes.struct tests
2010-02-21 22:04:23 -08:00
Joe Groff
64e6f08b59
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
75359a59d5
remove string c-types from classes.struct tests
2010-02-21 13:01:29 -08:00
Joe Groff
866f6ada18
ditch string c-types
2010-02-21 10:58:21 -08:00
Slava Pestov
1100861204
Add support for final tuple classes which cannot be subclassed: TUPLE: foo ... ; final
2010-02-18 02:19:57 +13:00
Slava Pestov
03a74f2237
classes: If a tuple class with subclasses is redefined into something that's not a tuple class, subclasses are changed to inherit from 'tuple' instead of being forgotten. Also, changing the metaclass of a union or intersection member no longer removes it from the union or intersection. Finally, make some internal words private
2010-02-01 02:48:39 +13:00
Doug Coleman
7521807b55
random is generic now -- iota random -> random
2010-01-14 12:48:57 -06:00
Slava Pestov
880fb747fc
Removing integers-as-sequences
2010-01-15 07:15:33 +13:00
Joe Groff
ebcaaa0d64
Merge branch 'master' into simd-cleanup
2009-11-26 16:14:46 -08:00
Slava Pestov
08b6ebc7fa
Factor source files should not be executable
2009-11-21 17:50:43 -06:00
Slava Pestov
d6c1fed06c
classes.struct: compute slot offsets before alignment to fix struct size problem on PPC
2009-11-19 19:34:46 -06:00
Joe Groff
993631e44c
Merge branch 'master' of git://factorcode.org/git/factor into simd-cleanup
...
Conflicts:
basis/math/vectors/simd/functor/functor.factor
2009-11-14 21:02:39 -06:00