Doug Coleman
05b48364c6
factor: Working on making locals-everywhere, array literals constructed
...
by ``output>array``, and fry with arrays.
We need to expand macros before doing the locals transform ``rewrite-closures`` and fry needs to happen in the locals pass because the locals pass touches the retainstack as part of the transform and we only want to do this once. We defer fry by making a <fryable> which rewrite-closures transforms.
Fixes things like the following that used to break because the locals
transform happened before fry.
::: bar ( a b -- a ) '[ |[ a | a _ + ] call ] call ;
Also we can use fry in case/cond now since macro-expansion happens
first.
Things like this work:
::: foo ( a b c -- a ) :> ( a b c ) c q{{ a b c a b + c _ }} ;
1 2 4 foo ...
{ 1 2 4 3 4 4 }
Triple colon will become colon soon.
Finally, there is a potential issue with macros changing the order of
fry underscore expansion since fry happens later. We need to rewrite fry
internally as 0_ 1_ 2_ so order is preserved everywhere in the expanded
macro.
2020-03-12 17:06:15 -05:00
Doug Coleman
25a8cedcb8
modern: more syntax fixes
2019-10-20 17:59:49 -05:00
Doug Coleman
08a09f70ff
Merge remote-tracking branch 'origin/master' into modern-harvey3
2019-04-07 10:32:28 -05:00
John Benediktsson
d248f2452e
combinators: faster hashcode for byte-arrays.
2019-04-05 16:55:10 -07:00
Doug Coleman
8c3df2ede4
core: Remove some foo'bar words and a lot of postpone:
2018-08-09 21:59:15 -04:00
Doug Coleman
4c164b1ae6
factor: change some spacing with ; on its own line
2018-03-19 00:03:27 -05:00
Doug Coleman
a2e8fb9050
Merge remote-tracking branch 'origin/master' into modern-harvey2
2018-02-18 11:29:09 -06:00
John Benediktsson
bd9676e152
core/basis/extra: use none?.
2018-02-14 11:56:31 -08:00
Cat Stevens
08b55b6a62
core/combinators docs: fix unclearness in case help
2018-02-14 07:41:22 -08:00
Doug Coleman
43628c8340
core: Move more things to core.
...
Tricky things:
f props>> == @ _ are not defined in syntax
2017-11-24 18:42:30 -06:00
Doug Coleman
3aa096e2e5
docs: Update docs.
2017-08-31 21:21:14 -05:00
Doug Coleman
88e772ef17
docs: postpone: \foo
2017-08-31 21:21:13 -05:00
Doug Coleman
c436f6dbad
factor: char: postpone: color: hexcolor: flexhexcolor: decimal:
2017-08-31 21:21:13 -05:00
Doug Coleman
e189954ecc
core: Rename iota to <iota> so we can have TUPLE: iota ... ; instead of TUPLE: iota-tuple ... ;
2017-06-02 11:57:05 -05:00
Alexander Iljin
acd22d1218
combinators-docs: fix wording
2016-07-30 09:25:30 -07:00
Doug Coleman
c133c16377
core: Trim using lists from -tests and clean up a few irregularities.
2016-03-30 18:43:41 -07:00
John Benediktsson
ceb75057da
change ERROR: words from throw-foo back to foo.
2015-08-13 16:13:05 -07:00
Doug Coleman
c21a154056
core: callstack is a builtin type and a class name. rename the *stack words that grab the current stack get-foostack to avoid the callstack builtin conflict and for better symmetry with set-foostack.
2015-08-13 10:11:59 -07:00
Doug Coleman
02008979d9
factor: Change ERROR: foo ; to define ``throw-foo`` instead of having ``foo`` throw implicitly. The old ``foo`` still throws implicitly because this is a big change to get right in one patch, but it should be removed soon.
2015-08-12 15:26:18 -05:00
John Benediktsson
6cded6437f
combinators: fix linear-case-quot to order the comparisons properly.
...
I noticed that member? optimized comparisons in the wrong order, this
was because it calls into linear-case-quot. The reason case was working
find is because it reversed before calling linear-case-quot. The fix
was to move the reverse into linear-case-quot.
2015-07-16 09:55:19 -07:00
John Benediktsson
8a3c5c2634
Fix some tests broken by optimized? rename.
2015-07-15 11:47:03 -07:00
Doug Coleman
43d6f1d3e2
factor: Retrying on the unit tests. Also normalize some syntax with FUNCTION:.
2015-07-02 17:28:17 -07:00
Doug Coleman
59f3b1ea57
Revert "factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!"
...
Needs a bit more work.
This reverts commit 7e54cc2824 .
2015-07-02 13:47:06 -07:00
Doug Coleman
7e54cc2824
factor: rename [ ] [ ] unit-test -> { } [ ] unit-test using a refactoring tool!
2015-07-02 11:36:08 -07:00
John Benediktsson
a85543a42f
combinators: fix broken optimization that made floats work for integer keys.
2015-01-17 15:46:04 -08:00
Björn Lindqvist
9c901b9c0e
Docs: for compiler, vm and combinators
2014-06-08 11:48:30 -07:00
John Benediktsson
57f9d78892
improve help by linking to types directly.
2014-05-23 20:20:15 -07:00
John Benediktsson
98935b7f15
docs: change ``{ $quotation "( x -- y )" }`` to ``{ $quotation ( x -- y ) }``.
2014-05-18 20:09:10 -07:00
John Benediktsson
6ef1b08d58
combinators: fix docs for dispatch since it isn't in kernel.private.
2013-11-22 17:32:59 -08:00
Doug Coleman
b83af8c5d2
combinators: Forgot an iota method.
2013-03-23 16:37:36 -07:00
John Benediktsson
2c33fe56a4
combinators: moving M\ iota hashcode* back since each-integer has hints.
2013-03-04 17:46:46 -08:00
John Benediktsson
668d37fef7
layouts: speed up ``M\ iota hashcode*`` using most-positive-fixnum.
2013-03-03 17:33:35 -08:00
John Benediktsson
35c313c6b4
combinators: faster hashcode for iota.
2013-03-01 10:42:20 -08:00
Doug Coleman
3582a6c624
kernel: Add 4dup, 4drop, and 4cleave.
2012-10-22 09:47:34 -07:00
John Benediktsson
daed497e3d
combinators: M\ array hashcode* makes memoize faster.
2012-08-23 17:28:27 -07:00
John Benediktsson
5e16810075
using reverse! when possible.
2012-04-25 20:09:36 -07:00
Doug Coleman
3ba787b277
core/basis: trim down using lists
2011-11-30 23:15:42 -08:00
John Benediktsson
27b96452ee
combinators: fix docs for case.
2011-11-10 11:20:28 -08:00
Joe Groff
186bf65a00
constants for special object hardcoded literals
2011-11-02 12:54:50 -07:00
Doug Coleman
4ebe5218c7
Update Windows for word renames, fix lint errors
2011-10-24 21:50:02 -07:00
John Benediktsson
5a943b32c4
Remove stack effects from HELP: declarations.
2011-10-20 19:36:11 -07:00
John Benediktsson
80e1c8e3f2
Eliminate duplicate syntax for stack effects "(" no longer drops and is identical to the old "((", which is now removed.
2011-10-18 13:19:39 -07:00
Doug Coleman
8504b17aad
Rename spread>quot to deep-spread>quot, and spread>quot-shallow to shallow-spread>quot.
2011-10-02 20:25:39 -07:00
Doug Coleman
38feae0e8f
Spread now infers with the correct stack effect. Make spread>quot-shallow which trims empty quotations off the head of the spread sequence. Fixes #139 .
2011-10-02 18:35:01 -07:00
Doug Coleman
f6bdebb36b
Revert "spread>quot now outputs empty quotations where you would expect so that things like { [ ] [ ] } spread infer as ( x x -- x x ) instead of ( -- )"
...
This causes problems in bootstrap and in make-images. Revisit sometime in the future...
This reverts commit 004b20df12 .
2011-09-18 23:41:49 -05:00
Doug Coleman
15f44a7276
spread>quot now outputs empty quotations where you would expect so that things like { [ ] [ ] } spread infer as ( x x -- x x ) instead of ( -- )
...
Fixes #139
2011-09-18 23:23:53 -05:00
John Benediktsson
e026eb0db4
Merge branch 'cleanup'
2011-08-26 18:49:25 -07:00
John Benediktsson
9f34c9c676
Spelling fixes to documentation.
2011-08-26 16:20:31 -07:00
John Benediktsson
1def8141bd
combinators: fix typo in docs for case.
2011-08-10 16:25:21 -07:00
Slava Pestov
836743b25b
combinators: fix help lint
2011-02-25 21:06:10 -08:00