]> gitweb.factorcode.org Git - factor.git/commitdiff
core: get rid of some unnecessary wrappers.
authorJohn Benediktsson <mrjbq7@gmail.com>
Mon, 3 Nov 2014 04:16:22 +0000 (20:16 -0800)
committerJohn Benediktsson <mrjbq7@gmail.com>
Mon, 3 Nov 2014 04:16:22 +0000 (20:16 -0800)
basis/bootstrap/image/image.factor
core/compiler/units/units.factor
core/generic/single/single.factor
core/sequences/sequences.factor
core/source-files/source-files.factor
core/vocabs/parser/parser.factor
core/vocabs/vocabs.factor
core/words/words.factor

index c06883dc9a754f00003c4e35c1b97a158037cfb3..b0bf307456f1af188e64a779fce214bc1c188a6a 100755 (executable)
@@ -568,7 +568,7 @@ M: quotation '
     fixup-header
     "Image length: " write image get length .
     "Object cache size: " write objects get assoc-size .
-    \ last-word-symbol global delete-at
+    \ last-word global delete-at
     image get ;
 
 ! Image output
index 517ee50bfa9d9a793f2b31e90ccba1a06a3d2a3d..7c4116c9f4762dce21a7eeaa9abb4ec81d455471 100644 (file)
@@ -14,7 +14,7 @@ SYMBOL: new-definitions
 TUPLE: redefine-error def ;
 
 : throw-redefine-error ( definition -- )
-    redefine-error boa throw-continue ;
+    redefine-error boa throw-continue ;
 
 <PRIVATE
 
index 207dd5807cdf63fed5f906c67d3439ff5656c973..dc8e907f73a17f4633eb46e9f69bbb09bd1b89b0 100644 (file)
@@ -124,7 +124,7 @@ TUPLE: tuple-dispatch-engine echelons ;
 : <tuple-dispatch-engine> ( methods -- engine )
     convert-tuple-inheritance echelon-sort
     [ dupd <echelon-dispatch-engine> ] assoc-map
-    tuple-dispatch-engine boa ;
+    tuple-dispatch-engine boa ;
 
 : convert-tuple-methods ( assoc -- assoc' )
     tuple bootstrap-word
index f27444df3f9b0f058f493cd8806a87c4cb7b0ca9..b3f458bca45c4cd84157fe194d1bd5362ce0d039 100644 (file)
@@ -108,7 +108,7 @@ ERROR: non-negative-integer-expected n ;
 
 : iota ( n -- iota )
     dup 0 < [ non-negative-integer-expected ] when
-    iota-tuple boa ; inline
+    iota-tuple boa ; inline
 
 M: iota-tuple length n>> ; inline
 M: iota-tuple nth-unsafe drop ; inline
index 1a2bfa7459771005f993fd8f63964fd35ccbbfb9..0b6774d0fc1c534bda2bd2039377e6f23890c75d 100644 (file)
@@ -27,7 +27,7 @@ main ;
     new-definitions get >>definitions drop ;
 
 : <source-file> ( path -- source-file )
-    source-file-tuple new
+    source-file-tuple new
         swap >>path
         <definitions> >>definitions ;
 
@@ -62,7 +62,7 @@ SYMBOL: file
 
 : wrap-source-file-error ( error -- * )
     file get rollback-source-file
-    source-file-error new
+    source-file-error new
         f >>line#
         file get path>> >>file
         swap >>error rethrow ;
index cd331318342ad53e5e9f986c255c356ef42eb7b6..cb327432a2a180800d222cd2b656be02aff087f8 100644 (file)
@@ -19,7 +19,7 @@ ERROR: no-word-error name ;
     suffix ;
 
 : <no-word-error> ( name possibilities -- error restarts )
-    [ drop no-word-error boa ] [ word-restarts-with-defer ] 2bi ;
+    [ drop no-word-error boa ] [ word-restarts-with-defer ] 2bi ;
 
 TUPLE: manifest
 current-vocab
@@ -89,7 +89,7 @@ PRIVATE>
 TUPLE: no-current-vocab-error ;
 
 : no-current-vocab ( -- vocab )
-    no-current-vocab-error boa
+    no-current-vocab-error boa
     { { "Define words in scratchpad vocabulary" "scratchpad" } }
     throw-restarts dup set-current-vocab ;
 
@@ -169,7 +169,7 @@ TUPLE: rename word vocab words ;
 TUPLE: ambiguous-use-error words ;
 
 : <ambiguous-use-error> ( words -- error restarts )
-    [ ambiguous-use-error boa ] [ word-restarts ] bi ;
+    [ ambiguous-use-error boa ] [ word-restarts ] bi ;
 
 <PRIVATE
 
index 1d1b1b5d913b3ee005de2fabfc41860df8db7a9b..157213b44de7ab608a9e83e13512d79f1e8964fa 100644 (file)
@@ -17,7 +17,7 @@ SYMBOL: +running+
 SYMBOL: +done+
 
 : <vocab> ( name -- vocab )
-    vocab new
+    vocab new
         swap >>name
         H{ } clone >>words ;
 
index 7110cb24e58f766fe69410a51e5556fd9c3178f8..d1cdd8b825d5c1c047ad7cd39a9f06c95d116886 100644 (file)
@@ -16,11 +16,9 @@ BUILTIN: word
 ! also looking for classes
 : word ( -- * ) "dummy word" throw ;
 
-SYMBOL: last-word-symbol
+: last-word ( -- word ) \ last-word get-global ;
 
-: last-word ( -- word ) \ last-word-symbol get-global ;
-
-: set-last-word ( word -- ) \ last-word-symbol set-global ;
+: set-last-word ( word -- ) \ last-word set-global ;
 
 M: word execute (execute) ;
 
@@ -52,7 +50,8 @@ M: word definition def>> ;
 PRIVATE>
 
 TUPLE: undefined-word word ;
-: undefined ( -- * ) callstack caller \ undefined-word boa throw ;
+
+: undefined ( -- * ) callstack caller undefined-word boa throw ;
 
 : undefined-def ( -- quot )
     #! 'f' inhibits tail call optimization in non-optimizing