fix for jvm factor bootstrap

cvs
Slava Pestov 2004-11-12 02:00:28 +00:00
parent 7cebc2e469
commit d06e3c0ffb
8 changed files with 76 additions and 113 deletions

View File

@ -21,7 +21,7 @@
- bitfields in C structs
- SDL_Rect** type
- struct membres that are not *
- float types
- FFI float types
- compile word twice; no more 'cannot compile' error!
- perhaps /i should work with all numbers
- assembler opcodes dispatch on operand types
@ -31,7 +31,6 @@
+ listener/plugin:
- extract word in wrong place
- twice in completion list
- accept multi-line input in listener
- don't show listener on certain commands
- NPE in ErrorHighlight
@ -45,7 +44,6 @@
+ kernel:
- save restore stacks between longjmp in case they are in registers
- profiler is inaccurate: wrong word on cs
- better i/o scheduler
- >lower, >upper for strings
@ -62,7 +60,6 @@
- alist -vs- assoc terminology
- jedit ==> jedit-word, jedit takes a file name
- 'cascading' styles
- command line parsing cleanup
- nicer way to combine two paths
- :get &get

View File

@ -196,6 +196,8 @@ public class FactorPlugin extends EditPlugin
{
FactorWord w = (FactorWord)words.car;
if(w != null && w.name != null)
{
if(!completions.contains(w))
{
if(anywhere)
{
@ -208,6 +210,7 @@ public class FactorPlugin extends EditPlugin
completions.add(w);
}
}
}
words = words.next();
}

View 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

View 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

View 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"

View 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"

View File

@ -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 ;

View 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 ;