diff --git a/basis/alien/debugger/authors.txt b/basis/alien/debugger/authors.txt new file mode 100644 index 0000000000..f13c9c1e77 --- /dev/null +++ b/basis/alien/debugger/authors.txt @@ -0,0 +1 @@ +Joe Groff diff --git a/basis/alien/debugger/debugger.factor b/basis/alien/debugger/debugger.factor new file mode 100644 index 0000000000..a04697155e --- /dev/null +++ b/basis/alien/debugger/debugger.factor @@ -0,0 +1,10 @@ +! Copyright (C) 2010 Joe Groff. +! See http://factorcode.org/license.txt for BSD license. +USING: alien.c-types alien.parser summary sequences accessors +prettyprint ; +IN: alien.debugger + +M: no-c-type summary name>> unparse "“" "” is not a C type" surround ; + +M: *-in-c-type-name summary + name>> "Cannot define a C type “" "” that ends with an asterisk (*)" surround ; diff --git a/basis/alien/parser/authors.txt b/basis/alien/parser/authors.txt new file mode 100644 index 0000000000..c299e0ac31 --- /dev/null +++ b/basis/alien/parser/authors.txt @@ -0,0 +1,3 @@ +Slava Pestov +Doug Coleman +Joe Groff diff --git a/basis/alien/parser/parser.factor b/basis/alien/parser/parser.factor index c9ec2c3889..4c5f5dbd6a 100644 --- a/basis/alien/parser/parser.factor +++ b/basis/alien/parser/parser.factor @@ -1,10 +1,10 @@ -! Copyright (C) 2008, 2010 Slava Pestov, Doug Coleman. +! Copyright (C) 2008, 2010 Slava Pestov, Doug Coleman, Joe Groff. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors alien alien.c-types alien.parser -alien.libraries arrays assocs classes combinators -combinators.short-circuit compiler.units effects grouping -kernel parser sequences splitting words fry locals lexer -namespaces summary math vocabs.parser ; +USING: accessors alien alien.c-types alien.libraries arrays +assocs classes combinators combinators.short-circuit +compiler.units effects grouping kernel parser sequences +splitting words fry locals lexer namespaces summary math +vocabs.parser ; IN: alien.parser : parse-c-type-name ( name -- word ) diff --git a/basis/bootstrap/compiler/compiler.factor b/basis/bootstrap/compiler/compiler.factor index edb0bdf2ae..0bdb2494f8 100644 --- a/basis/bootstrap/compiler/compiler.factor +++ b/basis/bootstrap/compiler/compiler.factor @@ -23,6 +23,7 @@ IN: bootstrap.compiler "prettyprint" vocab [ "stack-checker.errors.prettyprint" require "alien.prettyprint" require + "alien.debugger" require ] when "cpu." cpu name>> append require diff --git a/basis/debugger/debugger.factor b/basis/debugger/debugger.factor index b7ecc5acec..c34a50190f 100644 --- a/basis/debugger/debugger.factor +++ b/basis/debugger/debugger.factor @@ -1,15 +1,15 @@ ! Copyright (C) 2004, 2010 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: slots alien.c-types alien.parser arrays definitions generic -hashtables summary io kernel math namespaces make prettyprint -prettyprint.config sequences assocs sequences.private strings -io.styles io.pathnames vectors words system splitting math.parser +USING: slots arrays definitions generic hashtables summary io +kernel math namespaces make prettyprint prettyprint.config +sequences assocs sequences.private strings io.styles +io.pathnames vectors words system splitting math.parser classes.mixin classes.tuple continuations continuations.private combinators generic.math classes.builtin classes compiler.units generic.standard generic.single vocabs init kernel.private -io.encodings accessors math.order destructors source-files parser -classes.tuple.parser effects.parser lexer generic.parser strings.parser -vocabs.loader vocabs.parser source-files.errors ; +io.encodings accessors math.order destructors source-files +parser classes.tuple.parser effects.parser lexer generic.parser +strings.parser vocabs.loader vocabs.parser source-files.errors ; IN: debugger GENERIC: error-help ( error -- topic ) @@ -328,8 +328,10 @@ M: lexer-error error-help M: bad-effect summary drop "Bad stack effect declaration" ; + M: invalid-row-variable summary drop "Stack effect row variables can only occur as the first input or output" ; + M: row-variable-can't-have-type summary drop "Stack effect row variables cannot have a declared type" ; @@ -347,11 +349,6 @@ M: wrong-values summary drop "Quotation's stack effect does not match call site" M: stack-effect-omits-dashes summary drop "Stack effect must contain “--”" ; -M: no-c-type summary name>> unparse "“" "” is not a C type" surround ; - -M: *-in-c-type-name summary - name>> "Cannot define a C type “" "” that ends with an asterisk (*)" surround ; - { { [ os windows? ] [ "debugger.windows" require ] } { [ os unix? ] [ "debugger.unix" require ] } diff --git a/basis/grouping/authors.txt b/basis/grouping/authors.txt index 1901f27a24..580f882c8d 100644 --- a/basis/grouping/authors.txt +++ b/basis/grouping/authors.txt @@ -1 +1,2 @@ Slava Pestov +Joe Groff diff --git a/basis/grouping/grouping.factor b/basis/grouping/grouping.factor index 304fd50fcc..1a7e267c90 100644 --- a/basis/grouping/grouping.factor +++ b/basis/grouping/grouping.factor @@ -1,8 +1,7 @@ -! Copyright (C) 2005, 2010 Slava Pestov. +! Copyright (C) 2005, 2010 Slava Pestov, Joe Groff. ! See http://factorcode.org/license.txt for BSD license. USING: kernel math math.order strings arrays vectors sequences -sequences.private accessors fry combinators.short-circuit -combinators ; +sequences.private accessors fry combinators ; IN: grouping = [ - ] [ drop ] if ; inline : check-circular-clumps ( seq n -- seq n ) - 2dup { [ nip 0 <= ] [ swap length > ] } 2|| - [ "Invalid clump size" throw ] when ; inline + 2dup 1 - swap bounds-check 2drop ; inline PRIVATE> @@ -115,15 +113,18 @@ INSTANCE: sliced-clumps abstract-clumps : all-eq? ( seq -- ? ) [ eq? ] monotonic? ; -TUPLE: circular-slice - { from read-only } - { to read-only } - { seq read-only } ; +TUPLE: circular-slice { from read-only } { to read-only } { seq read-only } ; + INSTANCE: circular-slice virtual-sequence + M: circular-slice equal? over slice? [ sequence= ] [ 2drop f ] if ; + M: circular-slice hashcode* [ sequence-hashcode ] recursive-hashcode ; + M: circular-slice length [ to>> ] [ from>> ] bi - ; inline + M: circular-slice virtual-exemplar seq>> ; inline + M: circular-slice virtual@ [ from>> + ] [ seq>> ] bi [ length slice-mod ] keep ; inline @@ -155,4 +156,3 @@ M: circular-clumps nth : circular-clump ( seq n -- array ) { } like ; inline - diff --git a/basis/stack-checker/errors/prettyprint/prettyprint.factor b/basis/stack-checker/errors/prettyprint/prettyprint.factor index 90d12c6235..3d4480a4aa 100644 --- a/basis/stack-checker/errors/prettyprint/prettyprint.factor +++ b/basis/stack-checker/errors/prettyprint/prettyprint.factor @@ -27,23 +27,23 @@ M: recursive-quotation-error summary M: undeclared-recursion-error summary word>> name>> - "The inline recursive word " " must be declared recursive" surround ; + "The inline recursive word “" "” must be declared recursive" surround ; M: diverging-recursion-error summary word>> name>> - "The recursive word " " digs arbitrarily deep into the stack" surround ; + "The recursive word “" "” digs arbitrarily deep into the stack" surround ; M: unbalanced-recursion-error summary word>> name>> - "The recursive word " " leaves with the stack having the wrong height" surround ; + "The recursive word “" "” leaves with the stack having the wrong height" surround ; M: inconsistent-recursive-call-error summary word>> name>> - "The recursive word " - " calls itself with a different set of quotation parameters than were input" surround ; + "The recursive word “" + "” calls itself with a different set of quotation parameters than were input" surround ; M: transform-expansion-error summary - word>> name>> "Macro expansion of " " threw an error" surround ; + word>> name>> "Macro expansion of “" "” threw an error" surround ; M: transform-expansion-error error. [ summary print ] @@ -52,14 +52,13 @@ M: transform-expansion-error error. tri ; M: do-not-compile summary - word>> name>> "Cannot compile call to " prepend ; + word>> name>> "Cannot compile call to “" "”" surround ; M: unbalanced-branches-error summary word>> name>> - "The input quotations to " " don't match their expected effects" surround ; + "The input quotations to “" "” don't match their expected effects" surround ; M: unbalanced-branches-error error. dup summary print [ quots>> ] [ declareds>> ] [ actuals>> ] tri 3array flip { "Input" "Expected" "Got" } prefix simple-table. ; - diff --git a/basis/unix/types/freebsd/freebsd.factor b/basis/unix/types/freebsd/freebsd.factor index 215e344231..4973df989d 100644 --- a/basis/unix/types/freebsd/freebsd.factor +++ b/basis/unix/types/freebsd/freebsd.factor @@ -21,6 +21,6 @@ TYPEDEF: __uint32_t blksize_t TYPEDEF: __uint32_t fflags_t TYPEDEF: long ssize_t TYPEDEF: int pid_t -TYPEDEF: int time_t +TYPEDEF: long time_t -ALIAS: +ALIAS: