Merge branch 'master' of git://factorcode.org/git/factor
commit
8f92583946
|
@ -0,0 +1 @@
|
|||
Joe Groff
|
|
@ -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 ;
|
|
@ -0,0 +1,3 @@
|
|||
Slava Pestov
|
||||
Doug Coleman
|
||||
Joe Groff
|
|
@ -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 )
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 ] }
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
Slava Pestov
|
||||
Joe Groff
|
||||
|
|
|
@ -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
|
||||
|
||||
<PRIVATE
|
||||
|
@ -64,8 +63,7 @@ TUPLE: chunking-seq { seq read-only } { n read-only } ;
|
|||
2dup >= [ - ] [ 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 )
|
||||
<circular-clumps> { } like ; inline
|
||||
|
||||
|
|
|
@ -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. ;
|
||||
|
||||
|
|
|
@ -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: <time_t> <int>
|
||||
ALIAS: <time_t> <long>
|
||||
|
|
Loading…
Reference in New Issue