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
5efc763629
alien.parser: make int[3]* parse, make int[3][4 not parse
2010-08-15 02:37:17 -07:00
Slava Pestov
af977e1f0c
alien.parser: array types where the base type was a pointer didn't parse (reported by Dmitry Shubin)
2010-08-15 02:32:12 -07:00
Slava Pestov
8746ce1851
alien.prettyprint: fix unit test snafu
2010-08-11 21:52:37 -07:00
Joe Groff
e5080c0da4
alien.c-types: classify typedefs of array/string types as typedef-words so they prettyprint correctly
2010-08-11 10:03:19 -07:00
Slava Pestov
a86981cbde
alien.prettyprint: fix test failure
2010-07-29 21:09:05 -04:00
Slava Pestov
fcf597e8ca
alien.syntax: FUNCTION: and FUNCTION-ALIAS: now define inline words
2010-07-28 03:05:14 -04:00
Slava Pestov
0abdfbfc1b
compiler.cfg: open-code parameter boxing and unboxing for certain C types
2010-07-19 10:25:13 -04: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
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
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
daaabbff8f
alien.prettyprint: fix wrapping when prettyprinting pointer:
2010-06-02 03:11:46 -04:00
Slava Pestov
e88c426390
alien.prettyprint: fix prettyprinting of array types and CALLBACK: (reported by Anton Gorenko)
2010-05-30 16:21:43 -04: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
838ffe3e09
alien.c-types: make a couple of words private
2010-05-18 22:34:42 -04:00
Slava Pestov
50b43806e8
alien.libraries, stack-checker.alien: check user inputs more carefully to ensure that invalid ABI descriptors don't slip through and break random stuff (reported by prunedtree)
2010-05-18 18:46:31 -04:00
Slava Pestov
c0f39aa99d
Move remaining sequence operations from generalizations to sequences.generalizations where they belong
2010-05-18 18:36:47 -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
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
Joe Groff
adcdc5a45e
use word-props instead of singletons for enum>number conversion so there's not a big fat generic making the image buy another plane ticket
2010-04-21 22:22:06 -07:00
Joe Groff
00e4503982
doll up ENUM: docs
2010-04-21 21:33:04 -07:00
Doug Coleman
9145e897b5
Fix alien.enum docs
2010-04-21 21:32:33 -05:00
Joe Groff
970df56056
alien.enums: make enum>number foldable so it optimizes constant enums to constant ints, make number>enum a macro so it doesn't use c-type metadata at runtime
2010-04-20 17:05:14 -07:00
Erik Charlebois
79b61d8393
Use generic word for enum>number. Tests and documentations.
2010-04-19 20:08:40 -07:00
Erik Charlebois
d44e470416
Remove ENUM: f and replace uses with CONSTANTs.
...
Fix bootstrap and load-all errors from enum classes.
2010-04-19 20:08:40 -07:00
Joe Groff
fc7ed73f87
prettyprint ENUM: definitions
2010-04-19 20:07:18 -07:00
Joe Groff
e28882bf59
add alien.enums vocab with enum-c-types that convert between symbols and integer values in the FFI. update ENUM: to define symbolic enums, and take an optional base type
2010-04-19 20:07:18 -07:00
Joe Groff
d439ad0b9f
alien.c-types: use CONSULT: to define c-type-protocol methods on c-type-name
2010-04-19 20:07:17 -07:00
Joe Groff
ff0c2c66f5
alien.parser, alien.syntax: send ENUM: body to parse-enum
2010-04-19 20:07:17 -07:00
Joe Groff
f2b158ca10
alien.parser: have define-enum handle the case when the enum name is f
2010-04-19 20:07:17 -07:00
Joe Groff
e84e18f2ca
alien.parser, alien.syntax: refactor ENUM: to separate parsing from definition
2010-04-19 20:07:17 -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
Joe Groff
b0cd256b0f
document FUNCTION-ALIAS:
2010-04-14 16:14:33 -07:00
Joe Groff
69a6dcd8c0
prettyprint FUNCTION-ALIAS: definitions
2010-04-14 12:40:10 -07:00
Joe Groff
e95edb1c47
alien.syntax: FUNCTION-ALIAS: syntax to define a C function binding with a different Factor name
2010-04-14 12:06:45 -07:00
Slava Pestov
baa04649ef
Move non-parsing words out of alien.syntax, and use a symbol instead of a string variable to store the current library in alien.parser
2010-04-12 18:09:26 -05:00
Slava Pestov
7d34ede7e3
Merge branch 'master' of git://github.com/erikcharlebois/factor
2010-04-10 18:01:19 -07:00
Erik Charlebois
9c2276b762
Change C-ENUM: to always take a type. Use f for anonymous enums. Update all uses.
2010-04-09 23:48:22 -07:00
Erik Charlebois
192d9d5659
Extend C-ENUM: to allow specifying the constant vvalues like in C. Add C-TYPED-ENUM: to automatically typedef a type.
2010-04-06 02:46:23 -07:00
Joe Groff
cd0ad27e46
update some more doc examples using old abi strings
2010-04-02 23:16:53 -07:00