]> gitweb.factorcode.org Git - factor.git/commitdiff
Fix conflict
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 3 Jul 2008 21:46:21 +0000 (16:46 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Thu, 3 Jul 2008 21:46:21 +0000 (16:46 -0500)
1  2 
core/bootstrap/stage2.factor
core/classes/tuple/tuple.factor
core/optimizer/inlining/inlining.factor
core/sequences/sequences-docs.factor
core/sequences/sequences-tests.factor
core/sequences/sequences.factor
extra/sequences/lib/lib.factor

Simple merge
index 59a2d157499542a104b3c2cf03ee4c48410cb11b,6056d200be3a200eed8f3e6e2bec90a1a39a544a..830ace3bf676880a25399f6da4b0e576f7dfd4bc
@@@ -107,41 -103,10 +107,41 @@@ ERROR: bad-superclass class 
  
  : superclass-size ( class -- n )
      superclasses but-last-slice
-     [ slot-names length ] map sum ;
+     [ slot-names length ] sigma ;
  
 +: (instance-check-quot) ( class -- quot )
 +    [
 +        \ dup ,
 +        [ "predicate" word-prop % ]
 +        [ [ bad-slot-value ] curry , ] bi
 +        \ unless ,
 +    ] [ ] make ;
 +
 +: (fixnum-check-quot) ( class -- quot )
 +    (instance-check-quot) fixnum "coercer" word-prop prepend ;
 +
 +: instance-check-quot ( class -- quot )
 +    {
 +        { [ dup object bootstrap-word eq? ] [ drop [ ] ] }
 +        { [ dup "coercer" word-prop ] [ "coercer" word-prop ] }
 +        { [ dup \ fixnum class<= ] [ (fixnum-check-quot) ] }
 +        [ (instance-check-quot) ]
 +    } cond ;
 +
 +: boa-check-quot ( class -- quot )
 +    all-slots 1 tail [ class>> instance-check-quot ] map spread>quot ;
 +
 +: define-boa-check ( class -- )
 +    dup boa-check-quot "boa-check" set-word-prop ;
 +
 +: tuple-prototype ( class -- prototype )
 +    [ all-slots [ initial>> ] map ] keep slots>tuple ;
 +
 +: define-tuple-prototype ( class -- )
 +    dup tuple-prototype "prototype" set-word-prop ;
 +
  : generate-tuple-slots ( class slots -- slot-specs )
 -    over superclass-size 2 + simple-slots ;
 +    over superclass-size 2 + make-slots deprecated-slots ;
  
  : define-tuple-slots ( class -- )
      dup dup "slot-names" word-prop generate-tuple-slots
index 9647f42d51f1fec3df23f40c1cdfbdeaa3908b07,bbeb5e044f3cee9dc3c0160e02afcaec9cfe71c5..e36d38180c7645c8402adfd21fc443be70dea86f
@@@ -48,25 -48,21 +48,25 @@@ DEFER: (flat-length
              { [ dup word? ] [ word-flat-length ] }
              [ drop 1 ]
          } cond
-     ] map sum ;
+     ] sigma ;
  
 -: flat-length ( seq -- n )
 -    [ word-def (flat-length) ] with-scope ;
 +: flat-length ( word -- n )
 +    [ def>> (flat-length) ] with-scope ;
  
  ! Single dispatch method inlining optimization
 -: node-class# ( node n -- class )
 -    over node-in-d <reversed> ?nth node-class ;
 +! : dispatching-class ( node generic -- method/f )
 +!     tuck dispatch# over in-d>> <reversed> ?nth 2dup node-literal?
 +!     [ node-literal swap single-effective-method ]
 +!     [ node-class swap specific-method ]
 +!     if ;
  
 -: dispatching-class ( node word -- class )
 -    [ dispatch# node-class# ] keep specific-method ;
 +: dispatching-class ( node generic -- method/f )
 +    tuck dispatch# over in-d>> <reversed> ?nth
 +    node-class swap specific-method ;
  
 -: inline-standard-method ( node word -- node )
 -    2dup dispatching-class dup
 -    [ swap method 1quotation f splice-quot ] [ 3drop t ] if ;
 +: inline-standard-method ( node generic -- node )
 +    dupd dispatching-class dup
 +    [ 1quotation f splice-quot ] [ 2drop t ] if ;
  
  ! Partial dispatch of math-generic words
  : normalize-math-class ( class -- class' )
index a753e478bf2a718e22cbbc09be01c8b3ef106321,a7481d46d5df8e2d7c66a770ce3acd494eb88746..7cf83d2e37f3672990f35079d3eeb6cd39a732a7
@@@ -1,6 -1,5 +1,5 @@@
 -USING: arrays bit-arrays help.markup help.syntax math
 -sequences.private vectors strings quotations sbufs kernel math.order ;
 +USING: arrays help.markup help.syntax math
- sequences.private vectors strings sbufs kernel math.order
- layouts ;
++sequences.private vectors strings kernel math.order ;
  IN: sequences
  
  ARTICLE: "sequences-unsafe" "Unsafe sequence operations"
Simple merge
Simple merge
Simple merge