]> gitweb.factorcode.org Git - factor.git/commitdiff
fix for jvm factor bootstrap
authorSlava Pestov <slava@factorcode.org>
Fri, 12 Nov 2004 02:00:28 +0000 (02:00 +0000)
committerSlava Pestov <slava@factorcode.org>
Fri, 12 Nov 2004 02:00:28 +0000 (02:00 +0000)
TODO.FACTOR.txt
factor/jedit/FactorPlugin.java
library/platform/jvm/boot-mini.factor
library/platform/jvm/boot-sumo.factor
library/platform/native/boot-stage2.factor
library/platform/native/boot.factor
library/vocabularies.factor [deleted file]
library/words.factor

index c4fae85644062e678e0a0cab904b43b971dd5bdb..d0e0f59f75f2f44e1d5567a95aa3838617b7485a 100644 (file)
@@ -21,7 +21,7 @@
 - bitfields in C structs\r
 - SDL_Rect** type\r
 - struct membres that are not *\r
-- float types\r
+- FFI float types\r
 - compile word twice; no more 'cannot compile' error!\r
 - perhaps /i should work with all numbers\r
 - assembler opcodes dispatch on operand types\r
@@ -31,7 +31,6 @@
 + listener/plugin:\r
 \r
 - extract word in wrong place\r
-- twice in completion list\r
 - accept multi-line input in listener\r
 - don't show listener on certain commands\r
 - NPE in ErrorHighlight\r
@@ -45,7 +44,6 @@
 \r
 + kernel:\r
 \r
-- save restore stacks between longjmp in case they are in registers\r
 - profiler is inaccurate: wrong word on cs\r
 - better i/o scheduler\r
 - >lower, >upper for strings\r
@@ -62,7 +60,6 @@
 \r
 - alist -vs- assoc terminology\r
 - jedit ==> jedit-word, jedit takes a file name\r
-- 'cascading' styles\r
 - command line parsing cleanup\r
 - nicer way to combine two paths\r
 - :get &get\r
index 89345e9e111159fb2792ec0d8e474c2bd3b6c338..a53546b1ccefabc55b614bb23db2e5fe92d9a812 100644 (file)
@@ -197,15 +197,18 @@ public class FactorPlugin extends EditPlugin
                        FactorWord w = (FactorWord)words.car;
                        if(w != null && w.name != null)
                        {
-                               if(anywhere)
+                               if(!completions.contains(w))
                                {
-                                       if(w.name.indexOf(word) != -1)
-                                               completions.add(w);
-                               }
-                               else
-                               {
-                                       if(w.name.startsWith(word))
-                                               completions.add(w);
+                                       if(anywhere)
+                                       {
+                                               if(w.name.indexOf(word) != -1)
+                                                       completions.add(w);
+                                       }
+                                       else
+                                       {
+                                               if(w.name.startsWith(word))
+                                                       completions.add(w);
+                                       }
                                }
                        }
 
index 67f0a61b8de5f6769d5c1dca09a4721d14af0dc8..8949a0e33e907586ca35c07a178a351a94b4c808 100644 (file)
@@ -58,7 +58,6 @@ USE: parser
 "/library/continuations.factor"             run-resource ! continuations
 "/library/errors.factor"                    run-resource ! errors
 "/library/platform/jvm/vocabularies.factor" run-resource ! vocabularies
-"/library/vocabularies.factor"              run-resource ! vocabularies
 "/library/platform/jvm/words.factor"        run-resource ! words
 "/library/words.factor"                     run-resource ! words
 "/library/format.factor"                    run-resource ! format
index 95f0dbbe5615bbb76cbc8de0ebc594ab036019fc..5e2e9f682a05bf78b558116f087b373a5d936ffa 100644 (file)
@@ -58,7 +58,6 @@ USE: parser
 "/library/continuations.factor"             run-resource ! continuations
 "/library/errors.factor"                    run-resource ! errors
 "/library/platform/jvm/vocabularies.factor" run-resource ! vocabularies
-"/library/vocabularies.factor"              run-resource ! vocabularies
 "/library/platform/jvm/words.factor"        run-resource ! words
 "/library/words.factor"                     run-resource ! words
 "/library/format.factor"                    run-resource ! format
index efb5ef937b56e6cce42de3aac932d6cf5a158a22..b92248101ec3c6756579faa271d13eb22ae2b936 100644 (file)
@@ -72,7 +72,6 @@ USE: stdio
     "/library/platform/native/words.factor"
     "/library/words.factor"
     "/library/platform/native/vocabularies.factor"
-    "/library/vocabularies.factor"
     "/library/platform/native/parse-numbers.factor"
     "/library/platform/native/parser.factor"
     "/library/platform/native/parse-syntax.factor"
index d63bc48561c28f7d91f79d8205aab0da1787c8c3..059dc2433a3c8bbe6139db7d0e4e0caa89ac90ac 100644 (file)
@@ -65,7 +65,6 @@ primitives,
     "/library/platform/native/words.factor"
     "/library/words.factor"
     "/library/platform/native/vocabularies.factor"
-    "/library/vocabularies.factor"
     "/library/platform/native/parse-numbers.factor"
     "/library/platform/native/parser.factor"
     "/library/platform/native/parse-syntax.factor"
diff --git a/library/vocabularies.factor b/library/vocabularies.factor
deleted file mode 100644 (file)
index d71ff0e..0000000
+++ /dev/null
@@ -1,97 +0,0 @@
-! :folding=indent:collapseFolds=1:
-
-! $Id$
-!
-! Copyright (C) 2003, 2004 Slava Pestov.
-! 
-! Redistribution and use in source and binary forms, with or without
-! modification, are permitted provided that the following conditions are met:
-! 
-! 1. Redistributions of source code must retain the above copyright notice,
-!    this list of conditions and the following disclaimer.
-! 
-! 2. Redistributions in binary form must reproduce the above copyright notice,
-!    this list of conditions and the following disclaimer in the documentation
-!    and/or other materials provided with the distribution.
-! 
-! THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
-! INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
-! FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-! DEVELOPERS AND CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-! SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-! PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-! OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-! WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-! OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-! ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-IN: words
-USE: combinators
-USE: kernel
-USE: lists
-USE: namespaces
-USE: stack
-USE: strings
-
-: vocabs ( -- list )
-    #! Push a list of vocabularies.
-    global [ "vocabularies" get [ vars str-sort ] bind ] bind ;
-
-: vocab ( name -- vocab )
-    #! Get a vocabulary.
-    global [ "vocabularies" get get* ] bind ;
-
-: word-sort ( list -- list )
-    #! Sort a list of words by name.
-    [ swap word-name swap word-name str-lexi> ] sort ;
-
-: words ( vocab -- list )
-    #! Push a list of all words in a vocabulary.
-    #! Filter empty slots.
-    vocab [ values ] bind [ ] subset word-sort ;
-
-: init-search-path ( -- )
-    ! For files
-    "scratchpad" "file-in" set
-    [ "builtins" "syntax" "scratchpad" ] "file-use" set
-    ! For interactive
-    "scratchpad" "in" set
-    [
-        "user"
-        "arithmetic"
-        "builtins"
-        "combinators"
-        "compiler"
-        "continuations"
-        "debugger"
-        "errors"
-        "files"
-        "hashtables"
-        "inference"
-        "inferior"
-        "interpreter"
-        "inspector"
-        "jedit"
-        "kernel"
-        "listener"
-        "lists"
-        "logic"
-        "math"
-        "namespaces"
-        "parser"
-        "prettyprint"
-        "processes"
-        "profiler"
-        "stack"
-        "streams"
-        "stdio"
-        "strings"
-        "syntax"
-        "test"
-        "threads"
-        "unparser"
-        "vectors"
-        "vocabularies"
-        "words"
-        "scratchpad"
-    ] "use" set ;
index 8a5963622b35003192f2de0a603963bdf8ae9663..bb57fa2a63697dea77243e264835deebaf84f13a 100644 (file)
@@ -32,6 +32,7 @@ USE: lists
 USE: logic
 USE: namespaces
 USE: stack
+USE: strings
 
 : word-name ( word -- name )
     "name" word-property ;
@@ -39,6 +40,69 @@ USE: stack
 : word-vocabulary ( word -- vocab )
     "vocabulary" word-property ;
 
+: vocabs ( -- list )
+    #! Push a list of vocabularies.
+    global [ "vocabularies" get [ vars str-sort ] bind ] bind ;
+
+: vocab ( name -- vocab )
+    #! Get a vocabulary.
+    global [ "vocabularies" get get* ] bind ;
+
+: word-sort ( list -- list )
+    #! Sort a list of words by name.
+    [ swap word-name swap word-name str-lexi> ] sort ;
+
+: words ( vocab -- list )
+    #! Push a list of all words in a vocabulary.
+    #! Filter empty slots.
+    vocab [ values ] bind [ ] subset word-sort ;
+
 : each-word ( quot -- )
     #! Apply a quotation to each word in the image.
     vocabs [ words [ swap dup >r call r> ] each ] each drop ;
+
+: init-search-path ( -- )
+    ! For files
+    "scratchpad" "file-in" set
+    [ "builtins" "syntax" "scratchpad" ] "file-use" set
+    ! For interactive
+    "scratchpad" "in" set
+    [
+        "user"
+        "arithmetic"
+        "builtins"
+        "combinators"
+        "compiler"
+        "continuations"
+        "debugger"
+        "errors"
+        "files"
+        "hashtables"
+        "inference"
+        "inferior"
+        "interpreter"
+        "inspector"
+        "jedit"
+        "kernel"
+        "listener"
+        "lists"
+        "logic"
+        "math"
+        "namespaces"
+        "parser"
+        "prettyprint"
+        "processes"
+        "profiler"
+        "stack"
+        "streams"
+        "stdio"
+        "strings"
+        "syntax"
+        "test"
+        "threads"
+        "unparser"
+        "vectors"
+        "vocabularies"
+        "words"
+        "scratchpad"
+    ] "use" set ;