Commit Graph

221 Commits (882d7766f919aa229104dbfb1b9f8d68d1a74e39)

Author SHA1 Message Date
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
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 248b0df6fc Spelling fixes to documentation. 2011-08-26 16:20:31 -07:00
Keita Haga 2c324b14df In several documentation, remove whitespace before or after the colon or period 2011-02-10 01:51:13 +09:00
Slava Pestov f9ef26a910 math.vectors.simd: docs mention obsolete 'test-mr mr.' words 2010-08-20 18:00:03 -07:00
Slava Pestov 7fe6721993 math.matrices: move normal word from gpu.demos.bunny and reverse sign 2010-07-23 20:41:08 -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
Joe Groff 19727f8ca5 math.vectors.simd.cords: add regression test for >A 2010-06-15 22:44:15 -07:00
Joe Groff 1f6070d48c math.vectors.simd.cords: use head-slice/tail-slice to slice up input sequences for >A op so that e.g. float-4{ ... } >double-4 works 2010-06-15 21:55:26 -07:00
Slava Pestov f16e660805 mirrors: rename enumerated-sequence to inspected-sequence 2010-06-11 17:14:15 -04:00
Joe Groff 45e635fa4e math.vectors.simd.intrinsics: use unrolled loops for some software fallbacks 2010-05-24 18:39:06 -07:00
Joe Groff 7027838fda math.vectors.simd.intrinsics: remove call( -- ) wrapper from fallbacks 2010-05-24 12:58:14 -07:00
Joe Groff bceec9daeb math.vectors.simd.intrinsics: use <direct-X-array> instead of X-array-cast to construct view over fallback byte-arrays to avoid redundant array size checking 2010-05-23 23:18:02 -07:00
Joe Groff 9977f66c01 math.vectors.simd.intrinsics: wrap intrinsic fallback bodies in call( -- ) so we can abuse macros in their normally-inlined bodies 2010-05-23 22:39:44 -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 40f58f27d6 specialized-arrays: rename byte-array>T-array to T-array-cast, and make it work with anything that responds to >c-ptr / byte-length 2010-05-18 23:09:34 -04:00
Slava Pestov f70d89b145 Fixing fallout from sequences.generalizations change 2010-05-18 22:59:07 -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
Joe Groff 40c75a996e math.vectors.simd.intrinsics: fix scalar fallback for (simd-vshuffle2-elements) 2010-05-14 02:47:39 -07:00
Joe Groff 349397e67c math.vectors, math.vectors.simd: add user-facing vshuffle2 word 2010-05-14 02:47:05 -07:00
Joe Groff f202c97b52 math.vectors.simd.intrinsics: (simd-vshuffle2-elements) intrinsic that creates a vector by selecting elements from two input vectors. use ##shuffle-vector-halves-imm to implement for double-2s with SSE 2010-05-14 01:16:29 -07:00
Slava Pestov 4ad32f53fe math.vectors.simd.cords: implement new-sequence and like methods on cords to make cross product work 2010-05-13 21:55:19 -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 e70c09c690 compiler.cfg.linear-scan.assignment: spill slot representation logic was backwards, just like Factor 2010-05-03 17:34:29 -04:00
Slava Pestov 4ae41d4032 math.vectors: (vmerge) shouldn't be generic 2010-04-29 02:28:05 -04:00
Slava Pestov 92277b94b5 math.vectors.simd.cords: a dash of inline sauce 2010-04-29 01:58:56 -04:00
Daniel Ehrenberg d9878f81d7 Changing require-when usages to the new syntax for require-when 2010-04-18 14:29:24 -05:00
Daniel Ehrenberg e9991a62fb Making more vocabs use require-when 2010-03-18 01:39:30 -04: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
Slava Pestov 7a995794e2 Make specialized arrays and SIMD types final so that typed can unbox them 2010-02-18 02:39:40 +13:00
Slava Pestov 974074d089 A few documentation fixes 2010-02-17 00:05:36 +13:00
Slava Pestov 0cbf9c9b50 Move compile-call and related words only meant to be used for debugging to compiler.test 2010-01-23 00:39:56 +13:00
Slava Pestov 98f3eae5fe Fix performance regression in vector ops on specialized arrays, tweak definition of <slice> and 2map-reduce to generate fewer conditionals 2010-01-19 17:48:10 +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
Slava Pestov 005db61ad6 Rework min and max so that behavior with floats and NaNs is consistent between generic arithmetic and open-coded float intrinsics 2010-01-13 22:20:16 +13:00
Joe Groff d6c1137115 move simd operation methods onto simd-128 instead of concrete classes to save image space 2009-12-05 21:19:17 -08:00
Joe Groff 82bb560b00 Merge branch 'master' of git://factorcode.org/git/factor 2009-12-05 17:18:49 -08:00
Joe Groff 1ad9dc14b4 fix simd tests 2009-12-05 17:17:16 -08:00
Joe Groff c09b20fdf5 add v*high, v*hs+, vsad, and vavg to simd fuzz tests 2009-12-05 15:42:41 -08:00
Joe Groff 5d911d41f5 missing USING:s 2009-12-05 15:38:57 -08:00
Slava Pestov 9e5c44dd11 math.vectors.simd: ensure that set-alien-vector is open-coded in the actual set-nth-unsafe method on SIMD specialized arrays, not just inlined instances 2009-12-05 18:20:57 -05:00
Joe Groff d674ff8191 simd intrinsic implementation for v*high, v*hs+, vavg, and vsad 2009-12-05 14:52:18 -08:00
Joe Groff c7f4284710 add v*high, v*hs+, vavg, and vsad operations to math.vectors 2009-12-05 11:32:31 -08:00
Joe Groff c23e3eb4ef move sequence instance to individual SIMD types rather than simd-128 parent type so that "hashcode*" doesn't attempt to use the sequence implementation of hashcode on abstract simd-128 objects 2009-12-04 13:22:59 -08:00
Joe Groff c72a3c452b update math.vectors docs for simd changes 2009-12-04 13:21:18 -08:00
Joe Groff ea7c5b6d86 fix buggy simd intrinsics 2009-11-26 13:28:40 -08:00
Joe Groff 6757c85189 remove SIMDS: 2009-11-26 11:15:46 -08:00
Joe Groff da394d42c3 "norm" doesn't need to be generic, "norm-sq sqrt" always works 2009-11-26 11:15:35 -08:00
Joe Groff 4f10afa3e9 trick math.vectors.simd into making nicer quotations 2009-11-25 20:24:09 -08:00