Commit Graph

170 Commits (3df54221518a53938d6ae09bbf312f677364b4a6)

Author SHA1 Message Date
Slava Pestov f8d80faed3 Add 1sequence word. Add unit tests for existing 1vector and 1byte-array words, and make them use 1sequence 2009-02-04 05:13:12 -06:00
Doug Coleman 3c408342ef renaming: contain? -> any?, deep-contains? -> deep-any?, pad-left -> pad-head, pad-right -> pad-tail, trim-left -> trim-head, trim-right -> trim-tail 2009-01-29 22:19:07 -06:00
Slava Pestov f34c14a0f5 Remove some usages of tuck 2009-01-23 18:20:47 -06:00
Slava Pestov 1c6df27d3c Minor documentation fixes 2009-01-21 00:45:23 -06:00
Doug Coleman 66f5694462 document more core/ words 2009-01-17 22:15:57 -06:00
Slava Pestov 94292d1791 Move monotonic? unit tests to grouping 2009-01-15 15:37:30 -06:00
Slava Pestov 1f0c01183e Re-implement monotonic? without using rot 2009-01-15 15:24:46 -06:00
Doug Coleman f4cffe8a1b move iota to sequences, fix example, add unit tests, make iota's slot integers only 2009-01-10 13:05:25 -06:00
Slava Pestov 6959f445c4 Merge branch 'master' of git://factorcode.org/git/factor 2009-01-09 22:26:49 -06:00
Slava Pestov a977691d82 Add iota virtual sequence which will eventually replace integers-as-sequences 2009-01-09 21:35:49 -06:00
Doug Coleman 5ae9c7fe2f document 3each, 3map, 3map-as 2009-01-09 20:35:01 -06:00
Slava Pestov af49278d3f Add 2tri* and 2tri@ combinators, clean up (3each), and fix failing unit test for 3map 2009-01-05 18:12:34 -06:00
Slava Pestov 7b110b0bfd Move 3each, 3map from compiler.utilities to sequences 2009-01-05 17:32:08 -06:00
Samuel Tardieu 0182a3430d Allow sigma and friends to use the stack
"sigma" used to use the stack to remember the current total.
This prevented the use of quotations manipulating elements
that were expecting to be on the stack.

This patch hides the counter while executing the quotation,
so that the latter can fully use the stack.
2008-12-27 21:39:32 +01:00
Slava Pestov 63fda570bf Fixing assorted compile errors and help lint warnings 2008-12-16 01:12:36 -06:00
Slava Pestov 400b2a0ccb Add declaration to from-end 2008-12-15 21:34:25 -06:00
Slava Pestov de3a4f5462 Change some dup ... swap to bi and keep 2008-12-15 21:20:32 -06:00
Slava Pestov daf2857d7b define-inline now takes an effect parameter
C: now sets the stack effect of the new word to slot names
add new basis/constants vocab; CONSTANT: foo bar is equivalent to : foo bar ; inline
(going to fold CONSTANT:, ALIAS: and qualified into core soon perhaps)
tighten the screws: inline words now need a stack declaration too
update some usages of inline words
2008-12-15 19:44:56 -06:00
Slava Pestov e6145c71c0 Change a -rot usage to 2dip 2008-12-10 17:26:54 -06:00
Slava Pestov 2a3db4cd23 Minor optimization to flip 2008-12-09 21:50:31 -06:00
Slava Pestov ec23584f48 Finish up O(1) byte array allocation 2008-12-09 18:17:04 -06:00
Slava Pestov d9231f3bc5 Remove unsafe string allocation, since its of dubious value 2008-12-09 17:53:00 -06:00
Slava Pestov eb79c6ab71 Fix conflict 2008-12-09 17:52:45 -06:00
Slava Pestov d1744fd67a Remove cache-nth word, nobody was using it and the semantics were broken 2008-12-07 08:51:22 -06:00
Slava Pestov 145b635eb6 More optimization intended to reduce compile time. Another 10% speedup on compiling empty PEG parser
- new map-flat combinator replaces usages of 'map flatten' in compiler
- compiler.tree.def-use.simplified uses an explicit accumulator instead of flatten
- compiler.tree.tuple-unboxing uses an explicit accumulator instead of flatten
- fix inlining regression from last time: custom inlining results would sometimes be discarded
- compiler.tree's 3each and 3map combinators rewritten to not use flip
- rewrite math.partial-dispatch without locals (purely stylistic, no performance increase)
- hand-optimize flip for common arrays-of-arrays case
- don't run escape analysis and tuple unboxing if there are no allocations in the IR
2008-12-06 11:17:19 -06:00
Slava Pestov 908644ee7a O(1) <sbuf> and new-sequence on byte-arrays (work in progress) 2008-12-05 07:28:52 -06:00
Doug Coleman fd270d8ef2 add surround and glue to sequences 2008-12-03 08:32:54 -06:00
Slava Pestov f675223873 Minor optimization in unclip-slice 2008-11-29 10:38:43 -06:00
Slava Pestov a4d9cdfeb3 Refactor all usages of >r/r> in core to use dip, 2dip, 3dip
Non-optimizing compiler now special-cases dip, 2dip, 3dip following a
literal quotation: this allows us to break the dip/slip meta-circle
without explicit calls to >r/r>
2008-11-23 02:44:56 -06:00
Slava Pestov dd6f9bced5 Rename (append) to append-as, (3append) to 3append-as, take them out of private 2008-11-23 01:01:04 -06:00
Slava Pestov d504d6b8de slice-errors now report the parameters to the slicing operation 2008-11-21 21:00:30 -06:00
Slava Pestov acc1dc23fa More usages of $quotation 2008-11-16 09:08:38 -06:00
Slava Pestov 9bf63b1613 New $quotation markup element 2008-11-16 09:03:30 -06:00
Slava Pestov 1d630b6cf2 Minor documentation fixes 2008-11-11 10:51:15 -06:00
Doug Coleman a71ca7242a fix typo in docs, fix load error 2008-10-19 13:34:00 -05:00
Slava Pestov adb0ada7ae Add delq, filter-here 2008-10-19 03:34:58 -05:00
Slava Pestov c19f2257f4 Fix permission bits 2008-10-02 08:34:49 -05:00
Slava Pestov 28d3654f61 Small ricing 2008-10-02 06:47:20 -05:00
Slava Pestov f5acf7e3d6 Rice 2008-09-27 17:54:44 -05:00
Slava Pestov 9a6408623b More doc fixes 2008-09-23 16:19:32 -05:00
Slava Pestov 0f284816c1 Fix docs 2008-09-19 16:37:27 -05:00
Doug Coleman 0967d85f85 document the rest of the interesting words in sequences 2008-09-17 18:38:32 -05:00
Doug Coleman affc0b4830 move some words to private, make stack effects for slices contain explicit -slice 2008-09-17 18:37:57 -05:00
Doug Coleman de68e712e9 more docs 2008-09-17 09:43:18 -05:00
Doug Coleman a946d334df add virtual sequences docs 2008-09-17 09:16:26 -05:00
Doug Coleman af9e85550e document remove-nth 2008-09-15 10:07:13 -05:00
Doug Coleman 50db52fb17 Merge branch 'master' of git://factorcode.org/git/factor 2008-09-14 09:45:46 -05:00
Doug Coleman 0aa4000c46 more docs 2008-09-14 09:45:26 -05:00
Slava Pestov 0e31b23964 Fix typo in example 2008-09-14 01:50:49 -05:00
Slava Pestov 20cc730501 Fix sequences tests 2008-09-12 18:57:34 -05:00