]> gitweb.factorcode.org Git - factor.git/commitdiff
factor: put inline on same line as ; for experimentation
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 10 Aug 2015 17:55:27 +0000 (12:55 -0500)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 10 Aug 2015 17:55:27 +0000 (12:55 -0500)
14 files changed:
basis/binary-search/binary-search.factor
basis/bootstrap/image/image.factor
basis/compiler/tree/combinators/combinators.factor
basis/compiler/tree/recursive/recursive.factor
basis/io/timeouts/timeouts.factor
basis/stack-checker/stack-checker-tests.factor
basis/ui/gadgets/panes/panes.factor
core/math/integers/integers.factor
core/sorting/sorting.factor
extra/benchmark/beust2/beust2.factor
extra/benchmark/recursive/recursive.factor
extra/benchmark/yuv-to-rgb/yuv-to-rgb.factor
extra/koszul/koszul.factor
extra/sequences/extras/extras.factor

index 976f5fbb71c346e8b78fe3a1de65b43a276bcfd9..d5a24e08faf3e7e3ac75e9a9f30b3466ae4401f1 100644 (file)
@@ -23,8 +23,7 @@ IN: binary-search
 PRIVATE>
 
 : search ( seq quot: ( elt -- <=> ) -- i elt )
-    over empty? [ 2drop f f ] [ [ 0 over length ] dip (search) ] if ;
-    inline
+    over empty? [ 2drop f f ] [ [ 0 over length ] dip (search) ] if ; inline
 
 GENERIC: natural-search ( obj seq -- i elt )
 M: object natural-search [ <=> ] with search ;
index 94f1ec5943ce2a6e2322d68efbba2a5436f2dab5..3be291f5b2d4dea592c7bc5d54abc8902d7c7134 100755 (executable)
@@ -248,8 +248,7 @@ SPECIAL-OBJECT: undefined-quot 65
 
 : emit-object ( class quot -- addr )
     [ type-number ] dip over here-as
-    [ swap emit-header call align-here ] dip ;
-    inline
+    [ swap emit-header call align-here ] dip ; inline
 
 ! Write an object to the image.
 GENERIC: ' ( obj -- ptr )
index d41796678c698efbf9fa946f749e9b50ee197459..7d709fd02d7fabf5ba7bcf2b935404a43a24c2af 100644 (file)
@@ -53,5 +53,5 @@ IN: compiler.tree.combinators
 : until-fixed-point ( ... #recursive quot: ( ... node -- ... ) -- ... )
     over label>> t >>fixed-point drop
     [ with-scope ] 2keep
-    over label>> fixed-point>> [ 2drop ] [ until-fixed-point ] if ;
-    inline recursive
+    over label>> fixed-point>>
+    [ 2drop ] [ until-fixed-point ] if ; inline recursive
index 2c65a700b6afca3bace5a94be4a048b0c6d03d0f..cd00e931fc0a3d520a6ae1bd76d073dfea7e216e 100644 (file)
@@ -108,8 +108,8 @@ SYMBOL: changed?
 
 : while-changing ( ... quot: ( ... -- ... ) -- ... )
     changed? off
-    [ call ] [ changed? get [ while-changing ] [ drop ] if ] bi ;
-    inline recursive
+    [ call ]
+    [ changed? get [ while-changing ] [ drop ] if ] bi ; inline recursive
 
 : detect-loops ( call-graph -- )
     HS{ } clone not-loops set
index 42238b6526bdec9d58e38dc8b354d57a6b6e2c62..9dbd475fc822c7aa35254ca898419fa28479f02a 100644 (file)
@@ -17,12 +17,12 @@ GENERIC: cancel-operation ( obj -- )
     [ '[ _ cancel-operation ] ] dip later ;
 
 : with-timeout* ( obj timeout quot -- )
-    2over queue-timeout [ nip call ] dip stop-timer ;
-    inline
+    2over queue-timeout
+    [ nip call ] dip stop-timer ; inline
 
 : with-timeout ( obj quot -- )
-    over timeout [ [ dup timeout ] dip with-timeout* ] [ call ] if ;
-    inline
+    over timeout
+    [ [ dup timeout ] dip with-timeout* ] [ call ] if ; inline
 
 : timeouts ( dt -- )
     [ input-stream get set-timeout ]
index 6c31370e549ab3ee78c83dc4f9c450fc7f857b48..5426b773b24ff0c12e305e15d3f5fbea08e02063 100644 (file)
@@ -346,8 +346,9 @@ FORGET: bad-recursion-3
 { 2 0 } [ drop f f [ 2drop "A" throw ] [ ] if 2drop ] must-infer-as
 
 : unbalanced-retain-usage ( a b -- )
-    dup 10 < [ 2drop 5 1 + unbalanced-retain-usage ] [ 2drop ] if ;
-    inline recursive
+    dup 10 <
+    [ 2drop 5 1 + unbalanced-retain-usage ]
+    [ 2drop ] if ; inline recursive
 
 [ [ unbalanced-retain-usage ] infer ] [ inference-error? ] must-fail-with
 
index 27d231a01b3ed83790e3d61cdf0365db89ecc1ce..6ebf4930556fd559b0e2a63a3caffbac44a5b1d4 100644 (file)
@@ -270,8 +270,7 @@ TUPLE: nested-pane-stream < pane-stream style parent ;
 : new-nested-pane-stream ( style parent class -- stream )
     new
         swap >>parent
-        swap <pane> apply-wrap-style [ >>style ] [ >>pane ] bi* ;
-    inline
+        swap <pane> apply-wrap-style [ >>style ] [ >>pane ] bi* ; inline
 
 : unnest-pane-stream ( stream -- child parent )
     [ [ style>> ] [ pane>> smash-pane ] bi style-pane ] [ parent>> ] bi ;
index 07a2e2bbd2e53a9944f4e4f0c11260fa973bdee4..bf36076aceda8812502a3137692be9a31cbc2c4b 100644 (file)
@@ -175,8 +175,7 @@ M: bignum (log2) bignum-log2 ; inline
         zero? [
             dup 2 bitand zero? not rot or [ 1 + ] when
         ] [ nip 1 + ] if
-    ] [ drop nip ] if ;
-    inline
+    ] [ drop nip ] if ; inline
 
 ! Fourth step: post-scaling
 ! Because of rounding, our mantissa with guard bit is now in the
index 52c86560082f757b94fe3004c3f3331ac6485595..511318e00c4205a2d02d9625df6d49e4e47cb7bd 100644 (file)
@@ -135,8 +135,7 @@ PRIVATE>
 
 : sort ( seq quot: ( obj1 obj2 -- <=> ) -- sortedseq )
     [ <merge> ] dip
-    [ sort-pairs ] [ sort-loop ] [ drop accum>> underlying>> ] 2tri ;
-    inline
+    [ sort-pairs ] [ sort-loop ] [ drop accum>> underlying>> ] 2tri ; inline
 
 : natural-sort ( seq -- sortedseq ) [ <=> ] sort ;
 
index 2d37ab48f9a3f0eb02cffb07c231dca88f55b90c..90187c0b77c068b7af787a8f2e4daebfb14a2222 100644 (file)
@@ -28,8 +28,7 @@ IN: benchmark.beust2
     ] any? ; inline recursive
 
 :: count-numbers ( max listener -- )
-    10 iota [ 1 + 1 1 0 max listener (count-numbers) ] any? drop ;
-    inline
+    10 iota [ 1 + 1 1 0 max listener (count-numbers) ] any? drop ; inline
 
 :: beust2-benchmark ( -- )
     0 :> i!
index f53a70a12774e400131ac4b565b0b6ceff3c6bab..e9a65205be01f3adff832ba1ceb0fa9c128c9be1 100644 (file)
@@ -2,8 +2,9 @@ USING: math kernel hints prettyprint io combinators ;
 IN: benchmark.recursive
 
 : fib ( m -- n )
-    dup 2 < [ drop 1 ] [ [ 1 - fib ] [ 2 - fib ] bi + ] if ;
-    inline recursive
+    dup 2 <
+    [ drop 1 ]
+    [ [ 1 - fib ] [ 2 - fib ] bi + ] if ; inline recursive
 
 : ack ( m n -- x )
     {
index cf4719490a1e70cd893f2ca192375f7295aa9537..3da80ec192176b9a23681621a7b7848b4242949b 100644 (file)
@@ -56,15 +56,13 @@ STRUCT: yuv-buffer
     drop 516 * 128 + swap 298 * + -8 shift clamp ; inline
 
 : compute-green ( y u v -- g )
-    [ [ 298 * ] dip 100 * - ] dip 208 * - 128 + -8 shift clamp ;
-    inline
+    [ [ 298 * ] dip 100 * - ] dip 208 * - 128 + -8 shift clamp ; inline
 
 : compute-red ( y u v -- g )
     nip 409 * swap 298 * + 128 + -8 shift clamp ; inline
 
 : compute-rgb ( y u v -- b g r )
-    [ compute-blue ] [ compute-green ] [ compute-red ] 3tri ;
-    inline
+    [ compute-blue ] [ compute-green ] [ compute-red ] 3tri ; inline
 
 : store-rgb ( index rgb b g r -- index )
     [ pick 0 + pick set-nth-unsafe ]
index 4776d0f47f9501fc96517978fa45d9cde29de5a4..d81abc77b48cf8db3fb3439f0e19e1eda63595a8 100644 (file)
@@ -242,8 +242,7 @@ DEFER: (d)
     dup length [ graded-triple ] with map ;
 
 : graded-laplacian ( generators quot -- seq )
-    [ basis graded graded-triples [ first3 ] ] dip compose map ;
-    inline
+    [ basis graded graded-triples [ first3 ] ] dip compose map ; inline
 
 : graded-laplacian-betti ( generators -- seq )
     [ laplacian-betti ] graded-laplacian ;
index 21450c05513ee76b39f94a96e04c52868315a58f..4775f33d8fe3f7c56692f522b002baa5b104e824 100644 (file)
@@ -212,8 +212,8 @@ PRIVATE>
 : ((each-from)) ( i seq -- n quot )
     [ length over [-] swap ] keep '[ _ + _ nth-unsafe ] ; inline
 
-: (each-from) ( i seq quot -- n quot' ) [ ((each-from)) ] dip compose ;
-    inline
+: (each-from) ( i seq quot -- n quot' )
+    [ ((each-from)) ] dip compose ; inline
 
 PRIVATE>